473,508 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get DataField Item of a Column?

Is it possible to dynamically get the datafield item that populates a
column in gridview?

Something like grid.columns(0).????

Feb 27 '07 #1
1 1030
If you handle RowDataBound event, DataItem property points you to the
datasource item bound to the row. You can typecast it to your datasource
type and access the datasource fields or properties.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"mianiro" <mi*****@gmail.comwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
Is it possible to dynamically get the datafield item that populates a
column in gridview?

Something like grid.columns(0).????

Feb 27 '07 #2

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

Similar topics

2
433
by: MFRASER | last post by:
I am trying to populate a listview and I can not see the column headers, is there a property I am forgetting to set? Here is my code // Create three items and three sets of subitems for each...
9
15002
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
4
1469
by: Kurt Schroeder | last post by:
I have a data grid with about 20 repeating items. they data: colors, red colors,blue colors, green Animals cat animals bird people, Tom people, Bill people, Kris
2
3632
by: Fabiano | last post by:
Please, i need to hide a Item(Collumn) of a DataList that is inside of another DataList based on some data that i my database returns. For a sample i created the code above, but it doesn't work....
1
3987
by: nemo | last post by:
I'm creating a datasource and populating a datagrid at runtime. The code is as follows: dt = New DataTable dt.Columns.Add(New DataColumn("Item", GetType(String))) dt.Columns.Add(New...
1
4213
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
2
8798
by: Dachshund Digital | last post by:
Ok, some one has to have done this... I have a listview with 3 columns. I want one column to hold a dropdown control so the user selects the listview item/column can select a option for that...
4
1814
by: kavithadv | last post by:
hi Please help me i want to fix a column in grid view i used style for locking the column since i am setting the position as relative its not working properly i have given my code below ...
3
1879
by: Sick0Fant | last post by:
I have a database which has a column of type VARCHAR(30). I want to insert a string into this column using ADO .net. I first want to make sure that the string will be able to fit into the column in...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.