Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Add new Row via clientside without PostBack - webdatagrid 11.1v
posted

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.