Jump to content

get data of DataGridView


iSelector
 Share

Recommended Posts

  • Moderators

@iSelector it depends on what "some app" is, but generally yes you can obtain that info. If you would like assistance, you need to do the following:

  • Explain in detail what app you're trying to automate, and what you are trying to accomplish
  • Take a read through the help file and the Wiki and try out some examples. Do a forum search for your topic. Forum members are much more likely to help you if you demonstrate effort rather than sitting back and waiting for someone to spoon-feed code to you.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Just now, JLogan3o13 said:

@iSelector it depends on what "some app" is, but generally yes you can obtain that info. If you would like assistance, you need to do the following:

  • Explain in detail what app you're trying to automate, and what you are trying to accomplish
  • Take a read through the help file and the Wiki and try out some examples. Do a forum search for your topic. Forum members are much more likely to help you if you demonstrate effort rather than sitting back and waiting for someone to spoon-feed code to you.

see the image in the post, i want to read the data in all the rows..

Link to comment
Share on other sites

  • Moderators

I get what you are trying to do..and I responded that it depends on the application you're doing it in. What part of what I said about a detailed explanation is confusing you?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

1 minute ago, JLogan3o13 said:

I get what you are trying to do..and I responded that it depends on the application you're doing it in. What part of what I said about a detailed explanation is confusing you?

what you mean in " what app you're trying to automate ".. it is a simple winforms app

Link to comment
Share on other sites

  • Moderators

iSelector,

Please do not bump your own threads within 24 hours.  Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare.

Besides, you have still not given us any real information about the app you are trying to read. What does the AutoIt Window Info tool  (...AutoIt3\Au3Info.exe) tell you about the grid control? What functions have you already tried which do not read the data?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

3 hours ago, Melba23 said:

iSelector,

Please do not bump your own threads within 24 hours.  Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare.

Besides, you have still not given us any real information about the app you are trying to read. What does the AutoIt Window Info tool  (...AutoIt3\Au3Info.exe) tell you about the grid control? What functions have you already tried which do not read the data?

M23

Hi, when i use the autoit v3 window info i get this data:

>>>> Control <<<<
Class:    WindowsForms10.Window.8.app.0.b7ab7b_r16_ad1
Instance:    1
ClassnameNN:    WindowsForms10.Window.8.app.0.b7ab7b_r16_ad11
Name:    dataGridView1
Advanced (Class):    [NAME:dataGridView1]
ID:    1049604
Text:    
Position:    21, 59
Size:    240, 150
ControlClick Coords:    181, 85
Style:    0x56010000
ExStyle:    0x00000000
Handle:    0x00100404

 

i have tried to use Controlgettext but it is not working..i don't know if there is another function that could help me to get the text of the datagridview...

Link to comment
Share on other sites

You can probably extract data from the gridview with the UI Automation framework.

The easiest is to check if Inspect.exe from Windows SDK can see the data. If Inspect.exe can see the data, the UI Automation framework can also see the data.

Link to comment
Share on other sites

  • 4 months later...

Hi,

 

I am also trying to automate the windows form app which contains the grid view controls in it, is there any way i can access the data from the grid view and click on the row item of the grid view???  please let me know if we have any approach for this???

 

Thanks

Srini

Edited by srini
Link to comment
Share on other sites

  • Moderators

@srini it is always better to create your own thread rather than hijacking someone else's, especially since how you go about automating an application will depend on the application. That, too, is something you need to provide: a detailed explanation of what you're trying to do, in what application, and what you have tried on your own. Help us help you ;)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...