Solved

RETRIEVING TEXT FROM 1st  COLUMN  IN DATAGRID EVEN IF CLICKING IN OTHER COLUMN

Posted on 2004-09-01
7
209 Views
Last Modified: 2010-04-17
In a ADO connected Datagrid I use first column as  Keyvalue to database,
by saying:   KEYVAL= datashow.text, problem comes when user clicks on 2 or 3 or higher column in grid then it returns .text from that column. I always need to know at the event
rowcolchange what is in first column of grid. How to extract from grid ????
0
Comment
Question by:BIAPRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 7

Expert Comment

by:jacobhoover
ID: 11956178
Are you using ASP.Net or just VB.Net?

In asp.net it would be something similar to:
  DataGrid.SelectedItem.Cells.Item(0).Text
0
 
LVL 7

Expert Comment

by:jacobhoover
ID: 11956195
Err, make that:
DataGrid.SelectedItem.Cells.Item(1).Text

I think it's a base 1 array rather than base zero...
0
 

Author Comment

by:BIAPRO
ID: 11956341
i am using VB6
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:bramsquad
ID: 11956598
in vb6

Dim txt As String = Me.MSDataGrid1.Col(1).Text

~b
0
 

Author Comment

by:BIAPRO
ID: 11956749
did 2 ways to try Dim txt As String = Me.brokersgrid.Col(1).Text   gives error
and in 2 lines
Dim txt As String
txt = Me.brokersgrid.Col(1).Text
also error,

brokersgrid is my grid,  e.g.  txt = brokersgrid.text will give info on choosen columnn

is my syntax wrong for vb6   ?

0
 
LVL 8

Accepted Solution

by:
bramsquad earned 125 total points
ID: 11956824
try this

Dim txt As String
Me.brokersgrid.Col = 1
txt = Me.brokersgrid.Text
0
 

Author Comment

by:BIAPRO
ID: 11957009
yes !!!!!!!!
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

696 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