This is a migrated thread and some comments may be shown as answers.

WPF look for GridView

5 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 28 Dec 2008, 12:44 PM
Hello

How can I set WPF Look of GridView while runtime ?

I have set DataSource like:

this

.radGridView1.DataSource = local_DataSet.Tables[0];

I like to have the same look like the Grouping sample.

Thanks and best regards
Frank Uray

 

5 Answers, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 29 Dec 2008, 03:02 PM
Hello Frank,

The theme that is used in the Grouping example is named "VistaTelerik".
The easiest way to get access to it is to drop a MiscellaneousTheme component on your form.
Then you can set the theme using the properties panel for RadGridView in VS designer or with code like bellow:
this.radGridView1.ThemeName = "VistaTelerik"


Regards,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Frank
Top achievements
Rank 1
answered on 29 Dec 2008, 05:49 PM
Hi Jordan

Thank you for your answer.

This does not help ... I also have seen in the VS designer,
there is no theme called "VistaTelerik". There I have one called
just "Vista".

Do you know why this is happend ??

Thanks and best regards
Frank Uray
0
Jordan
Telerik team
answered on 30 Dec 2008, 09:58 AM
Hello Frank,

That is interesting. Here is a simple list to help you troubleshoot that missing theme.

Basically, to have this theme applied you need three things:
1. have a reference to the Telerik.WinControls.Themes.Miscellaneous assembly that contains the theme
2. instantiate an instance of the MiscellaneousTheme class (see code bellow)
3. set the ThemeName property (see code bellow)

Here is an example how to do this with code:
public Form1() 
        { 
            InitializeComponent(); 
 
            new Telerik.WinControls.Themes.MiscellaneousTheme(); 
            this.radGridView1.ThemeName = "VistaTelerik"
        } 
 

If you have done this using the Visual Studio designer you should have similar code in the designer-generated code for your form.

Kind regards,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Frank
Top achievements
Rank 1
answered on 02 Jan 2009, 04:50 PM
Hi Jordan

Sorry, but it still does not work ...

I do not have "MiscellaneousTheme" in "Telerik.WinControls.Themes" ...
Did I download the wrong component ??

When I set the theme like "this.radGridView1.ThemeName = "VistaTelerik"; ",
I get a white GridView ...

Do you have any more ideas ??

Thanks and best regards
Frank Uray
0
Jordan
Telerik team
answered on 05 Jan 2009, 01:33 PM
Hi Frank,

After you install RadControls for WinForms you should have the Telerik.WinControls.Themes.Miscellaneous.dll assembly in the bin sub-folder of the install folder of the product (for example: C:\Program Files\Telerik\RadControls for WindowsForms 8.1.0.0\bin) and also in the GAC (which you can view by opening the C:\Windows\assembly folder with Windows Explorer).
If that assembly is not in these two places then you may have installed a very old version of RadControls for WinForms or your installation is not complete due to some error during the install process.

Regards,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Frank
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Frank
Top achievements
Rank 1
Share this question
or