开发者

Listview and using graphics

I have a listview with a top 10 showing me values. I wanted to try and spice it up a tad by showing something like an up arrow graphic for values that are up, a down graphic for a value that is down. Is that something easy to so within the 开发者_高级运维listview and can someone help or guide me through a code to be able to do that??

Thanks


Sure, you can set OwnerDraw to true and then handle the DrawItem, DrawSubItem, DrawColumnHeader events.

Note this is assuming you're talking about the WinForms ListView.


Yes, very easy. See the ListView control MSDN documentation.

<asp:ListView runat="server" ID="ListView1" DataSourceID="SqlDataSource1">
  <ItemTemplate>
        <asp:Image ID="Image1" runat="server" 
          ImageUrl='<%#Eval("UpOrDown") + ".jpg" %>' />
  </ItemTemplate>
</asp:ListView>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