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

Make a cell uneditable based on a value in different one

1 Answer 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Erez
Top achievements
Rank 1
Erez asked on 30 Jun 2009, 08:48 AM

Hello,

I have a grid connected to a DataTable.

The grid and datatable both have three columns and three rows.

I want to make a cell in column A uneditable based on a value in a cell in column B
(both cells are in the same row).

I know that I can use BeginningEdit event to cancel an edit attempt in a cell,
however I was wondering if I can reach the same result using XAML trigers
and perhaps just a small relevant class.

Thanks,

Erez

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan Dobrev
Telerik team
answered on 01 Jul 2009, 04:12 PM
Hello Erez,

I have prepared a small example which should handle your scenario. I have created a simple attached behavior that is listening for CellEditEnded event and is enabling/disabling the first cell of the edited row if the last edited cell value is below a predefined value. Everything is done in XAML via a static resource and attached property magic. Hope you will find it useful.

Regards,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Erez
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or