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

I want to add RadGridView in DocumentWindow

1 Answer 114 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Simon Maystre
Top achievements
Rank 1
Simon Maystre asked on 23 Aug 2011, 01:48 PM
Hi,

I am programatically adding DocumentWindows in RadDock and adding a RadGridView in DocumentWindow but i am getting below error.

unable to cast object type 'Teleriki.WinControls.UI.RadGrdiView' to 'Telerik.WinControls.UI.Docking.RadDock'.

Please suggest any solution for this...

Thanks and Regards,
Simon.
 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Aug 2011, 09:57 AM
Hello Simon,

Thank you for writing.

From the error that you have provided, it seems that somewhere you are trying to cast an object of type RadGridView to RadDock - which is impossible. Here is how you can add a DocumentWindow with RadGridView in RadDock programmatically:
DocumentWindow documentWindow1 = new DocumentWindow();
 radDock1.AddDocument(documentWindow1);
 RadGridView grid = new RadGridView();
 documentWindow1.Controls.Add(grid);

I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.
 
Kind regards,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Dock
Asked by
Simon Maystre
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or