Solved

Manipulate a Datagridview with Sendmessage

Posted on 2013-01-31
3
718 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Achieve json result 2 65
Memory Usage 2 49
Anyway to make "All" the default in the dropdown? 6 34
Remove greater than sign 3 42
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

17 Experts available now in Live!

Get 1:1 Help Now