FlexGrid Row Caption Problem

Posted by: moridi on 17 August 2018, 5:33 am EST

  • Posted 17 August 2018, 5:33 am EST

    I don't know how i can assign a field of datatable as row caption.

    now after set Datasource do like this.

    for (int i = 0; i < Rows.Count; i++)
    if (Rows[i].DataSource != null)
    Rows[i].Caption = ((DataRowView)Rows[i].DataSource).Row.ItemArray[1].ToString();

    I need show a field value as row caption, this method is a bit slow.
    I forgot to day I need Merge the caption too.

  • Replied 19 August 2018, 4:51 pm EST


    There is no method to directly set Row Caption for the Grid. The code you've posted is currently the best way to do this.

  • Replied 20 August 2018, 5:05 am EST

    Thanks but it is slow when we have a lot of row in datasource
    I show the 50,000 record in grid it's have good speed but for caption make 3-4 times more.

  • Replied 21 August 2018, 2:38 pm EST


    You can set your DataTable as DataSource for the grid, and set the style of the column having Row Caption field to Fixed style to make it look like a Fixed column.

    You can refer to the attached sample which makes column "OrderID" as fixed column and uses merging on that column.

Need extra support?

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

Learn More

Forum Channels