hello,
we have a RadGridView with some CheckBox columns defines as follows:
I want to enable edit of all those columns in a single click.
I have managed to do so by setting each column with
However, when I try to apply them by style it doesnt work!
my style is defined as follows:
Please help!
Thanks,
Omri.
we have a RadGridView with some CheckBox columns defines as follows:
<
telerik:RadGridView
EditTriggers
=
"CellClick"
ItemsSource
=
"{Binding Tickets"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewCheckBoxColumn
DataMemberBinding
=
"{Binding IsBooked}"
/>
<
telerik:GridViewCheckBoxColumn
DataMemberBinding
=
"{Binding IsTaken}"
/>
<
telerik:GridViewCheckBoxColumn
DataMemberBinding
=
"{Binding IsBusy}"
/>
<
telerik:GridViewCheckBoxColumn
DataMemberBinding
=
"{Binding IsReady}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
I want to enable edit of all those columns in a single click.
I have managed to do so by setting each column with
AutoSelectOnEdit="True" EditTriggers="CellClick"
However, when I try to apply them by style it doesnt work!
my style is defined as follows:
<
Style
TargetType
=
"{x:Type telerik:GridViewCheckBoxColumn}"
>
<
Setter
Property
=
"AutoSelectOnEdit"
Value
=
"True"
/>
<
Setter
Property
=
"EditTriggers"
Value
=
"CellClick"
/>
</
Style
>
Please help!
Thanks,
Omri.
6 Answers, 1 is accepted
0
Hi Omri,
Maya
the Telerik team
Generally, columns are not visual elements and should not define styles for them.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Omri
Top achievements
Rank 1
answered on 05 Feb 2013, 07:04 PM
Hi Maya,
Thank you for your answer. that is ok because as i mention I have found a workaround.
However, does it apply to the cells of the grid as well?
My entire purpose is to enter edit mode, change the value of the checkBox and exit edit mode all by a single click.
I've tried defining an event MouseUp and exit the edit mode in the event handler but it didn't work (I guess for the same reason ...)
Is there any other possible way to do that?
Thanks you,
Omri
Thank you for your answer. that is ok because as i mention I have found a workaround.
However, does it apply to the cells of the grid as well?
My entire purpose is to enter edit mode, change the value of the checkBox and exit edit mode all by a single click.
I've tried defining an event MouseUp and exit the edit mode in the event handler but it didn't work (I guess for the same reason ...)
Is there any other possible way to do that?
Thanks you,
Omri
0
Hi Omri,
Maya
the Telerik team
I am a bit confused. Why do you need to handle events or create style, rather than setting the required properties directly to the column ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Omri
Top achievements
Rank 1
answered on 06 Feb 2013, 08:06 AM
I have no problem setting the required properties directly to the column, I just haven't found what I am looking for.
I'll try to explain it a bit more clearly.
I have RadGridView with multiple checkBox columns.
I want to enable the user to change the value of the checkBox AND exit the edit mode all in a single click.
I have managed to enable changing of CheckBox in a single click by setting
AutoSelectOnEdit="True" EditTriggers="CellClick"
but that leaves the cell in edit mode, so its still not good enough.
How can I achive that by properties or any other way?
Thanks,
Omri
I'll try to explain it a bit more clearly.
I have RadGridView with multiple checkBox columns.
I want to enable the user to change the value of the checkBox AND exit the edit mode all in a single click.
I have managed to enable changing of CheckBox in a single click by setting
AutoSelectOnEdit="True" EditTriggers="CellClick"
but that leaves the cell in edit mode, so its still not good enough.
How can I achive that by properties or any other way?
Thanks,
Omri
0
Accepted
Hi Omri,
Maya
the Telerik team
Could you take a look at this article for a reference ? Does the second suggested approach correspond to your requirements ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Omri
Top achievements
Rank 1
answered on 07 Feb 2013, 03:02 PM
Yes. It helped me solve my problem!
Thank you!
Thank you!