This is a migrated thread and some comments may be shown as answers.

Delete Button Not active

3 Answers 47 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 29 Mar 2012, 08:41 PM
I have a GridView with a RadButton in the grid.  When ever I link the command it is disabled, I am trying to add a delete button to let the user delete the row from the database.  I have looked at the examples, but when I ever I try and implement the code the button is disabled. I have CanUsersDeleteRows = "True"

3 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 29 Mar 2012, 09:16 PM
Ok It looks like I got it working.  I had to add .DefaultView to my datatable that is the item source of the grid, any idea what that does differently that would allow the button to be enabled.
0
Pavel Pavlov
Telerik team
answered on 30 Mar 2012, 09:57 AM
Hello Frank,

RadGridView needs the source collection to implement the INotifyCollectionChanged interface in order to enable deleting either by UI or via command.

Regards,
Pavel Pavlov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Frank
Top achievements
Rank 1
answered on 30 Mar 2012, 02:28 PM
Ok I understand that but I just seems odd that you have to declare the use of the .DefaultView, just figured that it was the Default view and it was just redundant to add the .DefaultView to the end of the DataTable.
Tags
GridView
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or