Questions tagged [rowcommand]

Use RowCommand event if you have problem related Button like controls)'s click event inside asp:GridView.

The RowCommand event is raised when a button is clicked in the GridView control. This enables you to provide an event-handling method that performs a custom routine whenever this event occurs.

Buttons within a GridView control can also invoke some of the built-in functionality of the control. To perform one of these operations, set the CommandName property of a button to one of the values in the following table.

Syntax: public event GridViewCommandEventHandler RowCommand

See usage example here.

102 questions
1
vote
1 answer

Nested Gridview RowCommand event cause Parent GridView RowCommand fire

I have two gridview , one is parent and another is child , each gridview has its own OnRowCommand event. when a gridview rowcommand fire for a child row , rowcommand event of parent fired. and this cause following error in gvProject row command…
mina morsali
  • 778
  • 1
  • 16
  • 29
1
vote
1 answer

how to get data from a gridview

I display customers past orders in a gridview. They can press the Resend button in the last column to resend their order under the condition that the order is paid or past that status. First the gridview:
Rene
  • 29
  • 1
  • 9
1
vote
1 answer

gridview does not update after delete row by RowCommand in updatepanel

I can't get the Gridview in the Updatepanel to refresh after I've made changes. can someone help? I'm using rowCommand for Delete Row in GridView . I'm using the ToolkitScriptManager control and the UpdatePanel.
user3197356
  • 11
  • 1
  • 3
1
vote
5 answers

Row command event not firing for image button in gridview?

I have a gridview with an image button in each row.I have set the command name and command argument .
user3065219
  • 45
  • 2
  • 12
1
vote
3 answers

ASP.Net GridView - Update Row Command does not revert back to display-only

I have a GridView that is populated from a LinqDataSource. When I update a row, the RowCommand fires and the change is persisted to the database, but the Grid does not refresh. I have it in an UpdatePanel and explicitely call Update() in the…
cdonner
  • 37,019
  • 22
  • 105
  • 153
1
vote
1 answer

GridView's Button executes a different event other than RowCommand

I am using a GridView in ASP.net with a pre-added buttons. The GridView's data source is from a list of BookingRowStatus BookingRowStatus(Row, m_AStatus, m_BStatus, m_CStatus, m_DStatus, m_EStatus, m_FStatus) The arguments that you can see are the…
1
vote
2 answers

Linkbutton click in a asp:GridView cell does not trigger OnRowCommand event

UI Feature: I have a GridView with few columns. Most important column is PcCode, which shows a string value for each row. Expected: When I click on one of the cell from a row of that PcCode column another GridView should be displayed. However, when…
PineCone
  • 2,193
  • 12
  • 37
  • 78
1
vote
3 answers

LinkButton's not firing GridView_RowCommand

I have a LinkButton inside a GridView that passes a CommandArgument and tries to fire RowCommand GridView declaration:
dythe
  • 840
  • 5
  • 21
  • 45
1
vote
1 answer

Override rowcommand in gridview

I would like to refresh the page when delete button is clicked in gridview, however I could not find a way to do it, if I write my onrowcommand function if (e.CommandName == "Delete") { Response.Redirect("~/Order.aspx"); } it does redirect first,…
HOY
  • 1,067
  • 10
  • 42
  • 85
1
vote
3 answers

Stop GridView_RowUpdating firing from the GridView_RowCommand in ASP.Net

I have a GridView control and I have enabled editing. My edit & update buttons are both LinkButtons, as below:
Sun
  • 4,458
  • 14
  • 66
  • 108
1
vote
4 answers

GridView cell not registering any controls on RowCommand event

First off, I realize most of this can also be done using ItemTemplates. If what I'm trying to do simply isn't possible, I will consider using them instead. Here are the basics of my dilemma: I have a GridView in the ASPX page that is loaded in the…
beardog
  • 201
  • 1
  • 2
  • 9
0
votes
1 answer

Gridview Rowcommand Datakey gives index out of range error

I have added a button named reserve to my gridview, and when I click it I want do some modification on the gridview, however it gives index out of range error. Below is rowCommand method: protected void GridView1_RowCommand(object sender,…
HOY
  • 1,067
  • 10
  • 42
  • 85
0
votes
3 answers

How to get GridView's LinkButton ForeColor in RowCommand Event?

I have a GridView with the following columns.
thevan
  • 10,052
  • 53
  • 137
  • 202
0
votes
1 answer
0
votes
2 answers

GridView RowCommand event is not firing on footer template button click

i have GridView.AutoGenerateColumn=true. i have created button on footer on rowdatabound when i click on button row command event is not fired Here is my code: dt =…
SMeha
  • 61
  • 3
  • 8