Solved

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

Posted on 2004-09-01
7
180 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
Comment Utility
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
Comment Utility
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
Comment Utility
i am using VB6
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 8

Expert Comment

by:bramsquad
Comment Utility
in vb6

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

~b
0
 

Author Comment

by:BIAPRO
Comment Utility
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
Comment Utility
try this

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

Author Comment

by:BIAPRO
Comment Utility
yes !!!!!!!!
thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 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…

762 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

7 Experts available now in Live!

Get 1:1 Help Now