What is the method to customize columns in DataGrid ?

 Posted by Bharathi Cherukuri on 2/28/2012 | Category: ASP.NET Interview questions | Views: 4754 | Points: 40

We can use the Template Column for customizing columns in DataGrid.


<asp:TemplateField HeaderText="Birth Date">

<asp:Label ID="BirthDateLabel" Runat="Server" Text='<%# Eval("BirthDate", "{0:d}") %>' />
<asp:Calendar ID="EditBirthDateCalendar" Runat="Server"
VisibleDate='<%# Eval("BirthDate") %>' SelectedDate='<%# Bind("BirthDate") %>' />

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response