S
SStory
I need help.
I have a datagrid bound to a dataset produced in code
this time I want to put in edit mode
I have that woring but can't format the edit mode stuff
tried EditItemtemplate as follows.
<asp:datagrid id="grdCommentsOnRep" runat="server"
CssClass="smallblacktext" Width="100%" AllowPaging="True"
AutoGenerateColumns="False" DataKeyField="CorRep_ID">
<AlternatingItemStyle
BackColor="Lavender"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="White"></ItemStyle>
<HeaderStyle ForeColor="White" BackColor="Purple"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:EditCommandColumn>
<asp:ButtonColumn Text="Delete" CommandName="Delete">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:ButtonColumn>
<asp:BoundColumn DataField="corDate" ReadOnly="True"
HeaderText="Date">
<HeaderStyle Width="15px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corCommentType" ReadOnly="True"
HeaderText="Type">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corJob_ID" ReadOnly="True"
HeaderText="Job ID">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corComment" HeaderText="Comment"
ItemStyle-Wrap="True" ItemStyle-Width="50%">
<HeaderStyle Width="300 px"></HeaderStyle>
</asp:BoundColumn>
<asp:TemplateColumn>
<EditItemTemplate>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corDate") %>'>
</asp:Label>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corCommentType") %>'>
</asp:Label>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corJob_ID") %>'>
</asp:Label>
<asp:TextBox Rows=4 Width=300px text='<%#
DataBinder.Eval(Container.DataItem, "corComment") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle ForeColor="White" Position="TopAndBottom"
BackColor="Purple" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
I want the edit mode for the comment to have like a text area 4 rows tall
and half the width of the screen or say 300pix.
what am I doing wrong?
thanks,
Shane
I have a datagrid bound to a dataset produced in code
this time I want to put in edit mode
I have that woring but can't format the edit mode stuff
tried EditItemtemplate as follows.
<asp:datagrid id="grdCommentsOnRep" runat="server"
CssClass="smallblacktext" Width="100%" AllowPaging="True"
AutoGenerateColumns="False" DataKeyField="CorRep_ID">
<AlternatingItemStyle
BackColor="Lavender"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="White"></ItemStyle>
<HeaderStyle ForeColor="White" BackColor="Purple"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:EditCommandColumn>
<asp:ButtonColumn Text="Delete" CommandName="Delete">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:ButtonColumn>
<asp:BoundColumn DataField="corDate" ReadOnly="True"
HeaderText="Date">
<HeaderStyle Width="15px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corCommentType" ReadOnly="True"
HeaderText="Type">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corJob_ID" ReadOnly="True"
HeaderText="Job ID">
<HeaderStyle Width="10px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="corComment" HeaderText="Comment"
ItemStyle-Wrap="True" ItemStyle-Width="50%">
<HeaderStyle Width="300 px"></HeaderStyle>
</asp:BoundColumn>
<asp:TemplateColumn>
<EditItemTemplate>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corDate") %>'>
</asp:Label>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corCommentType") %>'>
</asp:Label>
<asp:Label text='<%# DataBinder.Eval(Container.DataItem,
"corJob_ID") %>'>
</asp:Label>
<asp:TextBox Rows=4 Width=300px text='<%#
DataBinder.Eval(Container.DataItem, "corComment") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle ForeColor="White" Position="TopAndBottom"
BackColor="Purple" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
I want the edit mode for the comment to have like a text area 4 rows tall
and half the width of the screen or say 300pix.
what am I doing wrong?
thanks,
Shane