Hello,
I would like to change the color of the horizontal grid lines for selected row and in MouseMove event (remove orange color)
screenshot attached.
Thank you very much.
I would like to change the color of the horizontal grid lines for selected row and in MouseMove event (remove orange color)
screenshot attached.
Thank you very much.
5 Answers, 1 is accepted
0
Hello Samuel,
Thank you for contacting Telerik Support.
In order to change the cell and row border for IsSelected, IsCurrent and HotTracking states, it is necessary to customize the theme by modifying the specific grid CellElement's and GridDataRowElement's repository items for the specific element states via our Visual Style Builder.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for contacting Telerik Support.
In order to change the cell and row border for IsSelected, IsCurrent and HotTracking states, it is necessary to customize the theme by modifying the specific grid CellElement's and GridDataRowElement's repository items for the specific element states via our Visual Style Builder.
You can read more details about using the VisualStyleBuilder here:
1. Loading predefined themes
2. Working with Repository Items
3. Saving and Loading Theme Files
4. Loading Themes from an External File
5. Loading Themes from a Resource
6. Applying Theme to a Control
7. http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kim
Top achievements
Rank 1
answered on 03 Feb 2014, 07:25 PM
I need to prevent the Grid from turning all gray when I disable it. how can i do that?
0
Hello Kim,
Thank you for contacting Telerik Support.
When you set the GridViewElement.Enabled property to false, you should set the UseDefaultDisabledPaint property to false as well, in order to prevent the grid from coloring in gray:
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for contacting Telerik Support.
When you set the GridViewElement.Enabled property to false, you should set the UseDefaultDisabledPaint property to false as well, in order to prevent the grid from coloring in gray:
public
Form1()
{
InitializeComponent();
this
.radGridView1.GridViewElement.Enabled =
false
;
this
.radGridView1.GridViewElement.UseDefaultDisabledPaint =
false
;
}
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kim
Top achievements
Rank 1
answered on 05 Feb 2014, 04:51 PM
Thanks for your reply, When I use;
this.radGridView1.GridViewElement.Enabled = false
the user can still select a different row, and the row highlight disappears.
What I want to be able to do is prevent the grid form receiving any user input, but not change its visual appearance.
this.radGridView1.GridViewElement.Enabled = false
the user can still select a different row, and the row highlight disappears.
What I want to be able to do is prevent the grid form receiving any user input, but not change its visual appearance.
0
Hello Kim,
Thank you for writing back.
In order to keep the normal visual representation of the RadGridView, but disabled its selection changing, sorting, grouping, editing functionalities, etc. it is necessary to stop them manually. One sample approach is introduced below:
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
Thank you for writing back.
In order to keep the normal visual representation of the RadGridView, but disabled its selection changing, sorting, grouping, editing functionalities, etc. it is necessary to stop them manually. One sample approach is introduced below:
public
Form1()
{
InitializeComponent();
BaseGridBehavior gridBehavior =
this
.radGridView1.GridBehavior
as
BaseGridBehavior;
gridBehavior.UnregisterBehavior(
typeof
(GridViewDataRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewNewRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewGroupRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewFilteringRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewTableHeaderRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewHierarchyRowInfo));
gridBehavior.UnregisterBehavior(
typeof
(GridViewDetailsRowInfo));
this
.radGridView1.ReadOnly =
true
;
this
.radGridView1.EnableHotTracking =
false
;
this
.radGridView1.AllowRowResize =
false
;
this
.radGridView1.CurrentRowChanging += radGridView1_CurrentRowChanging;
}
private
void
radGridView1_CurrentRowChanging(
object
sender, CurrentRowChangingEventArgs e)
{
e.Cancel =
true
;
}
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).