C1Gridview Un Select

Posted by: roger.porter on 16 February 2020, 8:47 pm EST

  • Posted 16 February 2020, 8:47 pm EST

    Hi,

    I have three grids on a form which are populated with data. How do I un-select the first row.
    The problem is when the page first loads and the grids are populated; each grids first row is selected which is confusing my customers. Is there a way to un-select the first row.

    Many Thanks,

    Roger
  • Replied 17 February 2020, 9:01 pm EST

    Hi Roger,

    If the first row is selected in the GridView, then you must be setting the ClientSelectionMode to "SingleRow" or "MultiRow".
    To unselect the first row, set the ClientSelectionMode to "None" and when the GridView is loaded, set it again to SingleRow using JS.

    In aspx:
    <wijmo:C1GridView ID="C1GridView1" ClientSelectionMode="None" ..>
    </wijmo:C1GridView>

    In JS:
    $(document).ready(function () {
    $('#C1GridView1').c1gridview('option', 'selectionMode', 'singleRow');
    })

    Refer to the sample attached.

    Regards,
    Ashwin

    GridView_Selection.zip
  • Replied 17 February 2020, 9:22 pm EST

    Hi Ashwin,

    Thank you for the reply. Sorry the problem I am having is after the page has loaded I filter one grid and make a select which then populates the other two grids accordingly. It is at this stage where it is showing the first row as being selected even by setting the selection mode to none.

    Regards,

    Roger
  • Replied 19 February 2020, 10:45 pm EST

    Hi Roger,

    Sorry for the late response.

    I tried to replicate the issue by mimicking your requirements. But, the workaround provided earlier is working in this case also. Please refer to the updated sample attached and let me know whether I am missing something?

    ~regards

    selection.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels