I have to LinkButtons in a DataGrid, and each of them has a Command="Select"
attribute set up.
When either of hte LinkButton's is clicked, I want the proper row in the
DataGrid to be selected, but I then want to do a different operation
depending on which LinkButton was clicked.
Here's some of the Html out of my DataGrid
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="lnkViewEdit" Runat="server" CommandName="Select"
CausesValidation="false" Text="View"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Status">
<ItemTemplate>
<asp:LinkButton ID="lnkStatus" Runat="server" CommandName="Select"
CausesValidation="False" Text='<%# DataBinder.Eval(Container,
"DataItem.Status")%>' OnClick="lnkStatus_OnClick"/>
</ItemTemplate>
</asp:TemplateColumn>
In my dgIssues_OnSelectedIndexChanged DataGrid event, I can't see a way to
figure out a way to find out which LinkButton raised the event.
I tried adding an OnClick event to my second LinkButton, lnkStatus. When
debugging I realized that this event is called BEFORE the
dgIssues_OnSelectedIndexChanged event. I wanted to do the custom operation
if the second LinkButton was clicked AFTER the
dgIssues_OnSelectedIndexChanged event was called.
Thanks in advance for any help or tips. 2 2036
What about specifying a CommandArgument and then checking the
e.CommandArgument property?
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"George Durzi" <gd****@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl... I have to LinkButtons in a DataGrid, and each of them has a Command="Select" attribute set up. When either of hte LinkButton's is clicked, I want the proper row in the DataGrid to be selected, but I then want to do a different operation depending on which LinkButton was clicked.
Here's some of the Html out of my DataGrid
<asp:TemplateColumn> <ItemTemplate> <asp:LinkButton ID="lnkViewEdit" Runat="server" CommandName="Select" CausesValidation="false" Text="View"/> </ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn HeaderText="Status"> <ItemTemplate> <asp:LinkButton ID="lnkStatus" Runat="server" CommandName="Select" CausesValidation="False" Text='<%# DataBinder.Eval(Container, "DataItem.Status")%>' OnClick="lnkStatus_OnClick"/> </ItemTemplate> </asp:TemplateColumn>
In my dgIssues_OnSelectedIndexChanged DataGrid event, I can't see a way to figure out a way to find out which LinkButton raised the event.
I tried adding an OnClick event to my second LinkButton, lnkStatus. When debugging I realized that this event is called BEFORE the dgIssues_OnSelectedIndexChanged event. I wanted to do the custom operation if the second LinkButton was clicked AFTER the dgIssues_OnSelectedIndexChanged event was called.
Thanks in advance for any help or tips.
What about specifying a CommandArgument and then checking the
e.CommandArgument property?
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"George Durzi" <gd****@hotmail.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl... I have to LinkButtons in a DataGrid, and each of them has a Command="Select" attribute set up. When either of hte LinkButton's is clicked, I want the proper row in the DataGrid to be selected, but I then want to do a different operation depending on which LinkButton was clicked.
Here's some of the Html out of my DataGrid
<asp:TemplateColumn> <ItemTemplate> <asp:LinkButton ID="lnkViewEdit" Runat="server" CommandName="Select" CausesValidation="false" Text="View"/> </ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn HeaderText="Status"> <ItemTemplate> <asp:LinkButton ID="lnkStatus" Runat="server" CommandName="Select" CausesValidation="False" Text='<%# DataBinder.Eval(Container, "DataItem.Status")%>' OnClick="lnkStatus_OnClick"/> </ItemTemplate> </asp:TemplateColumn>
In my dgIssues_OnSelectedIndexChanged DataGrid event, I can't see a way to figure out a way to find out which LinkButton raised the event.
I tried adding an OnClick event to my second LinkButton, lnkStatus. When debugging I realized that this event is called BEFORE the dgIssues_OnSelectedIndexChanged event. I wanted to do the custom operation if the second LinkButton was clicked AFTER the dgIssues_OnSelectedIndexChanged event was called.
Thanks in advance for any help or tips. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Calvin Lai |
last post by:
Hi all,
Does anyone know how I could add a confirm (client side) feature on those
Delete Linkbutton in DataGrid? Thanks,
|
by: Solomon Shaffer |
last post by:
This is very interesting - and odd. I have a number of LinkButtons
that are created in a custom data grid that I created. The purpose of
the LinkButtons is to provide alphabetical filtering...
|
by: Bazza Formez |
last post by:
Hi,
The intended functionality is as follows :
I want the user to be able to click on the LinkButton for an individual row
in a datagrid, server side sub grabs id for item selected, stores in...
|
by: Danny Ni |
last post by:
Hi,
I have a LinkButton inside a datagrid, when this LinkButton is clicked, the
program deleete a record in database. I would like to add a confirmation on
client side. I know I can do...
|
by: George Durzi |
last post by:
I have to LinkButtons in a DataGrid, and each of them has a Command="Select"
attribute set up.
When either of hte LinkButton's is clicked, I want the proper row in the
DataGrid to be selected, but...
|
by: CharlesA |
last post by:
Hi folks,
I really need help with the following scenario,
I'm going to describe as well as a I can what the setup is and what I can't
understand
I'm using the framework 1.1 using ASP.net with...
|
by: Alex Maghen |
last post by:
I have a DataGrid control with a LinkButton command column that deletes the
row. What I want to do is set it up so that there's a client-side Confirm
alert BEFORE the actual Delete command gets...
|
by: settyv |
last post by:
Hi,
I need to generate PDF stream when i click on Linkbutton in datagrid
..At present i hardcoded the
DMS Id and now it is working.But i need to pass DMS ID when click
linkbutton.How can i do...
|
by: rcoco |
last post by:
Hi all,
I have a datagrid with Button column select in form of hyperlink. On
the same page, I have another datagrid that insert data and one
column(Name) has Names of a user that is inserting...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |