D
Dave56
I have a column in a DataGrid with the following EditItemTemplate:
<EditItemTemplate>
<TextArea runat="server" Class="NormalText" wrap="soft"
id="TxtDescription" rows="3" cols="85"
style="FLOAT: left; POSITION: static">
<%# DataBinder.Eval(Container, "DataItem.Description") %></TextArea>
</EditItemTemplate>
In the DataGrid_ItemCreated subroutine
e.Item.FindControl("TxtDescription").ClientID returns "TxtDescription".
However, when I run the page and view source I see the following:
<td class="ResultsDim" valign="Top">
<textarea name="DGItems:_ctl6:TxtDescription"
id="DGItems__ctl6_TxtDescription" Class="NormalText" wrap="soft" rows="3"
cols="85" style="FLOAT: left; POSITION: static"></textarea>
</td>
This shows a client id of "DGItems__ctl6_TxtDescription".
- DGItems is the name of the DataGrid
- TxtDescription is the control
Where does the ctl6 come from?
Is there any way in the DataGrid_ItemCreated subroutine that I can get this
full clientID, or build it?
Thanks in advance.
<EditItemTemplate>
<TextArea runat="server" Class="NormalText" wrap="soft"
id="TxtDescription" rows="3" cols="85"
style="FLOAT: left; POSITION: static">
<%# DataBinder.Eval(Container, "DataItem.Description") %></TextArea>
</EditItemTemplate>
In the DataGrid_ItemCreated subroutine
e.Item.FindControl("TxtDescription").ClientID returns "TxtDescription".
However, when I run the page and view source I see the following:
<td class="ResultsDim" valign="Top">
<textarea name="DGItems:_ctl6:TxtDescription"
id="DGItems__ctl6_TxtDescription" Class="NormalText" wrap="soft" rows="3"
cols="85" style="FLOAT: left; POSITION: static"></textarea>
</td>
This shows a client id of "DGItems__ctl6_TxtDescription".
- DGItems is the name of the DataGrid
- TxtDescription is the control
Where does the ctl6 come from?
Is there any way in the DataGrid_ItemCreated subroutine that I can get this
full clientID, or build it?
Thanks in advance.