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

Rad grid

5 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gayatri
Top achievements
Rank 1
Gayatri asked on 31 Mar 2009, 06:30 AM
Hi,

    I am using rad grid in my application. I wanted to create a hierarchical rad grid where the no of levels of hierarchy will be known only at the runtime. The datasource for each detailsTable is generated in runtime. (Example can be that of a grid based on FileSystem (grid will display all subfolders in the current folder and so on) where the level of hierarchy will depend upon the subfolders present in a particular folder). Please help me with an example of how this could be achieved.

Thanks
Gayatri

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Apr 2009, 10:17 AM
Hello Gayatri,

When defining the structure of a hierarchical grid you should follow these rules:

            - Create the GridTableView objects for every detail table. You do not need to create an object for the MasterTableView of the grid, as this is created automatically when the RadGrid itself is created. 
            - Add each detail table to the DetailTables collection of its parent table. 
            - Ensure that each table in the grid has its own data source.
 
Additionally, note that the hierarchical structure is not supported with simple data-binding (calling DataBind()). 

The Basic steps that you need to follow in order to create hierarchical RadGrid programmatically in the code-behind are shown in the following help article:
Programmatic creation

I hope this information helps.

Kind regards,

 

Pavlina

 

the Telerik team


Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Gayatri
Top achievements
Rank 1
answered on 01 Apr 2009, 10:25 AM
Hi,

   Thanks for the prompt response.I have gone through the url which you have provided. But my requirement is to display the folders from a file system with the created date. There might be "n" number of sub folders inside a folder. I need to bind them at runtime dynamically. I have done the steps which you have suggested. Please share me a working example to proceed further.

Thanks
Gayatri
0
Pavlina
Telerik team
answered on 01 Apr 2009, 03:13 PM
Hello Gayatri,

I was not able to reproduce the problem and kindly ask you to open a formal support ticket and send me a small runnable application with the issue further isolated. As soon as I test it I will get back to you with additional information.

Looking forward for your reply.

Regards,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Gayatri
Top achievements
Rank 1
answered on 03 Apr 2009, 01:37 PM
Hi,

 Can u please share me any code sample for the dynamic hierarchial grid, where the number of rows will be known at runtime. Since i am running my code in Moss 2007. Everything works fine if i define the rows statically. but i wanted to create it dynamically. I have followed the steps from your reference url.I have to create the rows in the grid dynamically and also the sub level under it if exists. Please help me out.


Thanks
Gayatri
0
Pavlina
Telerik team
answered on 06 Apr 2009, 03:31 PM
Hello Gayatri,

I am sending you a small runnable application which handles the desired functionality. Give it a try and let me know if you have other questions or problems.

I hope this helps.

Regards,
Pavlina
the Telerik team

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