I have a gridview with template field on column 2 and 4. i've also used msgbox to output all column four's control ID and it's returning nothing.I need to get the control (dropdownlist and textbox) on these columns so that I could get their values to update SQL DB. Whois FROM tb_entity INNER JOIN tb_comments ON tb_= tb_comments. I think you're referring to Item template here.
Anyhow, when I do that, the textbox doesn't show up.
If I add autogenerateeditbutton="true" to the definition of the gridview, I still don't see it.
I have a break on the Sub statement for the Row Updating handler ... The Edit and Cancel buttons fire the Row Command event, however, the Update button does not. No breakpoint was triggered when I hit the Update button. I truly appreciate all the suggestions you've given.
This is becoming so frustrating it's getting almost comical. Breakpoints were triggered for the Row Editing and Row Command.
where Cells[index] is the one you should be modifying based on which column it is in question (still doing it in Row Editing) In case you use data-source controls, it might be feasible to do it in Row Data Bound: I've enhanced the concept above to use a static void method called Grid View Set Focus passing it a row from the Row Data Bound event and a control name/id) to make it easier and prevent a future bug if the column order changes in the future.
Which is usually what you want, but it doesn't work every time, and I haven't figured out the reasons why it works sometimes and doesn't other. David I suggested that the Row Updating function was being blocked by the . Data Bind() in the Row Command event so that only the Edit command will activate it (take it out of Row Editing). Twice for Row Command (1 for Row Editing and 1 for Row Canceling) and once for Row Editing. I am going to try and create this not as a web application but rather as a website and see if I notice any differences. Data Bind() in Row Editing, I said nothing about what might happen if you removed it. Then set your breakpoints in Row Command, Row Editing, and Row Updating and we'll see what happens. David OK, I'm offically out of bullets, at least for now. If I get some time, I'll see if I can duplicate this, but I'm suspecting there's something out there that neither of us have looked at yet. In Row Updating we get value normally but in function calculation A() i'm not getting value of textbox. and need to calculate that value and show edited value in same textbox also. LOL Each time through the code behind I was loading and binding my product table.