开发者

Show Message When Click On asp:Gridview

I would like to show alert() when user clicks on asp:gridView. in column 1

i has been a gridview that fill by linq;

 <asp:GridView ID="GridInbox" runat="server" Width="813px" CellPadding="4" 
                        ForeColor="#333333" GridLines="None">


                 开发者_如何学运维   </asp:GridView>

2. how can==>column[1].width=10;


Update :

If it is bound column

<asp:BoundColumn onClientClick="javascript:alert('blah blah');" />

If it is template column

<ItemTemplate>
    <div onclick="javascript:alert('Clicked');">
<asp:label text="blah blah" />
</div>
</ItemTemplate>

You mean something like this?

<div onclick="javascript:alert('Clicked');">
<asp:gridview runat="server">
</asp:gridview>
</div>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