Print Page | Close Window

inserting data in a datagrid

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2855
Printed Date: 13-May-2026 at 10:41pm


Topic: inserting data in a datagrid
Posted By: tom7254
Subject: inserting data in a datagrid
Date Posted: 31-Jul-2011 at 5:18pm
I am working on the Toure of DevForce Silverligh Part 2. I would like to know if i can add an employee using the datagrid and not the dataform. I would like to use the datagrid like an excel worksheet. 



Replies:
Posted By: robertg
Date Posted: 01-Aug-2011 at 12:39pm

You should be able to do this, certainly. The DataGrid in Silverlight isn't as feature-rich as its WinForms counterpart, though, so what you'd have to do is add a new object of the appropriate sort to the ObservableCollection that your grid is bound to, change your selected item to that item, and add event handlers to handle your changes and trigger an update and save of your entity.

I'm sorry we don't have any samples which show a really dynamic connection between useful UI controls like DataGrid. This is, of course, well outside of Devforce support, but I'll try to find the time to provide something.


Posted By: robertg
Date Posted: 04-Aug-2011 at 5:01pm

Here you go!

 
http://www.ideablade.com/forum/uploads/1097/SilverlightEditInGrid.zip -  
 
uploads/1097/SilverlightEditInGrid.zip
 
 



Print Page | Close Window