Hi
I have a delete button in each row and I am trying to delete the row when the user clicks the delete button.Can anybody tell me what property I should use so that I can delete the row from the grid and also the from database.
Thanks
ss
Hi,
A row has a method called Remove on it.
But for your particular sample, you can simply it even more using our Row Delete Command
<ig:TemplateColumn Key="Delete">
<ig:TemplateColumn.ItemTemplate>
<DataTemplate>
<Button Content="Delete" >
<igBase:Commanding.Command>
<ig:XamWebGridRowCommandSource CommandType="Delete" EventName="Click"></ig:XamWebGridRowCommandSource>
</igBase:Commanding.Command>
</Button>
</DataTemplate>
</ig:TemplateColumn.ItemTemplate>
</ig:TemplateColumn>
And my xmlns definitions look like:
xmlns:ig="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.XamWebGrid.v9.1"
xmlns:igBase="clr-namespace:Infragistics.Silverlight.Controls;assembly=Infragistics.Silverlight.v9.1"
This will actually update your underlying ItemSource as well. So, you can track changes there, to pass back to your DB. Or just use the Grid's RowDeleted event.
-SteveZ