|
Why are you adding items to the combo's Databindings collection and setting the DataSource. That's not a normal thing to do, it might be "confusing" the combo's databinding logic. Does the problem keep happening if you remove these two lines?
this.comboBoxMembershipLevel.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.myClubDataSet12,"MembershipLevels.MembershipLevelName"));
this.comboBoxMembershipLevel.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.myClubDataSet12, "MemberDetails.MembershipLevel"));
:josh:
My WPF Blog[^]
|
|
|
|
|
Thanks for your assistance:
Josh Smith wrote: Why are you adding items to the combo's Databindings collection and setting the DataSource. That's not a normal thing to do,
The form is a collection of all the data related to one record with the ability to move forward and backward between records. I want to be able to change the dataset values of these individual records/fields via a combobox selection of options as they are displayed. Adding the items to those form fields allows this to happen except with the problem as descibed. The change in values is also detected correctly and saved to the database.
Josh Smith wrote: Does the problem keep happening if you remove these two lines?
This resolves the problem as described BUT if I change the data in the field then the new data displayed in the field remains constant no matter which record I move to. In other words, the dataset is not updated. Additionally, the change in the fields value is not detected and the database is not updated when requested.
HAVING SAID ALL THE ABOVE
I changed the source as you suggested and do you think I can now return the code back to what it was and get it to work as described above
It strikes me that I'm trying to do something in a way that can't be done.
Any suggestions
Glen Harvy
|
|
|
|
|
I am using listview to display an entity called step. I am displaying the Name of the steps in the list and keep the STEP object in each item's TAG.
The listview properties I am setting are,
alignment = Top
View = SmallIcon
After getting the data in the listview, I am using following two lines
lstSteps.Sorting = SortOrder.Ascending;
lstSteps.Sort();
Because of sorting : some items appear in the line of other items rather than all items one below other.
I am sure this is happening only after i apply sorting. Without sorting it is working fine.
Due to some restrictions I cannot apply sort before getting that entity (steps) in ListView
Plz help me
abhijeet
-- modified at 9:20 Wednesday 12th July, 2006
|
|
|
|
|
The SmallIcon view is implicitly multi-column, so if you don't want the items to wrap, set the View to List. The List view only has multiple columns if you explicitly add sub-items.
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi,
View = List is multicolumn too. See this answer[^]. I think it will help you too.
|
|
|
|
|
Hi, i have a situation where i need to make a copy of an existing excel 2003 workbook by "excluding one worksheet", using c#.
Note: I am using .Net 1.1 framework
Plz help me out with this, its very urgent.... Thx in advance.
|
|
|
|
|
Try recording macro in Excel when deleting sheet, and then rewrite this macro code in C#.
My english is bad. Please, correct my errors.
Best regards, Alexey.
|
|
|
|
|
hi, how can i read an xml file and put its elements values on textboxes
Thanks alot
Hamody
|
|
|
|
|
Use XmlDocument and see MSDN about XmlDocument.
for example :
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(@"c:\myfile.xml");
xmlDoc.ChildNodes...... etc.
|
|
|
|
|
thanks a lot for your rapid help,
may u please send me the URL for this sample cause am working now on the project and it has to be done as soon as possible
Thanks alot
Hamody
|
|
|
|
|
See this sample from this forum:
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&mode=all&userid=1957547&select=1569224&df=100&mpp=50&fr=263#xx1569224xx
|
|
|
|
|
My need is when a client request for listening music,instead of streaming ,i want to save that requested file in the client machine & play it using <embed /> tag,the saving of file is done in backside the client will n't know about it,But when i download that file it ll pop up the window for saving or open or cancel,which i don't need,my procedure seems like streaming of the file.
Bibhu Shankar Panigrahi,
Software Developer
|
|
|
|
|
In one of my VB6 Application, I have used MSXML2.ServerXMLHTTP50 Object to send XML message to other application(Tally7.2 Accounting Software) and receive response in XML from it. I communicate it by giving Computer IP address and Port Number of Tally.The Code is
Dim serverHTTP As New MSXML2.ServerXMLHTTP50
ReqListOfCmp = _
"<ENVELOPE>" & _
" <HEADER>" & _
" <TALLYREQUEST>Export Data</TALLYREQUEST>" & _
" </HEADER>" & _
" <BODY>" & _
" <EXPORTDATA>" & _
" <REQUESTDESC>" & _
" <REPORTNAME>List of Companies</REPORTNAME>" & _
" <STATICVARIABLES>" & _
" <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>" & _
" </STATICVARIABLES>" & _
" </REQUESTDESC>" & _
" </EXPORTDATA>" & _
" </BODY>" & _
"</ENVELOPE>"
PortNo = txtPortNo.Text
serverHTTP.Open "POST", "http://localhost:" & PortNo, False
serverHTTP.send ReqListOfCmp
respListOfCmp = serverHTTP.responseText
Problem is That now I want to do the same thing in C#. What class i have to use in place of MSXML2.ServerXMLHTTP50. As I have to communicate using XML over Http with a Non DotNet Application(i.e Tally). I have tried to search with Remoting but as Server is one of the Non-Dotnet application I am not able to do it.
Plz help me , its urgent..................Thanks in Advance
Abhinav
|
|
|
|
|
I have a DataGrid in a web page which displays results. Now I
want to show some string contents instead of numeric values of a field.
For example I have a field "Type" with (0/1) values and I want to show
(Individual/Company) instead of (0/1) numbers.
I'm using C# .NET
Thanks.
|
|
|
|
|
I'm new to C# and now i need help in saving a .doc file with pre-filled information and use bookmarks to update certain aspects of data in that file like address and name, taken from a database.
none
|
|
|
|
|
Is there an easy way in C# to quary all tables from a database and write them to a XML-file (basically turning a database into XML)?
Johan
|
|
|
|
|
If you get get the database into a dataset (which is very highly likely ) then you can use the DataSet.WriteXml function, does exactly what it says on the tin
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
This is only a design thread , its not much of a question , I just want to see what other people think is the right way..
Lets say you have 2 interfaces that have a 1-1 relation to eachother.. those two interfaces that can never be used w/o the other.
(eg in a model view presenter scenario where you have a view interface and a presenter class)
normally when a class might be used by multiple consumers it would be correct to use delegates/events to notify the consumer when something have happened.
however in a 1-1 scenario, you could just as well let them be aware of eachother and simply let them call specific methods in eachother.
What is your take and arguments on this?
I myself consider the last approach the most correct from a business perspective, since it does what it should and result in far less code that is still easy to maintain and have no drawbacks over the event based approach.
but the event based approach somehow still _feels_ like the correct way... maybe because it often is the correct way , but in other scenarios?
ideas and arguments please
http://www.puzzleframework.com
|
|
|
|
|
Can you guarantee that no class in the future would like to be notified of the change? If so then strongly couple them, otherwise you may want to stick with the event approach to allow others in future to subscribe and be notified.
I prefer open approaches that let me hook on functionality later, but I sometimes closely couple classes if im sure its right.
---
How to get answers to your questions[^]
|
|
|
|
|
Keep it simple, if it needs to accomodate more complex scenarios in the future it can be modified. Never go more complicated than necessary. Then again, what's the harm in adding events, even if you don't currently use them? My philosophy anyway... And Kent Beck would likely agree.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I have an array of objects that i want to add to a DataGridView.
The objects have properties Header, Status, Date and Id (that in this case matters).
Now i only want to show Header and Status in the DataGridView, but i still want the whole object to be bound to the row so that i dont loose the identification (Id) to the object in the array.
How do i do this?
R
Johan
|
|
|
|
|
Maybe this artical helps
http://www.codeproject.com/cs/database/BindArrayGrid.asp
Also, if you don't want to show some column in runtime, simply hide it (.Visible = false).
|
|
|
|
|
Hello Sir
I want to know what is a Batch files.
How can it work and how can we make it.
Practic Makes Man Perfect
|
|
|
|
|
Batch files are files in Windows in which you write a batch(sequence) of DOS commands those are executed one by one when you run the batch file. There are also some conditional constructs like if, else for batch files too.
They can be constructed by simply making a notepad or anyother text editor file and changing its extension to .bat. A batch file can be executed by simply clicking on it.
Regards,
Wasif Ehsan.
|
|
|
|
|