Getting data from controls in Edit mode, I'm confused about control access

I have datagrid with a few BoundColumns, and one TemplateColumn.
In edit mode, while trying to save the new record (clicking on "Save")
I want to get the new values, I figure out that for BoundColumn I need to get it by :


And for TemplateColum I need to do :


Means, for boundcolumn I'm accessing the first control,
and for templatecolumn, the second one.
am I right ? If so, why is that ?
Thanks !
4/18/2005 11:52:48 AM 72751 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 55
Get it on Google Play
Get it on Apple App Store


Similar Artilces:

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Getting User Control's Control Data
I am building a wizard that will pull opt reports.  Page 1 let's you pick a website you want to work with based on listings in a table.  Page 2 displays which options you can include in your opt report by bit fields in the same table that fills the dropdown on Page1.  Based on which fields get  a 1, user controls are loaded to display the options.  My question is this: How can I get the information on the options the user selects from the individual user controls? I've read up on serialization but I don't know how to capture an event that fires when a page submits a...

Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control.  The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...

How to apply ID to each control & find that specific control again to get data from the control?
Hi. i have problem with my codes & need someone help to fix my codes. my case is in addRow function, when i click the button, i will add textbox & dropdownlist control dynamically. but after click Save button, i got error msg  " File saved failed. Reason is as follows System.NullReferenceException: Object reference not set to an instance of an object. at Default2.Save_Click(Object sender, EventArgs e) in C:\Documents and Settings\My Documents\Visual Studio 2008\WebSites\WebSite2\Default2.aspx.vb:line 290  (objStreamWriter.WriteLine(CStr(MapTable.Rows.Count...

Getting Information from the Controls (TemplateField or BoundField ) from any of the Data Presentation Controls
Hello Everybody,I have a very important question for me.For example, I have a GridView.It has three BoundFields and one TemplateFieldI want to get information from any of the record (row,line etc ) using any of the BoundFields or TemplateFields.And also I want to accomplish this not only with GridView but also other Data Presentation Controls, DetailsView FormView and Repeater.Shortly, Can anybody help me how to refer Controls in GridView, FormView, DetailsView, RepeaterPS: I have searched in Google and many sites,forums. But I couldn't see any solution and see that many people ask the same ...

Bind Data to an Image Control not in a Data Presentation Control
I've been searching for two days but I don't really know what to search for.I'm making a site for a photographer.  The Default.aspx page displays Albums by showing a title, image and description from the database table Albums. Click an album to view the contents and it passes the QueryString which is AlbumName.  The ViewAlbum.aspx page uses the QueryString to display an UpdatePanel holding a Large Image and a Repeater full of dynamically filled ImageButtons for thumbs.  Both are from the database table Photos and are retrieved using an ObjectDataSource. Click the ...

User Control Within UserControl
If I have a user control A and then inside it a user control B embedded/referenced within it.  User Control A has a panel defined (cpeNewUser) that I want to manipulate from the code behind of User Control B based on some event that happens.So putting this in my code behind of User Control B won't work as it has no idea of cpeNewUser:cpeNewUser.Collapsed = true;So is it because only at runtime they are married up and because of this you cannot access each other's objects at compile time?  How would I get this to work becuase I'm using all user controls inside a AJAX Too...

ajax control in data presentation controls
can i add ajax controls (MaskedEdit) to presentation controls (dataGrid, dataForm)?? Hi,of course. But keep in mind that those controls are extenders, so you append them to an existing control. Just convert your GridView / DetailsView-fields into templated fields and add the extender you'd like to use to the controls.RegardsMarco Buerckel Don't forget to mark posts that were helpful as answers. Actually, if you looked at the source code for the Masked Edit Extender, you'd see  [TargetControlType(typeof(TextBox))]Meaning, targeting any control type other than textboxes...

Visibility control of Panel control and its affect on data controls
Thought I would toss this out here this morning and perhaps someone else had run across the same issue and had found a good way to accomplish what I want. First let me state what I'm attempting to do and the problem that I've run into.  GridView1 has a collection of rows in a SQL table that I want to present to the user. I've provided them the options of sorting and selecting only from the GridView control.  Orgionally, I had created a detail view that was being presented in Edit mode and then customized the layout of the edit item template to suit my needs.&nbs...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,,MC...

How to access page control (editor control) from user control?
Hi, I want to do something, but I don't know if it's even possible. I'm trying to make a simple application to edit my website. I have a page called editPage.aspx which contains an editor control. (cuteEditor from cutesoft) I also have a Treeview that dynamically populates my website structure. I placed this treeview in a custom control (populateTreeView.ascx) and placed it on the editPage.aspx page. When you click on a html file in the treeview (inside the custom control) I check if the file exists. If it does exists I send it to a class which retrieves the editable region within this ...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this? Information Technolo...

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

Web resources about - Getting data from controls in Edit mode, I'm confused about control access -

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Run-fests no more as bowlers take control in Adelaide
The extent to which batsmen struggled in Adelaide would have exceeded even the most pessimistic of forecasts.

‘Enough Is Enough’: Obama Demands More Gun Control After Colorado Shooting
President Obama again turned to gun control as a potential solution to the horrific act

Obama pushes for gun control after Colorado shooting
"This is not normal," president says after gunman fatally shoots three people, including police officer, at Planned Parenthood facility

Windows 10 vs. OS X: Which gives sys admins more control?
Now, nearly everything can be managed as if it were a mobile device, using APIs at the operating system for assured reach and consistent implementation ...

Boldin: Gabbert 'heck of a quarterback, he's poised, under control'
Skip to main content CSN Bay Area Header links TV Listings Contact App Email Follow Bar RSN login or register Login Search form Search 43° Navigation ...

Democrats New Plan For Gun Control – A Secret Government Terrorist Watch List
They call it the "Denying Firearms and Explosives to Dangerous Terrorists Act of 2015"

Mind-Control Bacteria Stop You From Eating Too Much
Gut microbes release proteins that stop the brain from thinking you're still hungry.

Indonesia says pilot response to faulty rudder control caused AirAsia crash
Indonesia says pilot response to faulty rudder control caused AirAsia crash

Easy Power Supply Mod Takes Control
... supplies are great for the home hobbyist, featuring wide voltage range and current limiting for a low price. What’s not to love? The controls; ...

Resources last updated: 12/1/2015 7:51:11 PM