How to find a outer gridview row when a button in inner gridview row is clicked


I have a gridview within a gridview. In the inner gridview, I have a column of imagebuttons. I cannot figure out how to find out the row of the outer gridview when I click on the imagebutton in the inner gridview. I modifies the code below to get rid of some of the unnecessary stuff.










<asp:BoundField DataField="Summary" HeaderText="Item Description" SortExpression="Summary" ></asp:BoundField>











<asp:TemplateField ShowHeader="False">


<asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False"

CommandName="Edit" ImageUrl="~/assets/images/icons/EDIT.GIF" Text="Edit" OnClick="ImageButton1_Click" CommandArgument="e.Row" OnCommand="ImageButton1_Command" OnPreRender="ImageButton1_PreRender" />











11/17/2006 6:46:51 PM 72751 articles. 3 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 1


Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

Gridview row click event fires, when clicking on controls within row.
I have a gridview control and I have added  a row click event which causes a post back. e.Row.Attributes.Add("onClick", this.Page.ClientScript.GetPostBackEventReference(this, "Select$" + e.Row.RowIndex.ToString()));  When the user clicks the row, i bind some data to a checkbox list, showing a uers a list of options they have chosen. All good so far. I also have a edit button for each row. When the row is in edit mode i display a checkbox and textbox. Problem is when i click on the textbox or the checkbox, it causes the row click event to fire. Any ida...

Help! Find row on which a button was pressed in the gridview control in .NET 2.0
How do you get the exact row (and column data from that row)  on which a button was pressed within a gridview. In .NET v1 using the datagrid control the followingconstruction was available:objArgs.Item.Cells(n).Textusing the datagrid DataGridCommandEventArgs parameter. choices in gridview are     Sub cmdBackTestSummary(ByVal objSender As Object, ByVal objArgs As GridViewCommandEventArgs) ' objArgs.commandname ' objargs.commandarguement ' objargs.commandsource     End Sub but no objArgs.Item.Cells(n) So how do you get the exact row (and c...

Find the row number on click of a gridview row???
Hello everyone,I need to find the gridview row number on click of a row on Page_load not on any other event..!! How do i do that?Please help me..!!regards,Francis P. Ferns Sorry Francis, but I believe you're out of luck as the Page.Load event is way too early in the Page lifecyle to pick this up. This would most likely be done in the SelectedIndexChanged, RowCommand, or Click event of a Button.Thanks, EdMicrosoft MVP - ASP/ASP.NET Hi,Ya i understand that. Is there any other way i can find out the Row number.I ll tell you my actual requirement.Im implementing the ICallbackEventHa...

Adding row (one at a time) in gridview on a button click. And cells of added row should contain controls like DROPDOWN LIST or TEXT BOX.
Dear Friends, I am in great need for the solution/hints/guidance of my requirement, if anyone can help with.  Let me explain what I need."I need a Gridview control on a webpage having following 5 columns/fields.     Column 1: It just has a "+" button in its header only (other cells for this column is empty)    Column 2: The Column header here is "FIELD" and  it should contain dropdown list (which is populated from some database)    Column 3: The Column header here is "Operator" and  it should ...

Data Controls insert rows into gridview then insert rows from gridview into SQL Table
Hello there, I'm still new at performing miracles with code . Currently I am having trouble with my latest coding adventure I have a web application which records jobs and labour assigned to jobs. The issue in particular I'm having is the way in which labour is to be assigned. I want to use standard controls (Textbox, Dropdownlist) to record the values into a gridview (ie,put multiple rows into the gridview using the controls). Then, when all the inserting is complete, the user clicks a submit button to insert all the rows from the gridview into a database table. The reason for...

how to place a selected row from a gridview into another gridview by clicking a button
hi, In my application  i have binded the data from data base table to a grid view. my database table attributes are prodid,prodname ,price and qty. my grid view columns includes qty,prodname,price.i placed checkbox into my gridview and i placed a textboxes in the last column for placing required  qty from the available qty.after clicking on a checkbox of a perticular row  that selected row should be placed into another grid view by clicking on a submit button. the second gridview columns are serial no,prodname,qty(user required qty ), total price. in the last row of grid...

