Flexgrid custom row height

Posted by: kisar on 13 June 2018, 4:14 am EST

    • Post Options:
    • Link

    Posted 13 June 2018, 4:14 am EST

    Hi

    can you help me to set a custom height gor the flexgridrow,

    I tried with minheight and maxheigth but nothing has changed.

    Thanx

  • Posted 13 June 2018, 3:30 pm EST

    Hi,

    You can set the row.Height in C1Flexgrid’s LoadedRows event, as follows```

    private void c1FlexGrid1_LoadedRows(object sender, EventArgs e)

    {

    foreach(C1.WPF.FlexGrid.Row rw in c1FlexGrid1.Rows)

    {

    if (rw.Index % 3 == 0)

    {

    rw.Height = 100;

    rw.Background = Brushes.LightBlue;

    }

    else if (rw.Index % 3 == 1)

    {

    rw.Height = 25;

    rw.Background = Brushes.DeepSkyBlue;

    }

    else

    {

    rw.Height = 50;

    rw.Background = Brushes.Blue;

    }

    }

    }

    Thanks,
    Ruchir
  • Posted 14 June 2018, 2:28 pm EST

    i tried but nothing change,

    maybe i need to disable something?

    can you attach me a short full example?

  • Posted 14 June 2018, 3:53 pm EST

    What ComponentOne build version are you using? Also, the sample code not working for you might be due to some other settings of your application. I have attached a simple demo application for your reference with which Row height changed properly at my end using latest version.

    Thanks,

    Ruchir



    rowHeight_FlexGrid.zip

  • Posted 14 June 2018, 7:45 pm EST

    Thanx

    Last version works

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels