日期:2014-05-18 浏览次数:20501 次
select case when FiledName=1 then '是' else '否' end as FiledName from TableName
------解决方案--------------------
<asp:GridView ID="gvlist" SkinID="GvDeviceBuildDepict" runat="server" Width="700px" AutoGenerateColumns="False"> <Columns> <asp:TemplateField HeaderText="选择"> <ItemStyle Width="30px" HorizontalAlign="Center" /> <ItemTemplate> <input type="radio" onclick="f_selectvalue('<%#Eval("ID") %>')" name="select_radio"/> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> <asp:TemplateField HeaderText="类别"> <ItemStyle HorizontalAlign="Left" /> <ItemTemplate> <asp:Label ID="Label9" [color=#FF0000]Text='<% # setLeiBei( Eval("类别").ToString()) %>' [/color] runat="server"></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> <asp:TemplateField HeaderText="材料名称"> <ItemStyle HorizontalAlign="Left" /> <ItemTemplate> <%# Eval("材料名称")%> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> <asp:TemplateField HeaderText="材料编码"> <ItemStyle HorizontalAlign="Left" /> <ItemTemplate> <%# Eval("材料编码")%> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> </asp:TemplateField> </Columns> </asp:GridView> <webdiyer:AspNetPager ID="AspNetPager1" SkinID="PagerDefault" OnPageChanged="AspNetPager1_PageChanged" runat="server"> </webdiyer:AspNetPager> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID=&qu