Wijmo Grid

Posted by: roger.porter on 19 December 2017, 11:32 pm EST

  • Posted 19 December 2017, 11:32 pm EST


    Can anyone tell me how I get a list of selected rows in a grid. I know how to get the row indicies but I need to get one of the columns per selected row.

    Many Thanks,

  • Marked as Answer

    Replied 20 December 2017, 7:13 pm EST

    Hi Rogger,
    Please refer to the following demo sample for the same:

  • Replied 17 December 2018, 4:03 pm EST

    You may try this code. It worked for me

    private void selectedColumnsButton_Click(object sender, System.EventArgs e)
    Int32 selectedColumnCount = dataGridView1.Columns
    if (selectedColumnCount > 0)
    System.Text.StringBuilder sb = new System.Text.StringBuilder();

    for (int i = 0; i < selectedColumnCount; i++)
    sb.Append("Column: ");

    sb.Append("Total: " + selectedColumnCount.ToString());
    MessageBox.Show(sb.ToString(), "Selected Columns");
  • Replied 17 December 2018, 9:20 pm EST

    Hi Rahil,
    Thanks for sharing your code here, The code is related to the find the selected columns however the original question is related to find the selected rows.

Need extra support?

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

Learn More

Forum Channels