[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 791
  • Last Modified:

Manipulate a Datagridview with Sendmessage

Hello, I need to make an application that "modifies" some content of another application's datagridview. I say "modify" in quotes because it's merely a column of checkboxes I need to set Checked/Unchecked.

Besides, I would like to search a column and if it matches a certain parameter, paint the whole line.

Given that I have the control's handle, is it possible to do with Sendmessage or another method?? (I say Sendmessage beacuse I've played with it in Delphi to do it in Listviews, but never in datagridviews)

Thanks in advance!!
0
toddinho
Asked:
toddinho
  • 2
1 Solution
 
jiangshengCommented:
Use AccExplorer to check if you can access the checkbox via one of the accessibility interfaces.
0
 
toddinhoAuthor Commented:
with this app I could access the datagridview and even the rows in it... But how can I use it to change their value programmatically??
0
 
jiangshengCommented:
If you can find the control in the accessible tree ( a better view can be found in UISpy.exe) you can set the value of the control via IAccessible.accValue (or view->Control patterns in UISpy) .

If you cannot reliably locate the control, you can try to access the control via the hackish method used by managed spy
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now