Solved

Manipulate a Datagridview with Sendmessage

Posted on 2013-01-31
3
713 Views
Last Modified: 2013-03-07
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
Comment
Question by:toddinho
  • 2
3 Comments
 
LVL 4

Expert Comment

by:jiangsheng
ID: 38844324
Use AccExplorer to check if you can access the checkbox via one of the accessibility interfaces.
0
 

Author Comment

by:toddinho
ID: 38852887
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
 
LVL 4

Accepted Solution

by:
jiangsheng earned 500 total points
ID: 38856496
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem with SqlConnection 5 121
C# Application Local DB Connection String 23 61
Image(2) 3 28
XML & .net 5 21
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now