ashkufaraz
ashkufaraz

Reputation: 5297

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;

Upvotes: 0

Views: 687

Answers (1)

Anuraj
Anuraj

Reputation: 19598

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>

Upvotes: 1

Related Questions