How to cast custom controls as DevExpressXtraGrid controls
How to cast custom controls as DevExpressXtraGrid controls?
I try to write the following code:
IDriver driver = new LocalDriver();
IWindow dxGridControl = driver.Find<IProcess>(new ProcessPattern()
{
ProcessName = "WT-ToolExport"
}).Find<ITopLevelWindow>(new WinFormsPattern()
{
WinFormsControlName = "DXSearchForm"
}).Find<IWindow>(new WinFormsPattern()
{
WinFormsControlName = "datagridBottomLayoutControl"
}).Find<IWindow>(new WinFormsPattern()
{
WinFormsControlName = "datagridPanelControl"
}).Find<IWindow>(new WinFormsPattern()
{
WinFormsControlName = "gridControl"
});
long CountValue = dxGridControl.GetProperty<long>("DevExpress_XtraEditors_INavigatableControl_RecordCount"); //this returns correct value
var XtraGrid = dxGridControl.Cast<IDevExpressXtraGrid>();
var rowcount = XtraGrid.wRowCount; // I see error
I see wRowCount property for this control in TestComplete :