Can you suggest the best approach to filtering a grid's data in code rather than by using the built-in filtering functionality?
Once the grid has been rendered, in the click event of a 'filter' button I've tried applying a FilterExpression to my DataTable's DefaultView and then assigning that to the grid's DataSource property, but this is causing me problems in PreRender when I try to inspect each row to determine if the row should be placed into edit mode as although I have filtered my DataTable's DefaultView from 10 rows down to 2 rows, in the grid's PreRender event the grid's Items collection still contains 10 items.
What's the recommended approach to manually filtering the grid's data, bearing in mind that I need to access the data in the grid's PreRender event to determine if a filtered row should be in edit mode?
Once the grid has been rendered, in the click event of a 'filter' button I've tried applying a FilterExpression to my DataTable's DefaultView and then assigning that to the grid's DataSource property, but this is causing me problems in PreRender when I try to inspect each row to determine if the row should be placed into edit mode as although I have filtered my DataTable's DefaultView from 10 rows down to 2 rows, in the grid's PreRender event the grid's Items collection still contains 10 items.
What's the recommended approach to manually filtering the grid's data, bearing in mind that I need to access the data in the grid's PreRender event to determine if a filtered row should be in edit mode?