使用模版列
<asp:TemplateField >
<asp:Label ID="lbl02" runat="server" Text='<%#Eval("goods_name").ToString().Length>20? Eval("goods_name").ToString().Substring(0,19)+"...":Eval("goods_name").ToString()%>'
ToolTip='<%#Bind("goods_name") %>' ></asp:Label>
</asp:TemplateField>