Hi Telerik,
I have a nested grid and would like to apply different theme for each child grid. Is it possible to do such thing?
For example:
- the first grid uses Aqua theme
- the 1st child grid uses Desert
- the 2nd child uses Office 2010
Another option is to have different color for each grid.
Regards,
Alep
I have a nested grid and would like to apply different theme for each child grid. Is it possible to do such thing?
For example:
- the first grid uses Aqua theme
- the 1st child grid uses Desert
- the 2nd child uses Office 2010
Another option is to have different color for each grid.
Regards,
Alep
7 Answers, 1 is accepted
0
Hi Alep,
Currently it is not possible to apply a different theme to the child views in RadGridView. In fact, you are the first to request this behavior. Yes, implementing this feature is possible, however it will be not easy, and we doubt that such feature will be user-friendly from usability and design perspective.
You can still change the appearance of child rows by code. You should handle CellFormatting event for example and check whether ViewInfo.ParentRow is not null:
Should you have any other questions, don't hesitate to ask.
Kind regards,
Jack
the Telerik team
Currently it is not possible to apply a different theme to the child views in RadGridView. In fact, you are the first to request this behavior. Yes, implementing this feature is possible, however it will be not easy, and we doubt that such feature will be user-friendly from usability and design perspective.
You can still change the appearance of child rows by code. You should handle CellFormatting event for example and check whether ViewInfo.ParentRow is not null:
void
radGridView1_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.CellElement
is
GridDataCellElement && e.CellElement.ViewInfo.ParentRow !=
null
)
{
e.CellElement.DrawFill =
true
;
e.CellElement.GradientStyle = GradientStyles.Solid;
e.CellElement.BackColor = Color.Lavender;
}
}
Should you have any other questions, don't hesitate to ask.
Kind regards,
Jack
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
Alep
Top achievements
Rank 1
answered on 19 Jul 2010, 11:25 AM
Thanks, that solved my problem.
Another problem, Is it possible to expand one of the row programatically? also What event should I use if I want to loop through the grid rows after setting the data source?
Regards,
Alep
Another problem, Is it possible to expand one of the row programatically? also What event should I use if I want to loop through the grid rows after setting the data source?
Regards,
Alep
0
Hi Alep,
After binding is complete the DataBindingComplete event fires. You can iterate rows in this event. Please consider the sample below:
I hope this helps.
Jack
the Telerik team
You can set the IsExpanded property of the row to expand it programmatically. Here is a sample:
this
.radGridView1.Rows[5].IsExpanded =
true
;
After binding is complete the DataBindingComplete event fires. You can iterate rows in this event. Please consider the sample below:
void
radGridView1_DataBindingComplete(
object
sender, GridViewBindingCompleteEventArgs e)
{
foreach
(GridViewRowInfo row
in
this
.radGridView1.Rows)
{
//..
}
}
I hope this helps.
Kind regards,
Jack
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
Brian
Top achievements
Rank 1
answered on 01 Apr 2011, 02:25 AM
I was looking for the same feature ( applying differing themes to nested grids ) - I have to disagree with the response to this question -> "... and we doubt that such feature will be user-friendly from usability and design perspective. " -- my thoughts are that when using multiple nested grids and they all have the same theme, it is actually difficult for users to easily notice the different grids. Having a different them for child grids would make them much easier to view.
fwiw
b stensrud
fwiw
b stensrud
0
Hello Brian,
Thank you for your feedback. Currently, our theming system does not allow for using different styles for child views. This is not a trivial task and we do not have many requests to implement this feature. Nevertheless, we have it in our backlog and when more people request it, we will raise its priority.
Still, you can customize that way child views look by handling the ViewCellFormatting event. Find more information in this help article and check the samples in our demo application.
In case you have further questions, please feel free to write back.
Greetings,
Jack
the Telerik team
Thank you for your feedback. Currently, our theming system does not allow for using different styles for child views. This is not a trivial task and we do not have many requests to implement this feature. Nevertheless, we have it in our backlog and when more people request it, we will raise its priority.
Still, you can customize that way child views look by handling the ViewCellFormatting event. Find more information in this help article and check the samples in our demo application.
In case you have further questions, please feel free to write back.
Greetings,
Jack
the Telerik team
0
Fanie
Top achievements
Rank 1
answered on 29 Mar 2018, 07:58 AM
I was also looking to change the theme of the child grids, is it still not available?
0
Hello, Fanie,
By design, a certain theme can be applied to the entire control. Hence, you can't have one child template with one theme and another child template with another theme. The already suggested approach to use the ViewCellFormatting event is the appropriate way to customize the different templates according to your custom requirements. Additional information about this event is available in the following help article: https://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
By design, a certain theme can be applied to the entire control. Hence, you can't have one child template with one theme and another child template with another theme. The already suggested approach to use the ViewCellFormatting event is the appropriate way to customize the different templates according to your custom requirements. Additional information about this event is available in the following help article: https://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.