2 Temmuz 2013 Salı

printing enum in .ascx

Printing value of an enumeration in .ascx :
1:  <telerik:GridTemplateColumn HeaderText="Univ" DataField="Stud.EnumUniv"  
2:            UniqueName="Stud.EnumUniv" SortExpression="Stud.EnumUniv"  
3:            HeaderStyle-Width="100px">  
4:            <ItemTemplate>  
5:              <%# Enum.Parse(typeof(SauEnum.EnumUniv), DataBinder.Eval(Container.DataItem, "Stud.EnumUniv").ToString()).ToString()%>  
6:            </ItemTemplate>  
7:          </telerik:GridTemplateColumn>