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

[Solved] problem with child grid view

5 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nitin b
Top achievements
Rank 1
nitin b asked on 02 Mar 2010, 09:22 PM
I have problem with child grid view. when i click on [+] in grid view the record is showing properly .. but after clicking [-]
again [+] at that time first row disapper with childgrid view. it is only happen with first row.
rest of the rows are working properly.

Please see attached file.

Please let me know.

thanks in advance.

Nit

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Mar 2010, 10:11 AM
Hi Nitin,

Could you please confirm that you are not using simple binding with DataBind() calls to populate your hierarchy grid?

Note that hierarchical structure is not supported with Simple data binding. For advanced features like hierarchy presentation the RadGrid control requires advanced data-binding through its NeedDataSource event or a data source control.

More information is available here:
http://www.telerik.com/help/aspnet-ajax/grdadvanceddatabinding.html
http://www.telerik.com/help/aspnet-ajax/grddeclarativedatasource.html

Regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
nitin b
Top achievements
Rank 1
answered on 03 Mar 2010, 01:55 PM
   GridViewTemplate childTmpt = new GridViewTemplate();
            try
            {
                rgdView.BeginEdit();
                rgdView.GridElement.BeginUpdate();
                rgdView.MasterGridViewTemplate.ChildGridViewTemplates.Clear();
                rgdView.Relations.Clear();
                using (DataSet dsTmp = test.loadChild())
                {
                    childTmpt.DataSource = dsTmp.Tables[0];
                    childTmpt.AllowAddNewRow = false;
                    childTmpt.AllowEditRow = false;
                    //childTmpt.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
                    childTmpt.AllowColumnResize = true;
                    rgdView.MasterGridViewTemplate.ChildGridViewTemplates.Add(childTmpt);      


I am using above code. Please let me know if i am doing anything wrong
0
Pavlina
Telerik team
answered on 04 Mar 2010, 09:35 AM
Hi Nitin,

Could you please confirm that you are using the RadGrid control for ASP.NET AJAX in your application?

Regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
nitin b
Top achievements
Rank 1
answered on 04 Mar 2010, 05:54 PM
YES. Pavlina

I am using RadGrid control for ASP.NET AJAX. and I am adding dynamically(Runtime).

Please help me. I am still waiting for your reply. or give me any example.

thank you.
Nitin
0
Pavlina
Telerik team
answered on 09 Mar 2010, 08:46 AM
Hello Nitin,

Please follow the instructions from the articles below, for more information about the basic steps that you need to follow in order to create hierarchical RadGrid programmatically in the code-behind:
Programmatic creation
Creating Hierarchy Programmatically

I hope this helps.

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
nitin b
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
nitin b
Top achievements
Rank 1
Share this question
or