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

Attach RadGridViewCommands.Delete command with hyperlinkbutton in RadGridView

4 Answers 352 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Meetu Singla
Top achievements
Rank 1
Meetu Singla asked on 03 Aug 2010, 06:43 AM
Hi,

I am using a hyperlink button in the first column of RadGridView for deleting the row.

<HyperlinkButton Content="Delete" Command="telerikGrid:RadGridViewCommands.Delete" 
CommandParameter="{Binding ElementName=CasesDiscountGrid}" />

But this is throwing error - "Failed to create a 'System.Windows.Input.ICommand' from the text 'telerikGrid:RadGridViewCommands.Delete'. "
   
This worked fine when I took Telerik:RadButton instead of HyperlinkButton.

Please let me know how I can use Hyperlink with RadGridViewCommands.Delete. 

Thanks.

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 05 Aug 2010, 07:48 AM
Hello Meetu Singla,

Please find attached a sample project which demonstrates how to accomplish this. It's a bit tricky, but I hope you will find it useful.

Kind regards,
Veskoni
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Meetu Singla
Top achievements
Rank 1
answered on 05 Aug 2010, 09:49 AM
Thanks.

When I run the solution provided by you, I found the Delete link is disabled for all the rows. When I implemented it in my solution, Delete link gets disabled there also. With Radbutton this is not happenning.
0
Veselin Vasilev
Telerik team
answered on 05 Aug 2010, 10:06 AM
Hi Meetu Singla,

It looks like disabled because the grid does not have the focus. When you click on the grid, the hyperlink should be enabled and you should be able to click it.

Kind regards,
Veskoni
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sundararajan Mohan
Top achievements
Rank 1
answered on 11 Aug 2010, 12:00 PM
Well, I have the first column of type ToggleColumn [to deiplay RowDetails], and the third column with a HyperLinkButton to delete the row, but it never gets enabled even after highlighting the designated row.

Can you please help me? I followed whatever you have mentioned in the below thread the sample application as well.

Sundar
Tags
GridView
Asked by
Meetu Singla
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Meetu Singla
Top achievements
Rank 1
Sundararajan Mohan
Top achievements
Rank 1
Share this question
or