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
2
votes
1 answer

SqlDataSource UpdateCommand parameters not changing

I have a FormView with an UpdateButton and a SqlDataSource which are below. My updatebutton always update the Sil table with the same values (the values at the first line of my gridview), I couldn't figure out why.
HOY
  • 1,067
  • 10
  • 42
  • 85
2
votes
1 answer

GridView Template - How to Grab Data from Selected Row

IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
1
vote
1 answer

using OnRowCommand of the GridView in asp.net

i created a web application wherein i used the onrowcommand and created the handler in code behind, now i have a button inside the emptytemplate, whenever i click the button, my onRowCommand is not executed. Below is my code.
Abbas
  • 4,948
  • 31
  • 95
  • 161
1
vote
2 answers

How to fire RowCommand for a GridView which is inside a Repeater?

I have a Repeater and inside it a GridView. Now I want to to fire GridView's RowCommand. So can any one tell me how can it be?
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
1
vote
2 answers

Index out of range error when using row.FindControl inside a Asp.net Gridview rowcommand event with Paging Enabled

The following code works great on Page 1 of data inside an Asp.net Gridview control: If e.CommandName = "Void" Then 'Read the status of the ticket currently Dim RowIndex As Integer = CInt(e.CommandArgument) Dim row As…
codethrift
  • 2,337
  • 4
  • 17
  • 16
1
vote
3 answers

how to get value of dropdownlist which is inside a gridview on the click of a button?

I have a dropdownlist inside the gridview. Now i want when i click on a button then i can check the value of dropdownlist. I have fired rowcommand event of gridview for it but debugger is not able to go reach there..Please help me..My Code is …
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
1
vote
2 answers

Gridview not showing after Gridview RowCommand event?

I have a GridView that shows a list of restaurants and it's data from my database. In the last column I have a ButtonField. When the user clicks on the button, then the RowCommand fires and another GridView appears with the selected restaurant's…
pyuntae
  • 73
  • 8
1
vote
1 answer

Fill DDL on RowCommand

I have a gridview with a rowcommand and a linkbutton. When i press the linkbutton the row gets edited however the DDL should bound data with values from my databasetable but this does not work I do not know if this is the correct way of doing this…
Nils
  • 516
  • 3
  • 9
  • 33
1
vote
2 answers

Control not reflecting updates

I have a master page that has an update panel on it. One of the pages for the application I'm working on has a custom control with some asp:textboxes on it. That control also has a gridview. When an asp:linkbutton for a row is clicked the…
user1921
1
vote
2 answers

Grindview with imagebutton and rowcommand

i know this a frequently asked question, but i cant find the solution. I hope u can help me. i try ti bind imagebutton controls into a gridview. i want to handle the data for the row where the button was clicked my aspx file looks like …
user389431
  • 109
  • 1
  • 3
  • 12
1
vote
1 answer

Union two List in C#

I want to union, merge in a List that contains both references, so this is my code, how can I define a list ready for this porpouses? if (e.CommandName == "AddtoSelected") { List lstAux = new List(); foreach…
Jonathan Escobedo
  • 3,977
  • 12
  • 69
  • 90
1
vote
0 answers

Firing a GridView RowCommand event from a Button inside a Template Field - C#

So I have a GridView (gvSummary) which contains a template field with a button inside (btnOpen). This button's purpose is to open a second GridView (gvDetail) in a modal window based on row information from gvSummary. The problem I am having is that…
Johnathan
  • 879
  • 3
  • 12
  • 22
1
vote
1 answer

Find Gridview ID from within its RowCommand event

I have three GridViews whose IDs are: grdvwFilteredNo1, grdvwFilteredNo2, grdvwFilteredNo3 each with its own RowCommand event (each fired off by a LinkButton, on a row) grdvwFilteredNo1_RowCommand(object sender, GridViewCommandEventArgs…
NRT8
  • 25
  • 5
1
vote
1 answer

Gridview popup window not opening from RowCommand event corresponding to Linkbutton click

I have Linkbutton in the Gridview TemplateField. I want to Redirect to another Page in a popup Custom size window from RowCommand Event. Note: Here I don't want to call OnClientScript property of LinkButton to openJavascript Popup Custom Size…
Rita
  • 1,237
  • 5
  • 24
  • 46