In order to get to the Edit Item Template, you need to first create a Template Field column.
Using Template Fields in the Grid View Control eclipsed4utoo was on the right track, as far as how to get to the controls. But since the controls are buried in a Template Field, you cannot just do a find control on the Row.
Entry, (SELECT avg(rating) FROM tb_comments WHERE " _ & "tb_comments.entry=tb_entity.id) as Rating, tb_kind. Info " _ & "FROM tb_entity INNER JOIN tb_hijack ON tb_= tb_hijack. Kind = tb_" _ & "WHERE tb_entity.entry='" & strline.
Replace("'", "''") & "'" Else SQL = SQL & " OR tb_entity.entry='" & strline.
For the user to be able to check the checkbox, it needs to be a Template Field.
For example: Now this does get the control that is in the Item Template, not the Edit Item Template.
I'm programmatically querying the db and i'm not using the smart tag of the gridview. Yes, i could see the controls in item template, but not in edititemtemplate.
Is there any way to get controls of the edit template? Here's my source code: " Select Command="SELECT tb_entity. that's why i don't know how to go about it. ID); This results in a Null reference exception (it hasnt been found) Please any ideas? runat="server" Allow Paging="True" Allow Sorting="True" Data Source ID="Sql Data Source1" Cell Padding="4" Fore Color="#333333" Grid Lines="None" Auto Generate Columns="False" Font-Size="X-Small" Height="356px" Width="2696px" Is it generating the edit button in the first column (default)? Edit: never mind, this is in the row editing event - the cell hasn't generated the edit template yet I don't think. I'm giving examples, not typing up your whole app for you. It will not find it, you need to be more specific than that.A very important note, in order to get the control in the Edit Item Template, then the Grid View must be in Edit mode.when i use smart tag, upon loadng of the page, it queries all data in the db and show it to the page i don't want that to happen.