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
How to add Rownumbering of Child Bands in Manual on Load Demand
posted

I add this on my Code but it doesnt work : Async Failed

        // Create Container Grid

            ContainerGrid childGrid = new ContainerGrid();

            childGrid.InitializeRow += Child_InitializeeRow;

            e.Row.RowIslands.Add(childGrid);

            // Bind Grid

            childGrid.DataKeyFields = "ChildId";

            childGrid.Level = 1;

            childGrid.DataSource = first;

            childGrid.DataBind();

             childGrid.Behaviors.RowSelectors.RowNumbering = true; //<---I need to enable this one when my child row initializes

Thanks in Regards

Parents
No Data
Reply
  • 49378
    posted

    Hi NewbApps,

    In order to add the RowSelectors behavior when manually loading data, you would first need to first add the behavior on the root band (the behavior itself can be disabled however it should be defined). Subsequently, in your RowIslandsPopulating handler you can enable RowSelectors and RowNumbering on your child grid using:

             RowSelectors selectorBehavior = child.Behaviors.CreateBehavior<RowSelectors>();
            selectorBehavior.Enabled = true;
            selectorBehavior.RowNumbering = true;

           child.DataBind();

    Please let me know if this helps.

     

Children
No Data