TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vikas Ahlawat
NA
564
819.1k
how determine that which CommandField is selected on SelectedIndexChanged event?
Mar 5 2011 2:02 AM
I have a GridView with 2 CommandFields (Edit and Delete), how can I
determine in the SelectedIndexChanged event which CommandField is
clicked?
for some resion i can't use CommandName and commandargument . So i want to do it by CommandField
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
Font-Names="Trebuchet MS" Font-Size="9pt" ForeColor="#0000CC"
Width="100%"
onpageindexchanging="GridView1_PageIndexChanging"
onselectedindexchanged="GridView1_SelectedIndexChanged"
onrowcommand="GridView1_RowCommand">
<PagerSettings Position="Top" />
<RowStyle ForeColor="Black" HorizontalAlign="Left" />
<Columns>
<asp:CommandField HeaderText="Action" SelectText="Edit" ShowSelectButton="True">
<HeaderStyle BackColor="#CCCCCC" Font-Names="Trebuchet MS" Font-Size="9pt"
ForeColor="#0000CC" HorizontalAlign="Center" />
<ItemStyle ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:CommandField>
<asp:CommandField HeaderText="Action" SelectText="Delete" ShowSelectButton="True">
<HeaderStyle BackColor="#CCCCCC" Font-Names="Trebuchet MS" Font-Size="9pt"
ForeColor="#0000CC" HorizontalAlign="Center" />
<ItemStyle ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:CommandField>
</Columns>
<HeaderStyle BackColor="#CCCCCC" HorizontalAlign="Left" />
</asp:GridView>
Reply
Answers (
1
)
Table Data copy
Sending Email through Outlook Configured Account