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

Delete button "IsEnabled" not observed

1 Answer 59 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 13 Oct 2010, 08:05 PM

The "IsEnabled" property on a delete button appears to be ignored and the delete button is just enabled/disabled based on the "CanUserDeleteRows" gridview property.

I want to be able to disable/enable that button on a row by row basis, I guess the only way is to just create my own command that does the same thing bt not use the built in gridviewcommands.delete?

This is what the col looks like:

 

 

 

 

 

<

 

 

telerik:GridViewColumn>

 

 

 

 

<telerik:GridViewColumn.CellTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<telerik:RadButton Content="Delete" Command="telerik:RadGridViewCommands.Delete" CommandParameter="{Binding}" IsEnabled="{Binding EnableDel}" />

 

 

 

 

</DataTemplate>

 

 

 

 

</telerik:GridViewColumn.CellTemplate>

 

 

 

 

</telerik:GridViewColumn>


I am using the DLLs which were just released at the end of September, so newest stuff I believe.

What is the best/easiest way to dynamically set "IsEnabled" on a delete column?

 

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 18 Oct 2010, 09:16 AM
Hi Kjell,

It would be better to develop your custom logic here so that the RadButton can be enabled/disabled. For example, you may handle its click event and insert the delete-functionality here.
I am sending you a sample project illustrating the proposed solution.
 

All the best,
Maya
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
Tags
GridView
Asked by
Kjell
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or