Ticket Q475856
Visible to All Users

Coded UI for DevExpress XtraGrid GridControl

created 12 years ago

I have installed DevExpress Universal setup (DXperience-12.2.6) and also i have VS 2010 Ultimate version.
I want to find values in DevExpress.XtraGrid GridControl which is added in Winform.
What is the best method?
AS I see in Coded UI, there is no such method available to traverse through rows and cells of GridControl.

Can you provide any reference/tutorial/document .

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hi,
When you are installing our DXperience product, our Coded UI extensions are registered as well. These extensions allow Coded UI tests to work properly with our controls. If you record a test for an application using our Grid, an object of the DevExpress.CodedUIExtension.DXTestControls.v12_2.DXGrid class will be created to represent the Grid in a Coded UI test.
For this object, you can traverse through all rows and cells, and get a cell value using the following code:

C#
DevExpress.CodedUIExtension.DXTestControls.v12_2.DXGrid datagrid; for (int i = 0; i < datagrid.Views[0].RowCount; i++) { for (int j = 0; j < datagrid.Views[0].Coumns.Count; j++) { object value = datagrid.Views[0].GetCell(datagrid.Views[0].Columns[j], i).Value; } }
    Show previous comments (6)
    Egor Snet (DevExpress) 12 years ago

      Hello Ravi,
      If I understand you properly, you installed VS Ultimate after installing DXpreience. Any Coded UI extension needs to be registered in Visual Studio's branch of the registry. So, our extension needs to be installed after installing Visual Studio. Please run the DXperince installation and choose the 'Repair' option.
      Thanks, Egor.

        Thanks !!
        I tried this and worked for me.
        Actually there was a problem with my installation of VS 25010.
        so Uninstalled VS 2010 Ultimate, reinstall it and then install VS 2010 SP1 and then install DevExpress 12.2 Version.

        DevExpress Support Team 12 years ago

          You are welcome. Please feel free to contact us in case of any difficulty. We are happy to help you at any time.

          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.