3 Answers, 1 is accepted
0
Hi Aleksandr,
Thank you for writing.
To do that you should set the grid SelectionMode to CellSelect, and the just select the desired cells:
I hope this helps.
Regards,
Stefan
Telerik
Thank you for writing.
To do that you should set the grid SelectionMode to CellSelect, and the just select the desired cells:
radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
foreach
(GridViewRowInfo row
in
radGridView1.Rows)
{
row.Cells[
"MyColumn"
].IsSelected =
true
;
}
I hope this helps.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Aleksandr
Top achievements
Rank 1
answered on 19 May 2014, 09:28 AM
Thank you. But when I click on some cell then highlighted cells lose their selection.
I need 'today' column to be highlighted all the time, maybe by changing its cells border. Can you help me, please?
I need 'today' column to be highlighted all the time, maybe by changing its cells border. Can you help me, please?
0
Hello and thank you for the clarification.
In this case you should use the formatting events of RadGridView. Here is a small sample
Similarly, you can introduce any modification you want. Here you can find more information about the formatting events: http://www.telerik.com/help/winforms/gridview-cells-formatting-cells.html.
I hope that you find this information useful.
Regards,
Stefan
Telerik
In this case you should use the formatting events of RadGridView. Here is a small sample
void
radGridView1_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.Column.Name ==
"DecimalColumn"
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.BackColor = Color.Red;
}
else
{
e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
}
}
Similarly, you can introduce any modification you want. Here you can find more information about the formatting events: http://www.telerik.com/help/winforms/gridview-cells-formatting-cells.html.
I hope that you find this information useful.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.