Update specific column/field in a gridpanel on button click?

  1. #1

    Update specific column/field in a gridpanel on button click?

    How can I update a specific column/textfield in a gridpanel - for the selected row? I have a value I am returning from a webservice on button click outside of the gridpanel - if the user likes the value - they click anothe rbutton and wanted to update the values of the gridpanel?
  2. #2
    got it with:

    var gridrecord = GridPanel1.getSelectionModel().getSelected();
    var rowIndex = GridPanel1.getStore().indexOf(gridrecord);
    var record = GridPanel1.getStore().getAt(rowIndex); // Get the Record
    //alert(record);
    record.set('company', hdnDateFrom.getValue());
    Last edited by geoffrey.mcgill; Nov 22, 2010 at 3:50 PM. Reason: please use [CODE] tags
  3. #3
    Hi,

    It can looks just

    Example
    var gridrecord = GridPanel1.getSelectionModel().getSelected();
    gridrecord.set('company', hdnDateFrom.getValue());
    If it doesn't cause the same effect please feel free to notify me:)

Similar Threads

  1. Replies: 0
    Last Post: Feb 28, 2012, 2:15 PM
  2. Replies: 4
    Last Post: Oct 07, 2011, 9:50 AM
  3. Replies: 0
    Last Post: Feb 28, 2011, 1:39 PM
  4. Show Specific Column in GridPanel
    By sachin.munot in forum 1.x Help
    Replies: 3
    Last Post: Oct 22, 2009, 4:51 AM
  5. [CLOSED] Problem when update date field in GridPanel
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 04, 2008, 8:53 AM

Posting Permissions