[CLOSED] GridPanel - change look/content of Columns/CommandColumn based on row data?

Page 2 of 2 FirstFirst 12
  1. #11
    Hmm, to get a button there works now.

    But how do I place a label?

    var prepare = function (grid, toolbar, rowIndex, record) {
        if (record.data.BookingState == "Avbokad") {
            toolbar.items.itemAt(0).hide();
            toolbar.add(new Ext.Label({
                text: "test"
            }));
            toolbar.doLayout();
        }
    };
    Thats not working...
  2. #12
    The constructor of label is Ext.form.Label(), not Ext.Label().

    Also you can use .addText().
    toolbar.addText("Hello!");
  3. #13
    Aahh.... Thanks. Missed that. Bad me. =)
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Change input type based on data type
    By bjones in forum 1.x Help
    Replies: 5
    Last Post: Jan 06, 2012, 9:54 AM
  2. Replies: 5
    Last Post: Jul 28, 2011, 6:30 PM
  3. Replies: 1
    Last Post: Jun 02, 2011, 9:19 PM
  4. GridPanel Row Formating based on Data
    By vivekrane1986 in forum 1.x Help
    Replies: 0
    Last Post: Jun 08, 2010, 7:15 AM
  5. Replies: 2
    Last Post: Mar 04, 2009, 4:28 PM

Tags for this Thread

Posting Permissions