PDA

View Full Version : how to add record dynamically to a grid



vijayasarathi
31 Aug 2012, 5:50 AM
Hi every one....
I faced a situation like below and i am unable to find the solution........Please help me


I configured a grid with single column, and i placed this in a form...
I have a text field in the same form and it attached with a button.
when I click this button the value in the field should be dynamically added to the grid (temporarily)...
these buffered grid data should be submitted when i click the submit button in the form...


I tried like this ...
when clicked the add button of the text field ...i added the field value to the grid using
grid.add('value');
...........here when i clicked the add button an empty field is added with any value...I am able to get the text field value but i am unable to insert the data in the grid...



Please help me in solving this


regards
-----------
vijay

Farish
31 Aug 2012, 6:31 AM
you have to add the record to the store bound to that grid:

store.add({field: value});

where field would be the data field you are displaying in that column and value would be the value from your form field.

vijayasarathi
31 Aug 2012, 7:42 PM
thank you its working fine