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

[Solved] How to put a cell in readonly

5 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Juan Camilo zapata
Top achievements
Rank 1
Juan Camilo zapata asked on 25 Feb 2010, 10:41 PM
Hi everyone, i have a question, is that i have a grid and in a column there is a checkbox, in other column there is other type of data, let say an string, the two columns are editable, but i want that when i uncheck the checkbox of some row, the cell that contains strings that is in the same row of the uncheck element, is set to readonly. I am doing this in the method CellEditEnded, i call the column that have the cell that i want to put in readonly, calling the "GridViewCellEditEndedEventArgs e" and if e.Cell.Column.UniqueName == "column of strings", but ofcourse i only got the entire column and a want to refer to a cell.Someone that can give me a answer, thanks

5 Answers, 1 is accepted

Sort by
0
Juan Camilo zapata
Top achievements
Rank 1
answered on 01 Mar 2010, 12:20 PM
Someone?????
0
Stefan Dobrev
Telerik team
answered on 01 Mar 2010, 02:27 PM
Hello Juan,

The readonly behavior can be defined on each column or the RadGridView itself. You cannot set a specific cell to be readonly out of the box. However you can use BeginningEdit event of RadGridView to implement your custom behavior.

Sincerely yours,
Stefan Dobrev
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
Juan Camilo zapata
Top achievements
Rank 1
answered on 01 Mar 2010, 04:07 PM
Hi Stefan, thanks for the answer, you can give me an example to see it better, cuz i was doing what you tell me, but the only that i get, is put a entire row in readonly, and that is not what i want. Thanks
0
Accepted
Stefan Dobrev
Telerik team
answered on 04 Mar 2010, 09:20 PM
Hello Juan,

Please find attached a sample solution, which illustrates the approach I was talking about.

Hope this helps,
Stefan Dobrev
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
Juan Camilo zapata
Top achievements
Rank 1
answered on 07 Mar 2010, 05:06 PM
Thanks Stefan, this helped me so much.
Tags
GridView
Asked by
Juan Camilo zapata
Top achievements
Rank 1
Answers by
Juan Camilo zapata
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or