Grid. Checkbox render function - how to execute default render of control

  1. #1

    Grid. Checkbox render function - how to execute default render of control

    I try to do a simple change of a checkbox cell in a grid. The change depends on another field in the record.

    My approach is to use the render function on the grid column like this

    <ext:CheckColumn ID="CheckColumn3" runat="server" Text="sample" Align="Center" Width="60" Editable="true" DataIndex="sample">
    <Renderer Fn="renderCheckBox "/>
    </ext:CheckColumn>


    var renderCheckBox = function (value, metaData, record, rowIndex, colIndex, store, view) {

    if (record.get("otherbooleanfield") == 1) {
    return "";
    }

    return someDefaultRenderingLogicOnCheckBox

    // return "<input type='checkbox'" + (value ? "checked='checked'" : "") + ">"; works but returns a simple checkbox without CSS and does not look like other checkboxes in the grid
    };
    Last edited by hjh; Oct 25, 2013 at 12:43 PM.

Similar Threads

  1. Replies: 0
    Last Post: Jun 07, 2013, 7:45 AM
  2. Replies: 19
    Last Post: Sep 28, 2012, 8:08 AM
  3. Replies: 4
    Last Post: Sep 07, 2012, 1:43 PM
  4. [CLOSED] Toggle Render? Refresh Render?
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 08, 2011, 3:13 PM
  5. [CLOSED] Render function for Number field
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 10, 2010, 2:53 PM

Posting Permissions