473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Getting Selected Column Name On DataGrid (argent)

Hi
I need to get selected column name or index when user select one
on datagrid.
--
Thank For The Help
Eran
Nov 21 '05 #1
1 1963
Eran,

This you can try, and than do the rest yourself because what you did not
tell was, if you want a column number of the datagrid or from a kind of
datasource and as well not if you use datagridstyles. By the way I have
assumed that it is for a windowforms datagrid.

\\\
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles DataGrid2.CurrentCellChanged
Dim GridColumn As Integer = _
DirectCast(sender, DataGrid).CurrentCell.ColumnNumber
End Sub
///

I hope that this helps?

Cor

"Eran AMiel" <Er*******@discussions.microsoft.com>
Hi
I need to get selected column name or index when user select one
on datagrid.
--
Thank For The Help
Eran

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Colin McGuigan | last post by:
This is a translation of an ASP page to ASP.Net. First, the background: The goal is to have a grid of different settings for the application -- think something along the lines of the Property...
2
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added...
5
by: Jason | last post by:
I've been trying to figure out a good way to do this but haven't had much luck, any input would be greatly appreciated. Basically, after a datagrid is sorted, how can I get the primary key value...
1
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting,...
1
by: nate axtell | last post by:
In VB .NET I load the contents of an Excel or comma seperated values file into a dataGrid (via a datatable). One of the columns has a comma in the name of the column. So for the comma separated...
3
by: Aziz | last post by:
1. I have a shopping basket DataGrid with a list of products. What I want to do is when the user clicks on a row, a button will become visible/be created that allows user to edit the quantity. The...
3
by: reidarT | last post by:
I have a datagrid with columns. One of the columns are a textbox. I want the text in this column shown in a textbox outside the datagrid. How can I do that when clicking the actual row in the...
0
by: Sudhir Kesharwani | last post by:
Hi All, I am developing a custom grid view control, which displays a checkbox...grid control is bound to a datasource. i am writing a custom method for the datagrid, where in user can get...
0
by: sathyan8294 | last post by:
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.