T
tshad
I have a row like this that works fine:
***************************************************************
<aspataGrid visible="False"
border=1
id="DataGrid1"
runat="server"
Width="400px"
Height="79px"
AutoGenerateColumns="False"
GridLines="None"
onEditCommand="DataEdit"
onCancelCommand="DataCancel"
onUpdateCommand="DataUpdate">
<AlternatingItemStyle BorderWidth="0px" BorderStyle="None"
BorderColor="White" BackColor="#ccccff"></AlternatingItemStyle>
<HeaderStyle Font-Bold="True"
BackColor="#6699cc"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Answer"
HeaderText="Answer"></asp:BoundColumn>
<asp:BoundColumn DataField="PositionID" visible="false"
ReadOnly="true" HeaderText="PositionID"></asp:BoundColumn>
<asp:BoundColumn DataField="QuestionUnique"
visible="false" ReadOnly="true"
HeaderText="QuestionUnique"></asp:BoundColumn>
<asp:BoundColumn DataField="AnswerUnique" visible="false"
ReadOnly="true" HeaderText="AnswerUnique"></asp:BoundColumn>
<asp:EditCommandColumn EditText="<img
src='..\images\Edit.png'border='0' id='textbox1'>" visible="true"
ButtonType="LinkButton"
UpdateText="<img src='..\images\update.png'
border='0'>" CancelText="<img src='..\images\Cancel.png' border='0'>" />
</Columns>
</aspataGrid>
**********************************************************************************
With this I get a text box in the "Answer" column and in the correct row.
If I only change the first bound column to a template:
***********************************************************************************
<Columns>
<asp:TemplateColumn HeaderText="Answer">
<ItemTemplate>
<asp:Label id="lblAnswer" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.Answer") %>'>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtAnswer"
runat="server"></asp:TextBox>
</FooterTemplate>
</asp:templateColumn>
<asp:BoundColumn DataField="PositionID" visible="false"
ReadOnly="true" HeaderText="PositionID"></asp:BoundColumn>
******************************************************************************
I don't get the text box anymore. I am using this to allow my to set up an
insert row in the footer.
Is there something I need to do special to a template to work with the
editcommandcolumn?
Thanks,
Tom.
***************************************************************
<aspataGrid visible="False"
border=1
id="DataGrid1"
runat="server"
Width="400px"
Height="79px"
AutoGenerateColumns="False"
GridLines="None"
onEditCommand="DataEdit"
onCancelCommand="DataCancel"
onUpdateCommand="DataUpdate">
<AlternatingItemStyle BorderWidth="0px" BorderStyle="None"
BorderColor="White" BackColor="#ccccff"></AlternatingItemStyle>
<HeaderStyle Font-Bold="True"
BackColor="#6699cc"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Answer"
HeaderText="Answer"></asp:BoundColumn>
<asp:BoundColumn DataField="PositionID" visible="false"
ReadOnly="true" HeaderText="PositionID"></asp:BoundColumn>
<asp:BoundColumn DataField="QuestionUnique"
visible="false" ReadOnly="true"
HeaderText="QuestionUnique"></asp:BoundColumn>
<asp:BoundColumn DataField="AnswerUnique" visible="false"
ReadOnly="true" HeaderText="AnswerUnique"></asp:BoundColumn>
<asp:EditCommandColumn EditText="<img
src='..\images\Edit.png'border='0' id='textbox1'>" visible="true"
ButtonType="LinkButton"
UpdateText="<img src='..\images\update.png'
border='0'>" CancelText="<img src='..\images\Cancel.png' border='0'>" />
</Columns>
</aspataGrid>
**********************************************************************************
With this I get a text box in the "Answer" column and in the correct row.
If I only change the first bound column to a template:
***********************************************************************************
<Columns>
<asp:TemplateColumn HeaderText="Answer">
<ItemTemplate>
<asp:Label id="lblAnswer" runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.Answer") %>'>
</asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox id="txtAnswer"
runat="server"></asp:TextBox>
</FooterTemplate>
</asp:templateColumn>
<asp:BoundColumn DataField="PositionID" visible="false"
ReadOnly="true" HeaderText="PositionID"></asp:BoundColumn>
******************************************************************************
I don't get the text box anymore. I am using this to allow my to set up an
insert row in the footer.
Is there something I need to do special to a template to work with the
editcommandcolumn?
Thanks,
Tom.