PDA

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



sisa
Apr 04, 2013, 3:32 PM
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

Daniil
Apr 04, 2013, 5:04 PM
Hi Peter,

Do you want to add an empty record?

Example


App.GridPanel1.getStore().add({});
App.GridPanel1.getStore().insert(0, {});

sisa
Apr 04, 2013, 5:40 PM
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

Baidaly
Apr 05, 2013, 2:12 AM
Hello!

You can get new records using the following method:


App.GridPanel1.getStore().getNewRecords()

Daniil
Apr 05, 2013, 4:03 AM
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/Miscellaneous/Marking_Records/

sisa
Apr 05, 2013, 12:01 PM
You could start editing and/or highlight the row.
http://examples2.ext.net/#/GridPanel/Miscellaneous/Marking_Records/

Perfect as usual :-)