Forms Data Controls :: Click On The Child Gridview And Get The Values Of The Parent Gridview?

Oct 25, 2010

I'm lost. I have a sub gridview in a gridview. In subGridbiview I have a button. How do I can clicking the button and get values outside the gridview? The subgridview not present the events ...

------------------------Gridview 1------------------------------------------

| cell(0) | cell(1) | Cell(2)| Cell(3 - ITEM TEMPLATE) | -
| | | | # # # SubGridview1 ######### -
! x1 | Y1 | Z1 | # Cell(0) ! Button #-
! | | | ######################-
------------------------------------------------------------------------------
| | | | # # # SubGridview1 ######### -
! x2 | Y2 | Z2 | # Cell(0) ! Button #-
! | | | ######################-
------------------------------------------------------------------------------

how do I click on the child gridview and get the values of the parent gridview? no events in the child gridview no number indexrow on the parent gridview I'm lost.

View 6 Replies


Similar Messages:

Forms Data Controls :: Show Child Gridview In Parent Gridview Using Nested Gridview

Dec 1, 2010

In nested gridview, i am finding some problem, i want to show child Grid headers in Parent Gridview. Can anyone tell me that how it is possible? Its very urgent. Waiting for quick response.

View 1 Replies

Forms Data Controls :: How To Update Parent Gridview After Updating Child Gridview

Dec 14, 2010

I have a parent gridview which has a child gridview in the itemsTemplate. Both are binded to different SqlDataSources. I can successfully update and delete rows in the child gridview. After updating in the child gridview, some related data in the parent gridview are not updated automatically. So i have placed ParentGridview.Databind() in the rowupdated event of child gridview. But it doesnt look working.

How can i accomplish this?

View 4 Replies

Forms Data Controls :: Nested Gridviews: Get Parent Gridview Rowindex From A Child Gridview?

Jun 15, 2010

I have a nested gridview containing gridviews: gvMaster(Parent) and gvAlternate(Child)

If I select a row in gvAlternate is there a way for me to find out what gvMaster row it is under? I want to highlight the selected gvAlternate row and the gvMaster row that it is under.

[code]....

I can get a certain set of rows of gvAlternate only by referencing which gvAlternate control set I want to access: this is based on the gvMaster.Rows and then using the FindControl and id name:

GridView
gv = (GridView)this.gvMaster.Rows[aRowNumber].FindControl("gvAlternate");

Therefore, it is true that a set of rows in a nested gridview is tied to a specific row in its master gridview, the question is does the child gridview know which set it's connected to or does it's master know if a childset has been selected?

View 2 Replies

Data Controls :: Passing Values From Gridview In Child Window To Textbox In Parent Window?

Jul 29, 2013

I have a page, which contains 2 textboxes. When i click on the first textbox, i have to open a child window (tool), that contains a gridview control with 2 columns (corresponding to the 2 textboxes). When the user clicks on any row in the gridview, it should send back the 2 column values back to the parent window to the corresponding 2 textboxes. how do i achieve this?

View 1 Replies

Data Controls :: How To Access DataKey Property Of Parent GridView From RowCommand Of Child GridView

Nov 8, 2013

I have followed your Nested level gridview and found it working, but i want add a button in the child element(from your example  i will have a btn  in Product grid and it should get contact_id (parent datakey value as well) ),as i  need to update in database.

View 1 Replies

Forms Data Controls :: Collapsible Child Gridview Inside Parent

Jan 29, 2011

I am using a collapsible child gridview inside a parent gridview. When I click on the expand image, the data to displayed is put up correctly, however when I make some changes in the child gridview, they seem to be lost!! That is, the changes do not get reflected in the database.

View 3 Replies

Forms Data Controls :: Event Of Child GridView Is Getting Fired Also At The Parent FormView?

Jul 21, 2010

since APS.Net 4.0 I have a curious problem with an event.

There is a FormView and inside of the EditItem there is a GridView. In the Footer of the GridView I put Controls for inserting records.

But when I fire a markup defined RowCommand of that GridView then the same event is getting fired for the Parent FormView. First I had 'Insert' as the CommandName and so I was getting the Error that my FormView had to be in insert mode to insert a record. Then I changed the RowCommand of the GridView to 'xxx' and I got also the RowCommand 'xxx' at the RowCommand eventhandler of the Parent FormView.

The project was migrated from .Net 3.5 a few days ago, but nothing was manually changed in the code/markup. And the problem was not there with the "old" framework.

[Code]....

Of course, I could simply change the CommanName of the LinkButton e.g. to 'InsertChild' but I would like to know:

