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


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 :: 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

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 :: 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

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

Forms Data Controls :: Gridview Update From Template Field Not Updating

Feb 3, 2011

I have a gridview where I am using the update. I have converted the label into a templatefield and added a dropdownlist which is getting polulated in the Rowdatabound event. When I test the update i get an error

Cannot insert the value NULL into column 'StartTime', table 'HTC.dbo.EventDates'; column does not allow nulls. UPDATE fails.The statement has been terminated. so I am ussuming its still trying to update from the label rather than using the dropdownlist. here is my code:

[Code]....

View 1 Replies

Forms Data Controls :: GridView Not Updating / After Clicking Update Command Field?

Mar 12, 2011

I have a gridview and sqldatasource in a form. My sqldatasource has select,delete and update command. The delete command is working but the update doest not work when I click the update command field.

Here is my code [Code]....

View 3 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

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 :: Edit Update Delete In Nested Child GridView

Feb 4, 2014

I have been looking at the guide: [URL] ....

Is it possible to have an edit function, so you can edit the expanded records - fx if you want to add/correct information.

Adding a normal edit/delete button like on a normal gridview doesn't seem to work when it is nested.

View 1 Replies

Data Controls :: Keep Nested Child GridView Expanded In Update Panel On PostBack?

May 7, 2015

I am using nested gridview from [URL].  

I follow this link [URL] .... to solve my problem. 

Your code is useful and perfect for me.but my gridview and button are inside update panel.

So Nested Child GridViews is not remain Expanded on postback. Where should I need to do change to remain child gridview epanded on postback.

View 1 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

Adding/updating Child And Parent Record Same Time?

Sep 14, 2010

easiest way to create/update a parent and child record at the same time (like customer with multiple addresses) with least or no code as possible? Both Web Forms and in MVC.

View 1 Replies

DataSource Controls :: Update/insert Parent Child At The Same Time?

Sep 3, 2010

Is there a way to create a contact form that takes the name. address and other info for the master record; Then, somehow, on the same page, allow the user to enter multiple contact info as chid records (i.e. phone, email, etc.)

All this using the Objec DataSource or SQL DataSource (which ever is easy) and doesn't require writing too much code.

View 1 Replies







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