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
8920
removing add behaviour in one child grid of the band
posted

Attached a site it has two band hierarchical grid, second band  has 'add' behavior added.  Can you show how to remove this behavior for the first parent row only ( the one with 'Net Trade01' in first column. so all child grid will have add row functionality except the one under the first row.

Thanks.

whdg_2bandsGrid_format_1row.rar
Parents
No Data
Reply
  • 8736
    posted

    Hello mcseidel,

    Based on my understanding, you want to implement column moving behavior except first row island. If this is the case I would recommend you to add the behavior in code behind( not in markup) on rowisland bases as shown below:

    if (!IsPostBack)

    {

    CreateDataSource();

    var wh=this.whdg.Behaviors.CreateBehavior<Infragistics.Web.UI.GridControls.ColumnMoving>();

    foreach (ContainerGridRecord rec in this.whdg.GridView.Rows) {

     if (rec.Index == 0) { rec.RowIslands[0].Behaviors.Remove(wh); }

     else { rec.RowIslands[0].Behaviors.Add(wh); } } }

    I have also attached modified sample.

    I hope this helps.

    whdg_2bandsGrid_format_1row_mod.zip
Children