Hi,
I have a similar need for iterating through all rows as requested in http://www.devexpress.com/Support/Center/KB/p/A385.aspx.
I'd like to allow the user to filter the rows through the grid, then click on a button for separate processing outside the grid for all remaining rows.
May I know if there is some way to achieve this? If I can get the SQL that is being used to fetch the data, it would work too.
Thanks,
Cheng
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Cheng,
Use the following code to iterate through only Visible data rows:
for(int i = 0;i < ASPxGridView1.VisibleRowCount;i++) { if(ASPxGridView1.GetRowLevel(i) == ASPxGridView1.GroupCount) { object keyValue = ASPxGridView1.GetRowValues(i, new string[] { ASPxGridView1.KeyFieldName }); if(keyValue != null) ASPxMemo1.Text += keyValue.ToString() + "\n"; } }
Thanks,
Plato
Hi Plato,
This isn't good for me. I'd like to be able to fetch all the data, not just the default 10 rows or so.
It would be great if ASPxGridView had a FilteredRecords or Rows property.
Thanks,
Cheng
Hi Cheng,
Have you tried this code? It allows you to fetch all the required data.
Thanks,
Plato
Hi Plato,
If the grid view has a Pager, then this code will only fetch the row data from the first page and return null data for the remaining rows.
Regards,
Cheng
Hi Cheng,
Please send us a sample project which shows the effect you mentioned. We'll do our best to help you.
Thanks,
Plato