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
185
WebDAtaGrid,Adding Row Programmitaclly (On serverside and clientside)
posted

There are 2 Template columns on WebDataGrid. I want to add rows prorgammatically on serverside and client side.

How Can I Add Row To WebDAtaGrid Programmatically?

  • 28464
    posted

    Hello,

    On the client-side, you can use something similar to that to add a new row programmatically with BLOCKED SCRIPT

    var grid = $find("<%= WebDataGrid1.ClientID %>");
    grid.get_rows().add(["hello"]); // array of new cell values
    or an override:
    grid.get_rows().add({"ID":"hello"}); // object of columnKey:cellValue 

    On the server, unfortunately this is not supported yet (unbound mode). The only way is to add a new row to the datasource and then rebind the grid.

    HTH,