473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataGrid question

hello friends,

i have a question about datagrid,
i have binded a datagrid with a datatable from values that came from a comma
seperated values (.CSV) file

i have created textboxes in all datagrid cells on the ItemDataBound event
and put text from each cell to the new text box in that cell,
until this point every thing is OK,
that client can see all values reside in these text boxes in the datagrid
and he can edit them,
but the problem is like this ;
i have an update button and in its event i am iterating throuhg all datagrid
items and for each cell in the datagrid i want to get back the value from the
text box in it,

but i cant find a text box in the cell.Controls,
i think this is because i have created them dynamically they just appear
after postback the page,
please can anyone help me on this or have an alternate solution ..

thank you all.
--
theGST
Nov 19 '05 #1
2 1596
Instead of creating textboxes dynamically you should use templated columns
and put a textbox in the item template.

Eliyahu

"itgMan" <ab******@gmail.com> wrote in message
news:E0**********************************@microsof t.com...
hello friends,

i have a question about datagrid,
i have binded a datagrid with a datatable from values that came from a comma seperated values (.CSV) file

i have created textboxes in all datagrid cells on the ItemDataBound event
and put text from each cell to the new text box in that cell,
until this point every thing is OK,
that client can see all values reside in these text boxes in the datagrid
and he can edit them,
but the problem is like this ;
i have an update button and in its event i am iterating throuhg all datagrid items and for each cell in the datagrid i want to get back the value from the text box in it,

but i cant find a text box in the cell.Controls,
i think this is because i have created them dynamically they just appear
after postback the page,
please can anyone help me on this or have an alternate solution ..

thank you all.
--
theGST

Nov 19 '05 #2
Thank you,
i now that i can do this but i tried to find anothor solution, cuz i have 61
fields coming from that file, and thus i will have to define all these
template columns.

thank you again.

"Eliyahu Goldin" wrote:
Instead of creating textboxes dynamically you should use templated columns
and put a textbox in the item template.

Eliyahu

"itgMan" <ab******@gmail.com> wrote in message
news:E0**********************************@microsof t.com...
hello friends,

i have a question about datagrid,
i have binded a datagrid with a datatable from values that came from a

comma
seperated values (.CSV) file

i have created textboxes in all datagrid cells on the ItemDataBound event
and put text from each cell to the new text box in that cell,
until this point every thing is OK,
that client can see all values reside in these text boxes in the datagrid
and he can edit them,
but the problem is like this ;
i have an update button and in its event i am iterating throuhg all

datagrid
items and for each cell in the datagrid i want to get back the value from

the
text box in it,

but i cant find a text box in the cell.Controls,
i think this is because i have created them dynamically they just appear
after postback the page,
please can anyone help me on this or have an alternate solution ..

thank you all.
--
theGST


Nov 19 '05 #3

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

Similar topics

2
by: magister | last post by:
Hello, I have xml like this.... <test> <question>sdfsa</question> <section><question>43ga</question> <question>asdf</question> </test>
0
by: Randy | last post by:
Hello, I have two questions... I have a datagrid. I'm capturing the cell via HitTestInfo. The first question is fairly simple. I'm using an example of how to capture the row/column I found on the...
3
by: BBFrost | last post by:
Ok, I know how to count the number of selected datagrid rows using the code below. What has me stumped is how to determine when the selected rows within a datagrid have been changed. The...
6
by: BBFrost | last post by:
I'm using Net 1.1 (2003) SP1 & Windows 2000 Here's the issue ... Rows 12 thru 24 are selected in a datagrid. The user now unselects rows 12 thru 24 and selects rows 45 thru 70 ??? How can...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
2
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last,...
3
by: Danky | last post by:
Hello Masters! Anyone can help me with the datagrid, well, the app load a lot of data from DB and it show on the datagrid, and well, I need to allow paging and.... the issue is with the event...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...
0
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.