Results 1 to 3 of 3

Thread: Extjs radio button in grid control

  1. #1

    Default Extjs radio button in grid control

    In my grid has one is radio button column.I done with following code.


    Code:
    {id:'qnAnsOptVal',header:'  ',dataIndex: 'qnAnsOptVal', width:120,
        
        renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
                                    if( value === 'Yes')
                                    { 
                                        return '<input  " type="radio" name="radio_' + rowIndex + '" id="radio" checked="checked" value="' + record.data.qnAnsOptIdYesId + '" /> Yes<input  " type="radio" name="radio_' + rowIndex + '" id="radio" value="' + record.data.qnAnsOptIdNoId + '" +/> No';
                                    } else if( value === 'No')
                                    { 
                                        return '<input  " type="radio" name="radio_' + rowIndex + '" id="radio" value="' + record.data.qnAnsOptIdYesId + ' "/>Yes<input  " type="radio" name="radio_' + rowIndex + '" id="radio" checked="checked" value="' + record.data.qnAnsOptIdNoId + '" /> No';
                                    }
                            }},
    On loading(display) the data from JSON it is working fine.

    If I select one radio button how can get the value ? Say on saving the data back to table how can i get radio button value like one
    Code:
                         bidAssessmentdata.qnAnsOptVal=record.data.qnAnsOptVal;
    Any suggestion is welcome.

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165

    Default

    The grid doesn't support adding components to the cells. While it's not impossible to render them into the cell the container / component ownership model doesn't exist out of the box, no layout management, event bubbling, etc.

  3. #3

    Default

    Thank a lot slemmon ...

    Can you please give me suggestion to do this ? I want to radio button inside a grid and get the data from JSON from servlet.

    It will be very helpful for me if you give me any suggestion or piece of code or documents link...

    When I googled I can find only static radio group and Even When I try that only value of dataIndex is displaying , radio buttons are not coming up.

    Thanks in advance

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •