We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid Hierarchy - Child table dosen't show


Ive created at Hierarchy grid and the grid shows just fine in my .aspx page

But when i press the row to se the child table i get this:

When i debug my code i can see that the ActionResult ChildGrid does return a result

I've hidden the row where the id is for joining but it is passed to the code behind
What am i doing wrong?

My aspx:
   @{ Html.Syncfusion().Grid<DataRow>("GridSrc").Datasource(Model)
               .ChildGrid(child => child.ChildGridTemplate(Html.Syncfusion().Grid<DataRow>("ChildGrid_${JoinId}").Caption("Overblik over hændelser").Mappers(map => map.Action("ChildGrid", new { joinid = "${JoinId}" })).ToChildGridTemplate())).ClientSideEvents(events => { events.OnLoad("hideGridColumn"); }).Render();

My codebehind:
        public ActionResult ChildGrid(PagingParams args, string joinid)
            DataTable table = new DataTable("Hændelser");

            using (SqlConnection sqlCon = new SqlConnection(_sqlConString))
                    string sqlCmdQuery = @"SELECT
                                                Maaned ,
                                                Aar ,
                                                Start_Dato ,
                                                Slut_Dato ,
                                                Type ,
                                                Varighed ,
                                        FROM Statistik.VW_OverblikAlleHaendelser AS VOAH
                                        WHERE VOAH.JoinId = '" + joinid +
                                         "' ORDER BY Start_Dato";
                    SqlCommand sqlCmd;

                    sqlCmd = new SqlCommand(sqlCmdQuery);
                    sqlCmd.Connection = sqlCon;


                    SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCmd);

                catch (Exception exception)

                    if (sqlCon.State == ConnectionState.Open)

            IEnumerable data = table.AsEnumerable().ToList();
            return data.GridActions<DataRow>();




4 Replies

HJ Hariharan J V Syncfusion Team September 30, 2013 10:44 AM UTC

Hi Jacob,

Thanks for using Syncfusion products.

Currently we are analyzing on this issue and we will update you on two business days.

Please let us know if you need any further assistance.

Hariharan J.V.

BM Bala Murugan A.S Syncfusion Team October 3, 2013 12:39 PM UTC

Hi Jacob,


Thanks for your patience.


We suggest you to set datasource for child grid initially to avoid your issue. Please refer the below code snippets.



  .ChildGrid(child =>
                            .Caption("OrderDetails Grid")
                            .Mappers(map =>
                                map.Action("ChildGrid", new { OrderID = "${OrderID}" });



 public ActionResult Index()
            ViewData["data"] = GetTable1(GetTable().Rows[0]["OrderID"].ToString()).AsEnumerable();
            return View(GetTable());


For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.


Sample: DataTable_Hierarchygrid.zip


Could you please check the above sample and let us know if this is helpful.


Please let us know if you need further assistance.



Balamurugan A.S

JS Jacob Saugmann October 4, 2013 09:26 AM UTC


It worked :-)

Thanks you for your help :-)


HJ Hariharan J V Syncfusion Team October 7, 2013 04:41 AM UTC

Hi Jacob,

Thanks for your update.

We are glad to know that your issue has been resolved. Please let us know if you have any other concerns so that we will be happy to help you out.

Hariharan J.V.

Live Chat Icon For mobile
Up arrow icon