how to add or delete row to the datagrid after clicking a button in silverlight
hi, i am working on silverlight datagrid view, here iam using two buttons one is ADD Row button and one more is REMOVE Row button. after clicking ADD Row button the row should be added to the datagrid, if i click on REMOVE Row button the selected row should removed from the datagrid. how to do this? please someone can help me how to do this using silverlight application
navjyot rautPosted Sep 29, 2011, 6:16 AM
I have created one small application for adding/deleting row to/from silverlight Datagrid.
Hope it will work for you
Regards
Navjyot J. Raut
Pravin MorePosted Sep 23, 2011, 9:06 AM
I hope you are using Observable collection (i.e generic list List
1] so when you click add button create 1 row in list assign values to all column and add that list touple to existing List
2]
when you click remove button you can get selected row and its rownumber then use RemoveAt() method on List
object. suupose your rownumber 4 then listobj.RemoveAt(4)
i hope this will work for you.
Thanx,
Pravin.