I would like to search text in XamDataGrid's items (cells and headers),including items that are not presented in the view and change their background color. In addition, I would like to allow the user navigate through founded items (by pressing the next button)
My questions are:
1. How can I change the background of items outside the view(that I can't represent them by CellValuePresenter for exp)
2. I would like to synchronize the grid scrollers according to the navigated item(if the next item is not presented in the view, the scroller should moved automatically). Does using BringToView function solve this problem?
3. If it's possible, I would prefer to MVVM pattern
Hello Megha,
I have been looking into the question that you are having and it seems that it is the same as the one that you have posted in the following forum thread, to which Stefan has already replied: http://es.infragistics.com/community/forums/p/71187/363052.aspx#363052
If you need any further assistance on the matter please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi,
Can anyone please suggest a solution for my question ?
Thanks,
Megha
Hey,
I used the sample code you provided to implement search functionality for all grid records and headers also. However, for grid.label it always takes the count as number of visible records on my screen and implement search only for those records. Can you please help me how to implement it for all the available records in grid (few of which are visible only when you scroll). Also, how to search child records and expand the grid if any matched data is found.
Hello,
I am just checking if you require any further assistance on the matter.
Thank you for your reply. I have been looking into the functionality that you have described and currently the XamDataGrid does not expose for scrolling a field into view. What you can do is call BringCellIntoView method for some of the visible cells of that field in order to not change the vertical scroll position or call the SetHorizontalOffset method of the ScrollInfo property of the XamDataGrid.
Regarding the second part of your question, you can set the LabelPresenter as active, by setting the LabelPresenter.Field.IsSelected property to true, which will select the whole field or you can change the Background property of the LabelPresenter in order to appear as active. I have modified the sample application I have sent you with my previous reply in order to implement the previous/next functionality using the SetHorizontalOffset and Background property of the LabelPresenter.
Please let me know if you need any further assistance on the matter.