Page 1 of 1

Searching data in columns in mvc dev express controls

Posted: Thu Sep 01, 2011 3:41 pm
by leon
Hi there
I'm trying to get a result of a value in a certain column, then in a row using the mvc dev express controls we are using in our app [see http://mvc.devexpress.com/GridView/FilterRow as an example]

if I eg filter on column 2 as in this example on the page "condiments" and the results = x amount of rows, how do I read and validate data eg "Chef Anton's Gumbo Mix" in row 3 does exist without reading the filtered item in the filter box by using the track option

It would be great if someone could help me with this - I hope I explained myself clearly enough
Thanks

Re: Searching data in columns in mvc dev express controls

Posted: Thu Sep 01, 2011 4:33 pm
by sdaly
I would do the filter etc then get a list of the rows with the following path or similar -

Code: Select all

ilist <Ranorex.trtag> trRows = host.local.find<Ranorex.trtag>("/dom[@domain='mvc.devexpress.com']/body/div/div/div/div[1]/div[1]/div[2]/div/div[@id='DemoArea']/table/tbody/tr/td/table/tbody/tr[@id~'DataRow']");
Then loop these 'rows' and validate whatever child TR's you want, whether that is validating the 2nd TR by its name or the 3rd TR by the filtered type, in this case condiments.

Code: Select all

foreach(Ranorex.trtag row in trRows){
//do the validation on the children tr tags here
}
Hope that helps!