G
gerry
My client would like a alphabetic lookup bar to allow navigation to a
specific page of a datagrid - the page which has the first occurance of
the "key" field that starts with the clicked on letter. For example, if
the user clicks on "E-H" the datagrid will present the page which
contains the first occurance of an item which starts with E, F, G or H.
The alpha lookup bar supplements the existing next page/previous page
links.
My approach - brute force - is to sort the dataset alphabetically, find
the first row that meets the lookup criteria, calculate the page index
based on the row #, and then set the Datagrid.currentPageIndex to the
calculated page index. Does this seem like a reasonable approach? Is
there an easier method?
specific page of a datagrid - the page which has the first occurance of
the "key" field that starts with the clicked on letter. For example, if
the user clicks on "E-H" the datagrid will present the page which
contains the first occurance of an item which starts with E, F, G or H.
The alpha lookup bar supplements the existing next page/previous page
links.
My approach - brute force - is to sort the dataset alphabetically, find
the first row that meets the lookup criteria, calculate the page index
based on the row #, and then set the Datagrid.currentPageIndex to the
calculated page index. Does this seem like a reasonable approach? Is
there an easier method?