Hi,
Im adding a attribute to the checkbox control [via TemplateDataField] from server side in WebDataGrid2_InitializeRow event.
CheckBox chk = (CheckBox)e.Row.Items[0].FindControl("selectItem");
f (chk != null)
{ chk.InputAttributes.Add("SelectId", e.Row.DataKey[0].ToString());
chk.InputAttributes.Add("SelectIndex", e.Row.Index.ToString());
}
Now Im adding a new row to the webdatagrid using a button's client script. New row is added successfully but when I try to check on a checkbox, im getting a error which mentions Attributes not found. This is because a postback is happening after adding a new row to the webdatagrid [even its from Client side.]
I want to achieve edit , delete and add via client side itself. Edit and delete is working but not Add.
Please help me how to avoid or overcome the postback during new row add. Im using Infragistics 11.1v.
function AddToList(invoker) { var chosenValue = invoker.attributes["SelectId"].value; var selectedIndex = invoker.attributes["SelectIndex"].value; } Kindly guide be how can i overcome this issue. All the operations need to be done in client side.Hoping a quick reponse.
Hello Nitin,
Please note that batch updating, i.e. adding/editing/deleting rows on the client without required postbacks after each operation to commit the changes on the server, has been added as a functionality in WebDataGrid in versions 11.2 and later:
http://help.infragistics.com/doc/ASPNET/2014.1/CLR4.0/?page=Web_Whats_New_in_2011_Volume_2.html
In this scenario I would therefore suggest upgrading to the latest product version in order to get access to Batch Updating.
Please feel free to contact me if you need more information.