Solved

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

Posted on 2004-09-01
7
214 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

688 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