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

Retrieve Datagrid TemplateColumn Datafield value

How do you get the "Datafield" property of data that's in a Template
Column of a Grid?

I am using editable Datagrids with Template Columns.

When using Boundcolumns, I just used:
ColName = CType(dg.Columns(i), BoundColumn).DataField

But this doesn't work with TemplateColumns.

I have tried building an array containing binding information during
the grid's ItemDataBound or ItemCreated events, but I can't seem to
extract the information from the DataGridItemEventArgs parameter.

Basically I just want to know the Schema Column Name that the DataGrid
column is bound to. This would make it much easier to write generic
data manipulation routines to move data from the Grid back into the
Dataset when using editable Grids.

Any help (or examples) would be greatly appreciated.

Regards

Neil
Nov 21 '05 #1
0 1317

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

Similar topics

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...
3
by: DC | last post by:
Dear ASP.Net Experts, In ASP, I can write something like this: <table> <tr> <th align=left>ID</th> <th align=left>Product Name</th> <th align=left>Price</th> </tr> <%
4
by: News | last post by:
I have a page with many controls. Among these controls there is a table which is a datagrid with nested repeater inside. My problem is that I can not use DataGridCommandEventArgs to get datagrid...
1
by: m3ckon | last post by:
Hi there, please help if you can, I'm having an issue with droponnlists in a datagrid I have a datagrid which is populated from a query .. all works fine I've added two extra columns, one...
2
by: Josh | last post by:
Hi Guys, I have been stuck on this problem for several days now, i have a set of nested datagrids. Inside the second datagrid i have a dropdown list, a textbox and a label. I want the textbox...
2
by: ismaelf | last post by:
i have a textbox in a template column in a datagrid, it displays the initial value of the row, but when i change it remains with the original value (it doesnt get the new value..) i fill the...
6
by: p.mc | last post by:
Hi all, I'm having major problems with a userControl which contains a datagrid. My problem concerns data binding. The Page_Load() procedure calls the DataBind procedure to bind the datagrid...
0
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
23
by: tanya2001 | last post by:
hi all.. I am trying to update my datagrid in my webform...but its not getting updated..though in the database it removing the <null> and inserting a blank field....its not taking the input which m...
0
by: stevem2112 | last post by:
I have a datagrid with 2 Template columns. One column has DropDownLists and the other has Textboxes. I bind each DDL in the ItemCreated event. This datagrid is inside a UserControl that is inside...
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: 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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.