Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select entire row of a data grid view #11

Open
MonoAutomation opened this issue Jan 5, 2017 · 1 comment
Open

Select entire row of a data grid view #11

MonoAutomation opened this issue Jan 5, 2017 · 1 comment

Comments

@MonoAutomation
Copy link

MonoAutomation commented Jan 5, 2017

Uisng Treewalker ,i am able to get required row number from the grid but not able to select that row.

i have tried selection,invoke, and other pattern but everything is throwing error like un supported pattern.
myrow=2 //example
// to get row element)
AutomationElement rowElementToSelect = requiredGrid.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.AutomationIdProperty, myrow.ToString()));

// get row header
AutomationElement rowHeader = rowElementToSelect.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Header));

// invoke it (select the whole line)
//((InvokePattern)rowHeader.GetCurrentPattern(InvokePattern.Pattern)).Invoke();

Environment: Windows forms,Infragistics,.netframework 4,

Can any one help to get the solution for this scenario?

@drogit
Copy link

drogit commented Jun 2, 2017

oh buddy ... did you ever get this to work? i have same problem virtually. cant perform the default action on the row. then again, i cant even seem to get this project to work just yet. but i just a quasi newbie despite being old!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants