Live Chat Icon For mobile
Live Chat Icon

Is there a way to show more than one datafield in a column when using a datagrid?

Platform: ASP.NET| Category: DataGrid

Yes. Use a TemplateColumn in a DataGrid

<asp:DataGrid id='DataGrid1' runat=server AutoGenerateColumns=False>
		<asp:TemplateColumn HeaderText='Field'>
				<%#DataBinder.Eval(Container.DataItem, 'Field1').ToString()%> - <%#DataBinder.Eval(Container.DataItem, 'Field2').ToString()%>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.