[CLOSED] Adding an empty row to a grid w/o information about the data structure ?

  1. #1

    [CLOSED] Adding an empty row to a grid w/o information about the data structure ?

    Hi all

    I got the following problem. My page has about 10 different grids. All this grids should be editable which means the user needs the ability to add new 'empty' records to the grid.

    I would be very cool to find a way to add the record to the grid with out knowledge about the data structure of the bound data !

    I saw some examples using the grid's insertRecord function. but this way a individual data structure is needed...

    Do you have any suggestions for my problem ?

    Peter
    Last edited by Daniil; Apr 05, 2013 at 12:29 PM. Reason: [CLOSED]
  2. #2
    Hi Peter,

    Do you want to add an empty record?

    Example
    App.GridPanel1.getStore().add({});
    App.GridPanel1.getStore().insert(0, {});
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi Peter,

    Do you want to add an empty record?


    App.GridPanel1.getStore().add({});
    Jup, like that :-)
    How can I see that the user added this entry - can I get a kind of 'dirty' Flag ?

    Peter
  4. #4
    Hello!

    You can get new records using the following method:

    App.GridPanel1.getStore().getNewRecords()
  5. #5
    Quote Originally Posted by sisa View Post
    How can I see that the user added this entry - can I get a kind of 'dirty' Flag ?
    You could start editing and/or highlight the row.
    http://examples2.ext.net/#/GridPanel...rking_Records/
  6. #6
    Quote Originally Posted by Daniil View Post
    You could start editing and/or highlight the row.
    http://examples2.ext.net/#/GridPanel...rking_Records/
    Perfect as usual :-)

Similar Threads

  1. Replies: 4
    Last Post: Apr 19, 2012, 10:42 AM
  2. Grid, Reader and XML data structure question
    By Dimitris in forum 1.x Help
    Replies: 8
    Last Post: Jan 15, 2012, 10:50 AM
  3. Replies: 5
    Last Post: May 17, 2011, 9:10 AM
  4. Replies: 1
    Last Post: Sep 11, 2009, 11:41 AM
  5. Adding java Extjs script Data grid
    By Shimon_wi in forum 1.x Help
    Replies: 2
    Last Post: Jun 16, 2008, 1:31 AM

Posting Permissions