Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Nov 2008
    Posts
    17
    Vote Rating
    0
    iteamsoftware is on a distinguished road

      0  

    Default Grid checkbox and number field

    Grid checkbox and number field


    Hi.
    I have a grid that display some invoices.
    I want to add a check box in each row and a number field - disabled by default.
    When you'll check the checkbox - the number filed will became enabled so the user can enter the amount.
    That's the ideea.
    But it seams that I can't manage to add the checkbox in Ext 2.3.0 to rows.
    My code is something like this:

    mainClientiFacturiHeader = new Ext.grid.ColumnModel([
    new Ext.grid.RowNumberer(),
    {header: "IDFACTURA", width: 0, dataIndex: 'IDFACTURA', hidden: true},
    {header: "IDCLIENT", width: 0, dataIndex: 'IDFACTURARE', hidden: true},
    {header: "Numar", width: 70, dataIndex: 'FNUMAR', sortable: true, hidden: false},
    {header: "Tip", width: 30, dataIndex: 'FTYPE', sortable: true, hidden: false},
    {header: "Data", width: 35, dataIndex: 'FDATA', sortable: true, hidden: false},
    {header: "Scadenta", width: 35, dataIndex: 'FDATASCADENTA', sortable: true, hidden: false},
    {header: "Valoare", width: 45, dataIndex: 'FVALOARE', sortable: true, hidden: false, align: 'right'},
    {header: "Rest Incasare", width: 45, dataIndex: 'FSOLD', sortable: true, hidden: false, align: 'right'},
    {header: "Incaseaza", width: 40, dataIndex: 'FINCASAREFLAG', hidden: false, align: 'center', editor: new Ext.form.Checkbox() },
    {header: "Suma", width: 60, dataIndex: 'FINCASARESUMA', hidden: false, align: 'right', editor: new Ext.form.TextField() }
    ]);

    mainClientiFacturiHeaderFilters = new Ext.grid.GridFilters({
    local: true, paramPrefix: 'plugin_filters', filtersText: 'Filtre',
    filters:[ {type: 'string', dataIndex: 'NRDOC'} ] });


    mainClientiFacturi = new Ext.grid.EditorGridPanel({
    title: mainClientiFacturiTitle,
    frame: true, border: true,
    store: store_mainClientiFacturi,
    cm: mainClientiFacturiHeader,
    sm: new Ext.grid.RowSelectionModel({
    singleSelect: true,
    listeners: { rowselect: function(sm, row, rec)
    {

    }, delay: 2 }}),
    clicksToEdit: 0,
    disabled: (cl_is_repartizareauto == '1' ? true : false),
    height: ( panelHeight - (Ext.isIE ? 206 : 206) ) ,
    plugins: mainClientiFacturiHeaderFilters
    });


    I want to make it as simple as possible.

    Thank you

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    80
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You can use a CheckColumn (copy from examples/edit-grid.js to a separate file).

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Posts
    17
    Vote Rating
    0
    iteamsoftware is on a distinguished road

      0  

    Default thanks

    thanks


    I try that. But it seams that if the grid is disabled by default the checkbox don't work so well - meaning I can click on the checkbox.
    And I preffer a very simple solution without the checkcolumn.
    thanks

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    80
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    What do you mean by 'disabled by default'? You can't disable a grid; you can only mask it.

  5. #5
    Sencha User
    Join Date
    Nov 2008
    Posts
    17
    Vote Rating
    0
    iteamsoftware is on a distinguished road

      0  

    Default


    Hi.
    yes - it's masked.
    So - is there any solution to my problem.
    Thank you so much for your help.

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    80
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You can't click the checkbox when the grid is masked, so I still don't understand the problem.

  7. #7
    Sencha User
    Join Date
    Nov 2008
    Posts
    17
    Vote Rating
    0
    iteamsoftware is on a distinguished road

      0  

    Default


    I know.
    There is an exteranl button that when clicked - it unmask the grid so the grid became "enable".
    On that grid if I add the checkcolumn plugin to extjs 2 - it display the checkboxes on each row where it should.
    But I can't click on those checkboxes. I can click and edit any other cell excelt the cell with the checkboxes.

    I'd preffer to not use the checkcolumn plugin (but still use extjs 2.3.0) - so is there any other option?
    If not - how can I make the checkcolumn to work ok with the checkboxes click?
    Thank you for your time

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    80
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    CheckColumn (from examples/edit-grid.js) does work correctly in Ext 2.3, but you should have a look at the example again (the checkcolumn needs to be registered both as column and as plugin).

Similar Threads

  1. About number field value
    By naleen in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 10 Apr 2010, 7:53 AM
  2. Replies: 2
    Last Post: 1 Apr 2009, 4:18 AM
  3. How to apply a checkbox on any field of a grid
    By ripanpradhan in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 17 Mar 2008, 4:37 AM

Thread Participants: 1