Bhushan Posted March 3, 2006 Share Posted March 3, 2006 Hi All,I am populating datagrid from my database. I have 3 columns in my datagrid. First is editableCommandColumn, second is my primary key field column and third one is description column.Description contains 3 fields. So I have made use of template column and have used html table to place those 3 fields in 3 rows.But this field should be editable when I click the edit button. But hw can i make use of EditItemTemplate in table?..I tried to place this iside but gives error.Please see the below piece of code.<asp:TemplateColumn HeaderText="GIMS Details"> <ItemTemplate> <table border="1" width="450"> <tr> <td width="18%"> Description </td> <td> <%# DataBinder.Eval(Container.DataItem,"Description")%> </td> </tr> </ItemTemplate></asp:TemplateColumn>Hoe can i make this field editable by placing a text box with mode="multiline". Please let me know. Link to comment Share on other sites More sharing options...
aspnetguy Posted March 3, 2006 Share Posted March 3, 2006 what is the error? Can you post your codebehind as well. Link to comment Share on other sites More sharing options...
Bhushan Posted March 4, 2006 Author Share Posted March 4, 2006 Hi,If I were to have only 1 field for description i wouldn't have used HTML table. Since I have 3 fields , I am using html table so that i could format them accordingly. I think we cannot place EditableItemTemplate inside <td> ?? (donn know)..It's not giving any error Justin. It's just replacing everything ( every <td> value ) by textbox when I place like below.<asp:TemplateColumn HeaderText="GIMS Details"><ItemTemplate><table border="1" width="450"><tr><td width="18%">Description </td><td><%# DataBinder.Eval(Container.DataItem,"Description")%></td></tr></ItemTemplate><EditItemTemplate><asp:TextBox id="txt" runat="server" Mode="Multiline"/></EditItemTemplate></asp:TemplateColumn>I am not getting where exactly to place this EditItemColumn so that I can have this textbox available for editing in the right place and with other firleds visible.ThnxBhushan. what is the error? Can you post your codebehind as well.<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now