Is this a known change or a bug of ASP.Net 4.0?

View 1 Replies

Data Controls :: Parent Child GridView When Editing

Feb 25, 2016

With reference to this article [URL].... I'm trying to access parent gridview datakey in child gridview edit row event. Code below.

protected void grvSubmittedExpensePerMachine_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView grvSubmittedExpensePerMachine = sender as GridView;
grvSubmittedExpensePerMachine.EditIndex = e.NewEditIndex;
string site=this.grvSubmittedExpenses.DataKeys[((row.NamingContainer as GridView).NamingContainer as GridViewRow).RowIndex].Value.ToString();

[code]....

View 1 Replies

Forms Data Controls :: Displaying Parent/child Data With Gridview?

Jul 15, 2010

I am currently trying to figure out the best way to handle a data formatting issue. I have a stored procedure that pulls back basically all the data I need, but using a gridview doesn't really give me what I need.

For example...currently the gridview displays data like:

Date1 ProjectCode1 Hours ApproveChkBox
Date1 ProjectCode2 Hours ApproveChkBox
Date1 ProjectCode3 Hours ApproveChkBox
Date2 ProjectCode1 Hours ApproveChkBox
...

I would like to be able to display the information like:

[code]....

Is there anyway to do this using a nested gridview? Or is there a proper way to display this type of format?

View 1 Replies

Web Forms :: Send Values To Parent Window On Gridview Click Event?

Sep 21, 2010

I have a form, which contains 2 textboxes. When i click on the first textbox, i have to open a child window (tool), that contains a gridview control with 2 columns (corresponding to the 2 textboxes). When the user clicks on any row in the gridview, it should send back the 2 column values back to the parent window to the corresponding 2 textboxes. how do i achieve this?

I can open the child window and get back the values using window.opener method in JS.

But can anyone help on how to bind the JS code to the onClick of every row in the gridview. How can i activate the OnClick event of every row/alternating row item of the gridview and bind the JS code and pass each column value to that JS method? The no of columns in the gridview can vary depending upon the data? So in that case, i have to have a collection to be passed to JS code that can contain n number of column values.

View 2 Replies

Data Controls :: How To Get DataKeys Value Of Parent GridView On Nested GridView Button Click

May 7, 2015

URL....When the user creates a new child record (2nd gridview) how can I ibsert a field from the parent level (obviously from the line where they clicked from).

View 1 Replies

Data Controls :: Check Uncheck All CheckBox In Child (Nested) GridView When Parent GridView CheckBox Is Checked Unchecked?

May 7, 2015

when i checked the checkbox in parent gridview, all checkbox in child gridview will be checked.

how can i select the checkbox of child gridview checkbox in the when i select the checkbox from the parent gridview?

