DataGridView Sorted manual select Row 0 after sort

1
0

I have this condition    as shown in the image   selecting whatever I define ( It will be Row 0 for real after testing )    nRowIndex  = 0

but you can see that it selects  with the highlighted row after the sort

but the Arrow Row indicator is still pointing to whatever row was selected by the UI

before sort

private void dgvResults_Sorted(object sender, EventArgs e)
{
dgvResults.ClearSelection();

int nRowIndex = dgvResults.Rows.Count – 6;  // Would force to Zero per my requirements

dgvResults.Rows[nRowIndex].Selected = true;
dgvResults.Rows[nRowIndex].Cells[0].Selected = true;

}

Can I affect that Row indicator  arrow like I have the highlight for selected  row ?

Is my selected row even properly selected if the row indicator is pointing to another row ? 

 

  • Christian Programmer
    As I demonstrated from the code sample and the image I attached, the manual programmatic selection of the desired row (it will always be Row ZERO in the real implementation) does correctly highlight the desired row —- but the current active row indicator icon is still set to the row that the user manually selected in the UI. Can I programmatically affect this marker / indicator as I have done the selected row property ? I’m wondering if .. some active row CurrentRow property is incorrectly still set since my selected row is correctly highlighted while in contrast the DataGridView is actually showing me with that active icon that some other row is current/active. This would be very important if I were harvesting data from current active row. Please advise ASAP
  • You must to post comments
0
0

Hi again!

We have confirmed that there’s a regression with the CurrentRow property not being updated when selecting a row from the server!

A fix is currently in QA and we’ll let you know as soon as the update is shipped!

Best,
Alaa

  • You must to post comments
0
0

Hello,

We’re looking into this issue and we’ll get back to you ASAP!

Best,
Alaa

  • Christian Programmer
    Howdie might this be repaired yet ?  March 6th 2023 — June 13th 2023 QA is asking me about it again …   Thanks
  • Frank (ITG)
    Hi Christian, this issue should be fixed in Wisej.NET 3.2 and later. Please let us know if you´re still facing any issues. Best regards, Frank
  • Christian Programmer
    It still doesn’t appear to re position the Arrow indicator for selected row nor move the grid to zero position after column sort
  • Luca (ITG)
    Selected row is not related to the current row.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.