Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datagrid conrol and want to insert rows and columns at the click event of a button as well as want to delete a particular rows at the click event...
Posted

The easiest way is make your collection an ObservableCollection (and possibly INotifyCollectionChanged), and the items derived from INotifyPropertyChanged. With some minor additional code in the collection and data items, all you would have to do is bind the collection to the datagrid and the datagrid will wake care of itself.

You can find more detailed answers and examples if you just cave in and use google.
 
Share this answer
 
You have posted 3-4 question on the similar line with slight modifications. They are basic operations and one should be able to do it after going through beginner knowledge.

I would suggest you to read and run sample projects available on net before starting to code.

Start from here: Insert, Update and Delete in Silverlight DataGrid using ADO.NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900