473,382 Members | 1,386 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,382 software developers and data experts.

DataGrid Columns

Hey there,

I have a DataGrid bound to a DataTable. When a user
selects a row, I want to send the UNQ_ID (which is in a
column with a width of zero, or it's visible parameter set
to false) for that row to a function. I got the row by :
DataGrid.Items(DataGrid.SelectedIndex) Then I need to
use .Cells(<index here>) and get the index of the UNQ_ID
column. I can't use the DataTable I bound it to, because
the user can sort and sometimes the columns show up in
different spots depending on weather or not there are
nulls. When I try and do the IndexOf on the columns
collection for the dataGrid, it only returns one column.
In the quick watch for DataGrid though I saw the column I
needed in "autoGenerateColumns" but I can't get to that
for some reason. Can anyone help?
..
Jul 21 '05 #1
2 1256
Cor
Hi Paul,

Have a look at the currency.manager

I think that will fix your problem

Cor

I have a DataGrid bound to a DataTable. When a user
selects a row, I want to send the UNQ_ID (which is in a
column with a width of zero, or it's visible parameter set
to false) for that row to a function. I got the row by :
DataGrid.Items(DataGrid.SelectedIndex) Then I need to
use .Cells(<index here>) and get the index of the UNQ_ID
column. I can't use the DataTable I bound it to, because
the user can sort and sometimes the columns show up in
different spots depending on weather or not there are
nulls. When I try and do the IndexOf on the columns
collection for the dataGrid, it only returns one column.
In the quick watch for DataGrid though I saw the column I
needed in "autoGenerateColumns" but I can't get to that
for some reason. Can anyone help?
.

Jul 21 '05 #2
Cor
Hi Paul,

Have a look at the currency.manager

I think that will fix your problem

Cor

I have a DataGrid bound to a DataTable. When a user
selects a row, I want to send the UNQ_ID (which is in a
column with a width of zero, or it's visible parameter set
to false) for that row to a function. I got the row by :
DataGrid.Items(DataGrid.SelectedIndex) Then I need to
use .Cells(<index here>) and get the index of the UNQ_ID
column. I can't use the DataTable I bound it to, because
the user can sort and sometimes the columns show up in
different spots depending on weather or not there are
nulls. When I try and do the IndexOf on the columns
collection for the dataGrid, it only returns one column.
In the quick watch for DataGrid though I saw the column I
needed in "autoGenerateColumns" but I can't get to that
for some reason. Can anyone help?
.

Jul 21 '05 #3

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

Similar topics

0
by: Reb | last post by:
I am using a datagrid within another datagrid. My second datagrid is expand/collapse one. I am facing some error. This is my code. ExpandGrid.aspx <form id="Form1" method="post"...
2
by: Josef Meile | last post by:
Hi, I'm using a ComboBox, some Textboxes, and a DataGrid to represent a many-to-many relationship between Person and Course. Each time that I change the value in the ComboBox (which for now is...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
7
by: CanoeGuy | last post by:
I have been trying for the last two weeks to display a dynamic DataGrid. The data that I'm pulling from a SQL Server DB will have whole columns that will be either NULL or 0. I want to display...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
7
by: Arpan | last post by:
Assume that a database table has the following 4 columns - ID, UserID, Subject & Marks. I am retrieving the records existing in this DB table & displaying them in a DataGrid like this: <script...
3
by: rn5a | last post by:
A SqlDataReader is populated with the records from a SQL Server 2005 DB table. The records retrieved depends upon 2 conditions (the conditions depend on what a user selects in an ASPX page). If...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.