I need to be able to add multiple rows client side. I have tried to use igtbl_addNew, but it wont add multiple new lines without there being data in each existing lines. Anyone know a way around this?
Hi,
U can use the following code.
var j = txtRows.value; for(var i=0; i < j; i++) { row=myGrid.Rows.addNew(); }
Thanks,
Kedar.
That code seems to be server side. In the application I am doing, I want to allow the user to enter several lines of data without posting back to the server until they click a submit button. To complicate matters, they would like to be able to enter a number of lines to add and add them all at one time.
I was hoping that someone would have tried this before me and could tell me how to get it accomplished.
That is client side code but from what I have tried it does not work. The method keeps returning my an undefined row. So I can't add any rows to my grid through the client side.
var newRow = GrdBspCompanyRowsCollection.addNew(); --- Adding a new blank row to the rows collection
newRow.getCellFromKey('CompanyName').setValue(txtCompanyName.value);
newRow.getCellFromKey('BspPlugInID').setValue($get('<%= this.hfBspPluginID.ClientID %>').value);
This works when there are actual rows in the grid. My problem is if there is an empty grid this will fail.