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

GridView GridViewCheckBoxColumn to NOT persist from edit mode

3 Answers 25 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 26 Jun 2012, 11:54 AM
Hello,

I have a GridView which is readonly and a GridViewCheckBoxColumn which is not readonly and the checkbox can be ticked and unticked. However when I tick and untick and update the bound property, the value gets persisted to the data store which I imagine is default behaviour if the cell value (i.e. true or false for a checkbox) is valid. This is no good in my scenario. I need to be able to edit this checkbox and update the bound property but NOT persist to the data store; I will do this later in the code myself. How is this achievable please?

I used the MainGrid_CellValidating event and set IsValid to false but this shows up the red border around the cell which I do not need.

Please help.

Thanks,

Alex

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 Jun 2012, 12:31 PM
Hello Alex,

 As I understand you have a property bound to the GridViewCheckBoxColumn. You would like to have the bound property updated, but not saved to your data store.

If this is the case, then I would suggest you to define a collection to be used for working with the GridView. Then when you are done with all the changes, you could save them to your data store.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Alex
Top achievements
Rank 1
answered on 27 Jun 2012, 01:46 PM
Hello,

I have the ItemSource of the GridView as a collection already and when I check the checkbox the value true is persisted to the data store automatically which I do not want. Is there not a property on the GridView or GridViewCheckBoxColumn which turns off this behaviour?

Thanks,

Alex
0
Dimitrina
Telerik team
answered on 27 Jun 2012, 03:52 PM
Hello,

 I am afraid that the CheckBoxColumn could not do that. 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Alex
Top achievements
Rank 1
Share this question
or