Pergunta

I'm have a GridControl with 12 Records and I am using the DataNavigator control for navigation between the records.
When I click on any record within the gridview(for example 3-rd record) the DataNavigator showing something like: Records 7 of 12
Looks like it displaying random values, formatted with the TextStringFormat.

Foi útil?

Solução

This behavior is reproducible when using the DataNavigator control belong with the GridControl, and data are sorted on any column other than key column. This behavior is correct because the DataNavigator control is bound to a data View or data Table. The DataNavigator control is not directly bound to a control which displays this data.

Please replace the DataNavigator control with the ControlNavigator control. The ControlNavigator.NavigatableControl property must be set to your GridControl. In this case, the navigator will move focus according to the order of rows in the XtraGrid.
Or use the Embedded Navigator feature of GridControl.
You can read more about these approaches in the following help article: Using Navigators

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top