| | |
How to locate templatefield's contorls in C#?
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2008
Posts: 58
Reputation:
Solved Threads: 1
Hello Everybody!
I have a simple question: where can I get or set a control, which is in a template field?
I have a gridview, and I've created a templatefield in it, with a textbox inside. I want to use the data typed in that textbox, but I don't know how to reach it.
I've tried the following:
GridView1.SelectedRow.Cells[4]. how to continue? Looked for everywhere, but no sign of it.
(The textbox is int the fourth column).
Thank you!
I have a simple question: where can I get or set a control, which is in a template field?
I have a gridview, and I've created a templatefield in it, with a textbox inside. I want to use the data typed in that textbox, but I don't know how to reach it.
I've tried the following:
GridView1.SelectedRow.Cells[4]. how to continue? Looked for everywhere, but no sign of it.
(The textbox is int the fourth column).
Thank you!
•
•
Join Date: Oct 2008
Posts: 58
Reputation:
Solved Threads: 1
Thank you for your reply, but I haven't found the stuff there I was looking for. However, I've figured it out, so I post it to the others:
•
•
•
•
Control tex1 = GridView1.Rows[RowID].Cells[8].Controls[1];
//Here's the controlsource
TextBox box;
box = (TextBox)(tex1.FindControl("Name of the control"));
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: application extension problem
- Next Thread: Is Domain MailId required To send mails in Asp.net 1.0
Views: 680 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac chat checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi identity iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xsl





