Archived Months
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
all groups > dotnet windows forms databinding > recent posts

Simple Property binding Question.
Posted by Chazz at 4/22/2008 10:12:50 PM
Hi, I have a very simple situation. I have class with a property that returns an Interface type. For example: class Person { public IPersonName Name { get{return name;} } public PersonName RealName { get {return name as PersonName;} } } Th...more >>


Changing a One-To-Many form to a One-To-One Form
Posted by Terry at 4/17/2008 6:43:42 AM
Microsoft has a 5 minute video showing how to create a one-to-many form using drag and drop controls from the Data Sources window. (http://msdn2.microsoft.com/en-us/vbasic/bb643827.aspx). I=92m trying to create almost the exact same form, except for one small change. Instead of dragging the man...more >>

Re: Supress BindingSource/DataGridView SelectionChanged on new DataSou
Posted by scott@lloydsoftware.com at 4/11/2008 4:05:49 PM
Jim, the solution to your problem is this: Handle the LeftMouseButtonUp event and check to see if the following two conditions are true: - the e.Handled parameter passed to your routed event handler is false - the grid's SelectedItem is null You can do something similar to for if the user pre...more >>

PerformanceCounterCategory.Create() takes 3 minutes to add a new category!! How come? What can cause this?
Posted by DR at 4/10/2008 12:26:09 PM
PerformanceCounterCategory.Create() takes 3 minutes to add a new category!! How come? What can cause this? ...more >>

Binding to a datagrid on another form
Posted by thewanz at 4/10/2008 11:58:00 AM
I would like to take the values from the cells in a selected row of a datagrid on one form and display it in a separate form for editing. How could I bind the textboxes of the second form (form2) to the DataGridView.SelectedCells[i].Value on the first form (form1)?...more >>

Converting a DataColumn's Datatype on the fly Options
Posted by kalamantina at 4/10/2008 10:38:47 AM
Hi everyone, I have one dataset that gets built dynamically from XML, I parse a large soap message and extract the schema from XML( I am working in .NET 1.0, sorry for the pain). anyway, by default the dataset resutling from this process has a data type of string for all columns. My question is...more >>

Hide data object property
Posted by Rick at 4/10/2008 8:18:34 AM
VS2005 pro The short question is this: How do I hide public properties of my class from binding in a datagrid for example. Setting <Browsable(false)> will not work since I have to bind to these properties in some win forms. In need the property available when binding, but not to display in ...more >>

Re: Using a VB6 data control ?
Posted by Scott M. at 4/7/2008 5:27:45 PM
I've got to ask, why in the world would you want to use DAO and the Data Control?! To me that just sounds like throwing out my calculator and using an abacus. "Scotty" <matthieu.sarthou@googlemail.com> wrote in message news:cbb0be9e-75e9-436d-b3d9-748f95762065@s50g2000hsb.googlegroups.co...more >>



Re: DataBinding in .Net 1.1, did it exist? If so, how does it work?
Posted by Bob Powell [MVP] at 3/31/2008 5:48:49 PM
Databinding has existed since the first version of .Net. PropertyGrid isn't a true databound control in the same sense that DataGridView is for example. As a consequence it doesn't use the INotifyPropertyChanged or <property>Changed events exposed by various objects. PropertyGrid needs to...more >>

DataBinding in .Net 1.1, did it exist? If so, how does it work?
Posted by Cartoper at 3/31/2008 8:06:58 AM
I have used data binding in .Net 2.0 and love it, from what I understand what I used in 2.0 was new. Today I am working with .Net 1.1 and wondering how to wire things up correctly... There is a PropertyGrid that has had it's SelectedObject set to a data class. From time to time the values of...more >>

Combobox - Trouble displaying second table value
Posted by sheilakay at 3/27/2008 11:24:02 AM
I hope someone can help me. I have 2 tables, school master and school type with school type being a subset of school master. I want to load the school master record into a form and have the school type be a drop down box showing the description from the school type table. I have done th...more >>

Re: LINQ: Sending updates from DataGridView to database?
Posted by Linda Liu (CS&S) at 3/24/2008 7:08:07 PM
Hi Jakob, The Attach/AttachAll method is usually used in the scenario where the entity objects are serialized to client over a network and detached from their data context and the clients require to update or delete data. Note that only call the Attach methods on new or deserialized entiti...more >>

RE: DataGridView bound to object: Operation is not valid due to the current state of the object.
Posted by bkwdesign at 3/24/2008 10:58:52 AM
I wanted to echo thanks back to luca semprini for her above code snippet which solved my woes for my DataGridView which was bound to a BindingSource. Before I found this blog, my WinForm was throwing "Operation is not valid.." errors if you tried to jump too much around my datagrid with a mouse cli...more >>

Re: LINQ: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/24/2008 4:45:01 AM
Thanks for your extensive answer. I think I am slowly grasping the concept of the LINQ-to-SQL object. Probably it is best not to force the concept to do what it is not intended to. I guess the problem is to get rid of old thinking from datasets and realize that this is something totally diff...more >>

data binding a collection onto a canvas
Posted by Steve Mills at 3/22/2008 9:36:41 PM
I have an ObservableCollection of objects that encode a reference to an image with left, top, width, and height. I want to data bind them onto a Canvas in a WPF Window. What I've tried uses: <DataTemplate x:Key="ImageTemplate"> <Image Source="{Binding Path=Key, Converter={St...more >>

Re: LINQ: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/19/2008 3:16:04 AM
Thanks Marc for your answer. Your suggestion sounds very promising!!! I didn't find the Attach method before, but it might be the missing piece in my puzzle. When I read the documentation I found that a timestamp column was recommended so I added one to my table and then tried the following...more >>

Re: LINQ: Sending updates from DataGridView to database?
Posted by Marc Gravell at 3/18/2008 2:17:36 PM
You can always obtain the item you want (Dispose() and throw away the original context) - work with the object for a while (update properties etc); now when you want to save, create a new context and use Attach (on the relevant table) to tell this context about your snapshot object. Now Subm...more >>

Re: some new languages
Posted by Tom Dacon at 3/18/2008 8:31:00 AM
Troll ...more >>

RE: LINQ: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/18/2008 6:54:00 AM
I tried the approach with a global singleton datacontext object. It works but I am a bit hesitant as I don't have full control as to what objects are actually submitted to database when I call SubmitChanges. A possible scenario is this: I have a form with Customers. For each customer there i...more >>

some new languages
Posted by davidboon28@gmail.com at 3/18/2008 6:38:07 AM
http://comp-languages.blogspot.com http://computer-language-tutorials.blogspot.com...more >>

RE: LINQ: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/18/2008 1:06:02 AM
Thanks for your extensive answer!! It did clarify the picture. I also read parts of the article but I still have one missing piece in my understanding. If I use LINQ-to-SQL and bind resulting entity classes/collections to my forms in controls like DataGridView, how should I send the updates...more >>

RE: LINQ: Sending updates from DataGridView to database?
Posted by v-lliu@online.microsoft.com at 3/14/2008 8:53:51 AM
Hi Jakob, Thank you for your prompt response! > I thought LINQ could be used to map data all the way from database to GUI. In your example you use dataset as the foundation and just use LINQ to do some manipulation of the data. The feature of LINQ that you understand is called LINQ to S...more >>

Re: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/12/2008 1:50:04 PM
The example I assumed is a detached data collection shown in a DataGridView. How can I get changes back to the database by using a LINQ-to-SQL layer?...more >>

RE: LINQ: Sending updates from DataGridView to database?
Posted by Jakob Lithner at 3/12/2008 1:48:00 PM
I have no decided design yet, I am just trying to use LINQ the best way. I thought LINQ could be used to map data all the way from database to GUI. In your example you use dataset as the foundation and just use LINQ to do some manipulation of the data. Does this mean LINQ produced collections...more >>

Re: Supress BindingSource/DataGridView SelectionChanged on new Dat
Posted by Jim Parsells at 3/12/2008 1:16:00 PM
To be fair, I will note that using a combination of a flag and checking to see if the underlying data element has REALLY changed actually reduces the problem to almost manageable levels. However, there is a remaining hangup. Specifically, if there is only one item in the List(Of myclass), it i...more >>

Re: Supress BindingSource/DataGridView SelectionChanged on new Dat
Posted by Jim Parsells at 3/12/2008 1:04:01 PM
Did you notice that I said that ResetBindings causes multiple events to be raised? The point here is that if a single ResetBindings causes multiple, and not identical, numbers of events (1 this time, 3 the next, 4 the next, 1 the next), I have nothing to depend on to stop ignoring the events....more >>

Re: Supress BindingSource/DataGridView SelectionChanged on new DataSou
Posted by Marc Gravell at 3/12/2008 8:17:10 AM
Why not simply set a flag while you call ResetBindings()? Marc ...more >>

Re: Sending updates from DataGridView to database?
Posted by Marc Gravell at 3/12/2008 8:14:53 AM
I'm assuming you mean LINQ-to-SQL, and that you aren't using a custom projection. Such objects are tracked by the DataContext; if you're context is still alive, you should just be able to call yourContext.SubmitChanges(); ? Marc ...more >>

RE: LINQ: Sending updates from DataGridView to database?
Posted by v-lliu@online.microsoft.com at 3/12/2008 8:07:23 AM
Hi Jakob, Based on my understanding, in your application you load data from DB into a DataSet and use LINQ to do some query on top of this DataSet. Then you bind the result of the LINQ query through a BindingSource component to a DataGridView on the form. Your question is how to save update...more >>

buy ampicillin protocol penicillin buy ampicillin buy ampicillin dosing buy ampicillin buy ampicillin crystals penicillin buy ampicillin buy ampicilli
Posted by Clint Eastwood at 3/12/2008 4:59:45 AM
buy ampicillin protocol penicillin buy ampicillin buy ampicillin dosing buy ampicillin buy ampicillin crystals penicillin buy ampicillin buy ampicillin 250 mg buy ampicillin and cefotaxime dose of buy ampicillin 1000x buy ampicillin penicillin buy ampicillin buy ampicillin sublactam buy ...more >>


DevelopmentNow Blog