Webboy2008
asked on
asp.net c#
When View Details link is clicked, I want to raise some command..
like response.write "hello"....as an example.
How to do it?
like response.write "hello"....as an example.
How to do it?
<asp:GridView ID="CustomersView" DataSourceID="Customers"
AutoGenerateColumns="False" AllowSorting="true" AllowPaging="true" PageSize="10"
DataKeyNames="Scheduleid" EmptyDataText="No transaction" runat="server"
CellPadding="3" GridLines="Horizontal"
>
<HeaderStyle BackColor="Maroon" ForeColor="White" />
<Columns>
<asp:BoundField Visible="false" DataField="scheduleid" HeaderText="Schedule id" ReadOnly="True" SortExpression="scheduleid" />
<asp:BoundField DataField="CustName" HeaderText="Custmer Name" SortExpression="CustName" />
<asp:BoundField DataField="meetinglocation" HeaderText="Meeting Location" SortExpression="meetinglocation" />
<asp:BoundField DataField="Begindate" HeaderText="Begin Date" dataformatstring="{0:MM-dd-yyyy}" SortExpression="Begindate" />
<asp:CommandField ShowSelectButton="True" SelectText=" View Details "/>
</Columns>
</asp:GridView>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi, you have to use javascript alert box for it.
Code Behind:
protected void GridView1_RowDataBound(obj
{
try {
if (e.Row.RowType == DataControlRowType.DataRow
e.Row.Controls(3).Visible = false;
LinkButton lnkBtn = (LinkButton)e.Row.Cells(5)
lnkBtn.Attributes.Add("onc
}
} catch (Exception ee) {
lblmsg.Text = ee.Message.ToString();
}