[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-09-01
7
Medium Priority
?
229 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Make the most of your online learning experience.
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 …
Simple Linear Regression

834 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