I am trying to display gridlines in the Detail View of a ListView control. I am currently using the VisualStudio2012Dark theme and it does not show the gridlines that separate each row. I have watched several of your webinars on the themebuilder but cannot figure out how to modify the theme to have gridlines.
Thanks
Thanks
5 Answers, 1 is accepted
0
Hello Adam,
Thank you for contacting Telerik Support.
You should edit the VisualStudio2012Dark theme in order to achieve the desired view. It is necessary to change the border color of DetailListViewDataCellElement. Please follow the steps:
You can read more details about using the VisualStyleBuilder here:
After customizing the already existing theme I have used the following code snippet to obtain the design from the attached picture:
I hope this information helps. Please let me know if I can assist you any further with this service request. Thank you in advance.
Regards, Desislava
Telerik
Thank you for contacting Telerik Support.
You should edit the VisualStudio2012Dark theme in order to achieve the desired view. It is necessary to change the border color of DetailListViewDataCellElement. Please follow the steps:
- Open VisualStyleBuilder, which comes with RadControls for WinForms
- Open the "File" menu
- Click "Export Build-in Themes"
- Then open the theme you want to edit with the "Open package" button
You can read more details about using the VisualStyleBuilder here:
- Loading predefined themes
- Working with Repository Items
- Saving and Loading Theme Files
- Loading Themes from an External File
- Loading Themes from a Resource
- Applying Theme to a Control
- http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010
After customizing the already existing theme I have used the following code snippet to obtain the design from the attached picture:
public
Form1()
{
InitializeComponent();
List<Item> dataItems =
new
List<Item>
{
new
Item(
"First"
,
"Some description"
, DateTime.Now),
new
Item(
"Second"
,
"Some description"
, DateTime.Now),
new
Item(
"Third"
,
"Some description"
, DateTime.Now),
new
Item(
"Fourth"
,
"Some description"
, DateTime.Now),
new
Item(
"Fifth"
,
"Some description"
, DateTime.Now),
new
Item(
"Sixth"
,
"Some description"
, DateTime.Now),
new
Item(
"Seventh"
,
"Some description"
, DateTime.Now),
};
this
.radListView1.DataSource = dataItems;
ThemeResolutionService.LoadPackageFile(@
"C:\Users\yordanova\Desktop\themes\VisualStudio2012DarkNew.tssp"
);
this
.radListView1.ThemeName =
"VisualStudio2012DarkNew"
;
}
}
public
class
Item
{
public
string
Name {
get
;
set
; }
public
string
Description {
get
;
set
; }
public
DateTime Date {
get
;
set
; }
public
Item(
string
name,
string
description, DateTime date)
{
this
.Name = name;
this
.Description = description;
this
.Date = date;
}
}
I hope this information helps. Please let me know if I can assist you any further with this service request. Thank you in advance.
Regards, Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC 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
Adam
Top achievements
Rank 1
answered on 26 Jul 2013, 09:43 PM
Thanks for the quick response. I have exported the file and reopened it in VisualStyleBuilder however I am having a hard time finding the DetailListViewDataCellElement you were referring too. I watched the video but it really only covered using the Repository but now how to find specific elements and change their color.
Thanks,
Adam
Thanks,
Adam
0
Hello Adam,
Thank you for writing back.
The appropriate way to find the specific elements easily is to use ControlSpy (Visual Style Builder -> Tools -> Show Spy). Thus you can test whether changing the color of a given element is the right one.
To your question on the element you are unable to find. There are several controls that offer several different views e.g. RadPageView (strip, explorer bar, stack, outlook). RadListView offers several views as well (Simple, Details, Icons). These views are build with different elements which cannot exist at the same time in the control. That is why you need to change the view of the control. To do that right-click on the control in the Element tree of VSB and select the appropriate view. I am attaching a screen shot for your convenience.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards, Desislava
Telerik
Thank you for writing back.
The appropriate way to find the specific elements easily is to use ControlSpy (Visual Style Builder -> Tools -> Show Spy). Thus you can test whether changing the color of a given element is the right one.
To your question on the element you are unable to find. There are several controls that offer several different views e.g. RadPageView (strip, explorer bar, stack, outlook). RadListView offers several views as well (Simple, Details, Icons). These views are build with different elements which cannot exist at the same time in the control. That is why you need to change the view of the control. To do that right-click on the control in the Element tree of VSB and select the appropriate view. I am attaching a screen shot for your convenience.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards, Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC 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
Adam
Top achievements
Rank 1
answered on 31 Jul 2013, 06:06 PM
I am still having issues. I have used the ControlSpy to locate the DetailListViewDataCellElement and I have changed its border color and nothing shows up in the Preview Box of the Visual Style Builder. I have attached some screenshots to show the change. Please let me know if I am changing the correct values or not.
Thanks
Thanks
0
Hello Adam,
Thank you for writing back.
Please find the attached video (drag and drop over the browser to play) demonstrating how to achieve the desired border of RadListView rows.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for writing back.
Please find the attached video (drag and drop over the browser to play) demonstrating how to achieve the desired border of RadListView rows.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC 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 >>