code behind
protected void OnCheckedChanged(object sender, EventArgs e)
{

[Code].....

View 1 Replies

Data Controls :: Group GridView With Parent And Child Records

May 7, 2015

I am working in Asp.net 4.5. I need to create a grid as like below, I am struggling to make the merging cells and make it as multi header row by combining all the cells...

Is there any sample to make gridview like this.... I need to do this on codebehind. I browse through the internet and found couple of sample but those are not having the header like i posted. I am little confused about making full header  as merged cells....

View 1 Replies

Data Controls :: Check Parent CheckBox When Child GridView CheckBoxes Are Checked

May 7, 2015

how can i checked the checkbox in parentGridview whenever i checked a checkbox in childGridview?

View 1 Replies

Data Controls :: Bind Parent And Child GridView Using JQuery AJAX And JSON?

May 7, 2015

I am binding Gridview using json (first Gridview),which have some column with linkbutton. I want to bind other gridview(second Gridview) using json on click of Linkbutton inside first gridview . how to fire json on linkbutton click event ?

View 1 Replies

Data Controls :: Loop Through Parent And Child / GridView And Same Data To Database

Mar 3, 2014

 I have nested gridviews, in the outer grid I am displaying the question and in the inner grid 4 options are displayed in radiobuttons.  I have kept Lock Answer button inside Item Template in inner gridview , so this button is coming with each and every question and when i click on Lock Answer button in front of any question, its saving the corresponding answer in the database. For ex, if there are 10 questions this button is coming with all the questions, all the questions are on single page and all are multiple choice. Now everything is working mine, my requirement is that I need on 1 common Lock Answer button at the bottom of the page and not with all the questions. And when I click on that common button it should run for all the questions that are displayed on the screen at should fetch and update each unique answer corresponding to that question in the database. Below is my code:

<asp:GridView ID="gvouter" runat="server" GridLines="None" AutoGenerateColumns="False"
AllowPaging="false" OnRowDataBound="gvouter_RowDataBound" Width="100%" OnRowCommand="gvouter_RowCommand"
OnPageIndexChanging="gvouter_PageIndexChanging" >
<PagerSettings Position="Top" />
<Columns>
<asp:TemplateField>
<ItemTemplate>

[code]...

View 1 Replies

Forms Data Controls :: Update Parentpage Gridview With The Values From Child Page?

Aug 24, 2010

i am having a gridview on each row i am having a update and add button.

on click of either of the button i am opening a popup where the end user will enter data and on clck of ok button in the child page

based on the click ie

if i clicked update i need to update that particular row with the values from child page.

if i clicked on add i need to add a row below the row where i clicked add button .

View 1 Replies

Data Controls :: Display GridView Row Cell Values In TextBox Outside GridView On Button Click?

May 7, 2015

i want to show selected row of gridview into textbox then we can change these value  then we click update button then these value add into selected row., this row show the update value not previous using jquery . following my code.

<script type="text/javascript" src="~/Scripts/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// function Edit() {
var par = $(this).parent().parent();
var id = par.children("td:nth-child(1)");
var name = par.children("td:nth-child(2)");

[Code].....

View 1 Replies

Forms Data Controls :: Modal Popup - Store Data Temporary Until User Click Save In Parent Gridview

Nov 5, 2010

I have one parent gridview where each record will link to its details page (another child gridview in modal popup). May I know how do I store the values of the child gridview temporary (maybe in session) and repopulate the data into the parent gridview? Current problem is: once I click save in the child modalpop gridview, it binds the parent gridview before the child gridview data is stored in session. I want to store the data temporary until user click save in the parent gridview.

View 4 Replies

Insert Another Gridview2 Which Is Child Gridview Inside Every Row Of Parent Gridview - C#

Mar 30, 2011

I have a gridview1 which is the parent gridview and I want to insert another gridview2 which is child gridview inside every row of parent gridview This is the code in the .aspx

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:GridView ID="gridView2" runat="server">
</asp:GridView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

This is the code that I have added inside the RowDataBound Event and i'm just binding the gridview2 with the arraylist which is filtered data depending upon the contents of each row's invoice number.................

View 2 Replies

AJAX :: Collapsible GridView With Parent And Child GridView

Mar 17, 2012

I am doing a program for a collapsable grid view, for this initially my gridview binded as follows in the image

Now when I click on + sign I would like to show another gridview corresponding to the selcted ID 

This is my complete design

<asp:Panel CssClass="grid" ID="pnlCust" runat="server">
<asp:UpdatePanel ID="pnlUpdate" runat="server">
<ContentTemplate>
<asp:GridView AllowPaging="True" ID="gvCustomers" AutoGenerateColumns="False"
runat="server" ShowHeader="False" OnRowCreated="gvCustomers_RowCreated"
BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"

[Code] ....

My code to bind gridview 

protected void Page_Load(object sender, EventArgs e) {
if (!Page.IsPostBack) {
//string strProc = "uspSearchPayRoll";
string strQuery = "select distinct concat(e.firstname,' ',e.middleinitial,' ',e.lastname)

[Code] ...

How to bind other grid view on clicking + sign..

View 1 Replies

Forms Data Controls :: Display Child Record Details On Click On Parent Record In Grid

Jul 6, 2010

i have one parent grid on which if user clicks a record ,the child details should get displayed on same page.

for example :

There is one department details table and employees table:

if user selects a record in department details grid,then employees in the selected department should get displayed in the next grid in the same page

View 2 Replies

Forms Data Controls :: How To Read Parent Grid Values In Child Grid

Mar 12, 2010

I have Parent/Child Grid (also called Nested Grids).

Parent Grid (PG) :: PG has two template fields. 1st template field has "Category ID" and 2nd template has Child Grid

Child Grid (CG) :: CG is populated in PG's RowDataBund event based on "Category ID". In CG's DataBound event, I am doing something which I need to display in CG's footer row.

Problem :: In the footer row of each CG, I have to show the "Category ID" which is in PG' row. How can I get hold of the PG's row which hascurrent nested grid (there will 'n' child grids, one for each 'Category ID' in the PG ) so I can read the "Category ID"

I was thinking if I could do something (DataBound event of CG) like this..

string catId = ChildGrid.Parent[get the index of the current row in PG].Cells[0].Text;

View 2 Replies

Forms Data Controls :: Sum Parent And Nested Gridview Total In Footer Of Parent?

Jan 29, 2010

I want to sum my nested gridview column totals in parent grid's footer.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved