|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGrid1.DataSource = ds.Tables(2)i get in a dataset returned 3 Tables I want to display in a templated column the values of the table nr 3. DataGrid1.DataSource = ds.Tables(2) In a datagrid if i let AutoGenerateColumns=True all works ok. For example i get 3 rows displayed with the column names ID Title Modified Created Body What is the syntax if i want to have only over a templated column the columns Title and Body I tryed something like <%# DataBinder.Eval(Container.DataItem, "Title") %> but it did not work thanks <asp:TemplateColumn HeaderText ="Title">
<ItemTemplate> <asp:Label ID="lblTitle" Runat=server Text='<%# DataBinder.Eval(Container.DataItem, "PersonName")%>'> </asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtTitle" Runat=server Text='<%#DataBinder.Eval(Container.DataItem, "Title") %>'></asp:TextBox> </EditItemTemplate> </asp:TemplateColumn> Show quoteHide quote "Xavier" wrote: > hello, > > i get in a dataset returned 3 Tables > I want to display in a templated column the values of the table nr 3. > > DataGrid1.DataSource = ds.Tables(2) > > In a datagrid if i let AutoGenerateColumns=True all works ok. > For example i get 3 rows displayed with the column names > > ID Title Modified Created Body > > What is the syntax if i want to have only over a templated column the columns > Title and Body > > I tryed something like > > <%# DataBinder.Eval(Container.DataItem, "Title") %> > > but it did not work > > thanks > >
argumentoutofrangeexception using detailsview
ASP.NET, CSS, and Netscape 7.1 Detailsview with command field displayed as button Cant get user-entered values in GridView Scrolling DG w/a Fixed Header Fitting a character on a small button GridView Multiple Select Buttons How can I create a new excel file in webbrowser? it's really important thing to solve Thank you to the group - free game |
|||||||||||||||||||||||