[CLOSED] Group columns in Razor

  1. #1

    [CLOSED] Group columns in Razor

    Hopefully a quick question:

    How can I change the Group Header Text based on data in the recordset? Basically, I have a pivot table coming back from SQL and need to change the group headings on the grid.

    Thanks,
    Amit
    Last edited by Daniil; Aug 15, 2013 at 10:34 AM. Reason: [CLOSED]
  2. #2
    Hi Amit,

    You can access all the Columns via a view's headerCt and change its text by a setText call.

    For example, if run this script
    App.GridPanel1.getView().headerCt.items.getAt(1).setText("custom text");
    in this example:
    https://examples2.ext.net/#/GridPane...mnHeaderGroup/

    it will change the "Stock Price" text.
  3. #3

    Just in case...

    In case anyone wants to see the final solution:

    .Listeners(ls => {
                    ls.Load.Handler = @"if (records.length > 0) {
                                                 App.attendanceSheetEdit_grid.getView().headerCt.items.getAt(2).setText('Monday: ' + records[0].data.Monday);
                                                 }";
                })
  4. #4
    Thank you!

Similar Threads

  1. [CLOSED] Expand / Collapse Grid group in client side - Razor
    By MTSI in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Aug 31, 2012, 12:52 PM
  2. [CLOSED] Hide / Show columns in Grid - Razor
    By MTSI in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 30, 2012, 12:41 PM
  3. [CLOSED] Problem Row Editor with columns header group
    By Digital.Dynamics in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 12, 2012, 5:11 AM
  4. [CLOSED] GridPanel, group by many columns at the same time
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 07, 2012, 9:23 AM
  5. Group columns by dragging them into a group panel
    By pj_martins in forum 1.x Help
    Replies: 1
    Last Post: Aug 08, 2011, 6:07 PM

Tags for this Thread

Posting Permissions