Changing the color of the Row in a Gridview on click of Radio Button in the Row
I have a GridView. One of its columns contain Radio Buttons. NOw on click of Radio button in a particular Row, I want to change the Background and Foreground Colors of that Gridview Row. Once the next Row is clicked, I want the color to change back to the original color. I am using the following template for Radio Button because of other functional requirement.                           <asp:TemplateField HeaderText="Select">   &nbs...

Iwant to select a row and column in gridview with select radiobutton. but No checked change event.below put a button .if click that button to seleced row values will select
I want to select a row and column in gridview using radiobutton in gridview . if which radio button is select that row will select and i want that row column values in outside individual textboxes of next page.  but in that only single radiobutton will select and no post back="true" bcz iam not using checked change property. i inserted button below gridview. if i click the that selected row and columns values are stored into textboxes of next page im using this code .but im getting one column in that row. but i want all columns in that selected row so plz repla...

How to access the row cells value of gridview on Select button click in Gridview
Hi Friends I am trying to getting the Row cells value on the Select command click. PLz any one know then reply me.  just add the code below between <Columns> element<asp:CommandField ShowSelectButton="True" />  then in you code add GridView1_SelectedIndexChanging events . inside the events you can get te id either  by writig id=GridView1.SelectedRow.cells[0].tostring or temp string= ctype(GridView1.Rows(e.NewSelectedIndex).FindControl(controlname),label)).textnote : assume that the ID is handled by label control in your datagrid.good luck&quo...

get the index of outer-gridview when the inner-gridview's button clicked
Hi all,I have a gridview GridView1, and inside of it there is a templatefield, where the templatefield contains of a gridview GridView2.The GridView2 has a templatefield a button Button1.If i click Button1, i need to know which row I click on the GridView1. So, how do I get the index of GridView1 in this case? I need to know this index, so that I can point to the correct row of GridView2 and GridView1. I need it on event GridView2_RowCommand, so I can cancel the data of clicked row.Please help me. Thank you so much... ^^ one idea is, when you click on a button in GridView2 you can reach up...

does anyone know how to do that, when I click the last row of the gridview, the gridview will automatically add an empty new row for me.
does anyone know how to do that, when I click the last row of the gridview, the gridview will automatically add an empty new row for me.   thanks hi there,the only I could think of for now is is enbale footer rowthen hide it onpageload so when last row click set footer.visible to true  ...

How to delete controls in GridView when the delete button in a row is clicked
Hi,   I am having issues with my gridview.....i added 2 dropdown and 2 compare validators....whenever i delete a row though......the dropdown and compare validators are becoming null........thus when i click a button, it is still validating.............anyway to delete this when i click the delete button or even handle?   Please help.  ...

Enable Radiobutton in Gridview that has Alternate rows when edit button is clicked, using GridView.RowCreated
OK I have a gridview that has alternate rows enabled to make it look pretty :) I also have Radiobuttons in an ItemTemplate that are disabled (from editing) on the load of the gridview.  What I want to do is when I click Edit I want the radiobuttons enabled.  Well I got that part down accept every other will not enable the radio buttons.  I know I have to check the status of the row to see if it an alternate row but how would I then enable the controls on that row for edit.  Here is my code I have been playing with.   any suggestion would be great...  1 &...

Web resources about - How to find a outer gridview row when a button in inner gridview row is clicked -

GridView SelectedItem Binding Gotcha in WinRT
Last night when I was doing some WinRT hacking I was trying to setup databinding to the selected item in the GridView control and I ran into ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Advanced Search Gridview Latest News Releases All ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Gridview ...

CNW Group
Home Services Beyond the Wire About CNW Financials Webcasts Events My CNW All News Releases Add a Filter Gridview Latest News Releases All Today ...

New CmdLets of Powershell 2.0
New CmdLets of Powershell 2.0

Price Drop: Softbox
... objects- create product reflection- changing the background with something more interestingUse it as:- softbox- honeycomb softbox- gridview ...

Profile.aspx: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 25 Oct 2012 - Upcoming stories is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

View Features - ExtendASP
Call 847-681-9827 or Request a Demo View Features Testimonials Pricing About Us Coming Soon ExtendASP exposes every feature, more than any other ...

Resources last updated: 12/17/2015 8:41:26 PM