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

How to load gridview in panelbar at runtime.

3 Answers 90 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Pradeep
Top achievements
Rank 1
Pradeep asked on 14 Jun 2009, 04:52 PM
HI,
       How to load radgridview in radpanelbar at the runtime.And i want to know how to load the values for that grid in runtime.I got another issue is i wrote the header name in itempanelbar at runtime it is showing correctly but the items in the panelbar is expanding or selecting.I usecode for this is rpb1.items(0).item.text="ABCD".


Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Stanoev
Telerik team
answered on 18 Jun 2009, 12:48 PM
Hello Pradeep,

Here is an example that shows how to create GridView runtime and add it to a RadPanelBar.
Take a look at it and if you have additional questions, let us know.

Greetings,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Pradeep
Top achievements
Rank 1
answered on 01 Jul 2009, 09:19 AM
Hi your sample project is useful thanks for that...In your code you done for one gridview in one panelbaritem in runtime...but i am looking for some more gridviews in remaining panebaritems...i am able to creating the other gridviews in another panelbars i am not getting the unique name for gridviews.The no of panelbaritems is depend on the rows in db.le My requirement is how to name gridviews uniquely in for loop while creating gridviews in panelbaritems.Quick reply is really appreciable
0
Ivan
Telerik team
answered on 03 Jul 2009, 07:01 PM
Hi Pradeep,

In the attached example we have initialized the Name property of the dynamically created grids with a bit modified data from a DB. Note, this way we get a weak uniqueness of the named control and if you need a better one you should try some kind of GUID generation.

All the information about PanelBar items and grids' data is loaded from a collection of business objects. Of course following this pattern you can use any other database.

Please preview the example and let us know if you have more questions.

Regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
PanelBar
Asked by
Pradeep
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Pradeep
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or