Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Need a current row indicator

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Need a current row indicator
Link Posted: 17-Jul-2006 07:30
Hello,

We are not using row selection or anything like that.  We are using row indicators.

At various points, it is necessary to know what the current row pointer is pointing to.  Even if the focus and cursor is completely outside the grid, so neither the grid nor any of its rows have focus.

For example, when clicking a button completely outside the grid, we might want to swap rows.  At this point, nothing in the grid has focus.

How to get what the 'current row indicator' is pointing to?

Thanks
Link Posted: 17-Jul-2006 08:00
To show row indicator you should add to FlyGrid.Rows.Options following options: RowsOptions.ShowRowHeaders and RowsOptions.ShowIndicators:
[c#]
flygrid.Rows.Options |= RowsOptions.ShowRowHeaders | RowsOptions.ShowIndicators
Link Posted: 17-Jul-2006 08:19
I'm sorry, I feel like you didn't read my message, just the title?

I did not ask how to show the current row indicator. I know how to do that.

I asked how to programmatically get a pointer to the current row that the indicator is pointing to.

I need to get a pointer to the current row at any given time.  I have not been able to find a property that would point to the current row that the indicator is pointing to.

Something like:

grid.CurrentRow

Would be great.
Link Posted: 17-Jul-2006 08:25
Sorry for missunderstanding,
in this can use following code snippet:
[c#]
int currentRow = flyGrid.Selected != null ? flyGrid.Selected.Index : -1;
Link Posted: 17-Jul-2006 08:55
Thanks very much, that's exactly what I was looking for.