Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
Get DataKey on Child using Manual Load On Demand on multiple Bands c#
posted

 

      protected void WebHierarchicalDataGrid1_RowIslandsPopulating(object sender,     ContainerRowCancelEventArgs e)

        {

                        //Cancel the default automatic load on demand operation

                        e.Cancel = true;

 

                        // Get the data key

                        int key = (int)e.Row.DataKey[0];

 

                        _itemClass.MyItemReqId = key;

                        var first = _itemClass.MyItemReqDetailQByItemReqIdRead();

 

                        // Create Container Grid

                        ContainerGrid childGrid = new ContainerGrid();

                        e.Row.RowIslands.Add(childGrid);

 

                        // Bind Grid

                        childGrid.DataSource = first;

                        childGrid.DataBind();

 

                    //-------------------------------------------//  

 

                    _itemClass.MyItemReqDetailId = //HOW TO GET KEY From first ?

                    var second = _itemClass.MyErploctransByItemReqDetailIdRead();

                    ContainerGrid child1 = new ContainerGrid();

                    child1.InitializeRow += Child1_InitializeeRow;

                    e.Row.RowIslands[0].Rows[0].RowIslands.Add(child1);

                    child1.DataSource = second;

                    child1.DataBind();

 

    }

Now i am stack to the next step getting the key on the Child and use it to load the child detail band.

Thanks in Regards