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
300
How to Clear the content of selected cells in web Data Grid
posted

I am using Infragistics v16.1 and have encountered an issue where user wants to clear the content of selected cells(i.e. multiple selected cells) in web Datagrid.

Please advise is a way exists to completely clear selected cells values from a grid in the client side.

can this be done?

should I be able to find this in the documentation?

cheers

Rajesh


Parents
  • 2680
    Verified Answer
    Offline posted

    Hello Rajesh,

    Thank you for contacting us.

    You should use our JS API (http://es.infragistics.com/help/aspnet/webdatagrid-csom-overview) and clear them in this way:

    var webDataGrid = $find("WebDataGrid1");
    var selectionBehavior = webDataGrid.get_behaviors().get_selection();
    var selectedCells = selectionBehavior.get_selectedCells();
    for (var i = 0; i < selectedCells.get_length(); i++) {
        var selectedCell = selectedCells.getItem(i);
        selectedCell.set_value(undefined, undefined);
    }

    I am attaching a working sample as well.

    Please let me know if you need further assistance.

    ClearingSelectedCellsValue.zip
Reply Children
No Data