TableControl_MouseMove find collection record of row below the mouse
Hi,
I used as base the example to highlight the row when the mous is moving over and I would like to match the record associated to the row that is at the mouse pointer.
There is a snapshot of the code (I removed not relevant checks regarding the row index.
private void TableControl_MouseMove(object sender, MouseEventArgs e)
{
var rowColumnIndex = this.mainSfDataGrid.TableControl.PointToCellRowColumnIndex(this.mainSfDataGrid.TableControl.PointToClient(Cursor.Position));
m_hoveredRowFullPath = m_docCollection.DocDetails[this.mainSfDataGrid.TableControl.ResolveToRecordIndex(
rowColumnIndex.RowIndex)].FullPath.ToString();
}
This works and I get the correct record, but once I change the sorting I do not get anymore the correct record.
There should be something I did not catch about the correlation of the collection index and the table control.
Can you help me to find the correct record matching the row below the mouse pointer?
Thanks a lot.
- If possible, please modify the attached sample to replicate the issue so that we can analyze it in our environment.
- Provide additional details about how the row is being highlighted using the m_hoveredRowFullPath property.
- Any images or videos demonstrating the issue would be highly beneficial for us to understand the scenario better.
Attachment: SfDataGrid_Demo_d25ab6dc.zip
Hi,
I corrected my example with your example steps and now it is working.
Thanks you very much for your very efficient and good support!
Hi Daniele Wyss,
We are pleased to know that your requirement has been met. This forum will now be marked as solved. For further queries, feel free to create a new forum.
Regards,
Manikanda Akash
- 3 Replies
- 2 Participants
- Marked answer
-
DW Daniele Wyss
- Nov 19, 2024 08:08 AM UTC
- Nov 21, 2024 12:20 PM UTC