How to load gridview in panelbar at runtime.

4 posts, 1 answers
  1. Pradeep
    Pradeep avatar
    8 posts
    Member since:
    Jun 2009

    Posted 14 Jun 2009 Link to this post

    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.
  2. Answer
    Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 18 Jun 2009 Link to this post

    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.
  3. DevCraft banner
  4. Pradeep
    Pradeep avatar
    8 posts
    Member since:
    Jun 2009

    Posted 01 Jul 2009 Link to this post

    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
  5. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 03 Jul 2009 Link to this post

    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.
Back to Top