Child GridView control does not get displayed

I have a schopping cart Gridview that is bound to a SQL table. When I click add button on the control, I then add the item to a temp schopping cart table through RowCommand event, which works well. I want to use the bound functionalities (Update, delete, etc..) of the child Gridview control which is also bound, but the SQL query is depends on an item within a row of the Parent Gridview. 

Parent:

<asp:GridView ID="GridView5" runat="server" AllowPaging="True"
                        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333"
                        GridLines="None" DataKeyNames="PartsID" DataSourceID="SqlDataSource1"
                        onrowcommand="GridView5_RowCommand" PageSize="20" >
                        <RowStyle BackColor="#E3EAEB" />
                        <Columns>
                            <asp:BoundField.......

</asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:ConnString %>"
                        SelectCommand="SELECT * FROM [Parts]"></asp:SqlDataSource>
Child:

I want to display it when e.CommandName == "AddToCart" on RowCommand event, but it does NOT display. Does it have to do when the Child Gridview gets rendered???

 Thank You,

Edski

0
edski
1/22/2009 5:09:09 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
695 Views

Similar Articles

[PageSpeed] 21

 Found it, just did a:

Gridview6.DataBind()

 

at the RowCommand Event, which triggered a postback...

 

Edski...

0
edski
1/22/2009 9:33:15 PM
Reply:

Similar Artilces:

GridView child of GridView
I have a Parent GridView and when you click in the Edit one of the columns has a Template Field which has a Child GridView. When you click Edit on the Child GridView I have a Template Field that has a TextBox. How to I retreive this value of the TextBox? GridViewParent-- GridViewChild (Edit - Template Field containing this GridViewChild)----- TextBox inside Template Field in GridViewChild. Thank you.Peace in ChristMarco Napolihttp://www.ourlovingmother.org What you can do as a solution is to override the RowDataBound and try to find the child GridView control. Once you get a reference to...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say it...by the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,MCAD.net,MC...

Issue with getting values from child controls in a gridview, to use for the update using a SQLDataSource control
Hi all, I have a gridview bound with a SQLDataSource. I am using the Update feature of the SQLDataSource to update a SQL Server database with values entered into the gridview. However I am not getting it to work. I believe this is due to the controls that contain the user entries are not the gridview itself, but rather child controls within the gridview. I have been using the names of the actual controls but nothing happens. Upon submit, the screen returns blank, and the database is not updated. Here is some code:   <asp:GridView ID="GridEditSettlement" runat="server" AutoGenerate...

using javascript getting value from textbox when edit button is clicked and both controls are present in gridview control
Hi All using javascript I want to get value  from textbox when edit button is clicked and both controls that is texbox and button are present in gridview control .Alok Hi aloksinha83, Please see this post: http://forums.asp.net/t/1069245.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

Menu control is displaying behind Gridview control
I have placed a menu control just above the gridview control but when i click the menu control it displaysome of the menu options and rest of the menu options display behind the gridview.Is there anyway any option which make the menu to display over gridview.Mark as answer if anybody's post has helped you Typically the ZIndex will control that: http://www.w3schools.com/Css/pr_pos_z-index.aspDavid Kiffhttp://DavidKiff.co.uk-- "Mark As Answer" If my reply helped you --...

gridview control in another gridview control
Hi ia have a questioni have a gridview control which contains button in one colum.now my question is i need another gridview to be placed in the  first gidviewso that when i click on the button the second gridview will populate the data.now my question is how to place second gridview in first gridview.or is there any approach like first grid itself acting as parent and child.please help me  Hi sirikalavalapalli:                I think nested gridview will help you. Check this link and it will show you how...

get child control to gridview
Hi,   I need to get child control to the gridview during edit mode. In fact I have a date field, during edit mode, the date will be in a textbox, beside the textbox is an image button. For what I need is if user click on the button, it will popup a calendar. After user selected the date, then calendar will automatic close. And that selected date will be place into the textbox. So, how do I get control to the image button which is in edititemtemplate? Is anyone can help me!! Calvin...

OnBubbleEvent with Button (child control) in GridView (parent control)
I have a button (created at runtime) inside the gridview.  I'm having a hard time telling the grid view that row 1 (the row which was selected when the button is clicked) is selected. Here's my code so far:  protected void ContentsGrid_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { counter++; //Display Imagebutton for View in column 1 ImageButton imgView = new ImageButton(); imgView.ID = "imgView" + c...

Gridview control embedded in another gridview control
I am writing an ambulance crew scheduling application on the web and I need some help completing the last part.  I have an access database that has three tables: user table, shift table (describing the shifts available), and a schedule table (that stores shift by shift_id and user by user_id).  I have a gridview control that will display the available shifts but I cannot get the embedded gridview control that will display the user that is signed up for each shift to display because I cannot figure out how to use the OnRowDataBound method.  I need a simple VB example of how to...

ParseChildren for child controls but not sub-child controls
I'm developing a custom control that will be set up like this (very similar in structure to a DataGrid) <TEST:FillOutForm ...> <HeaderTemplate> This is the header </HeaderTemplate> <Fields> <TEST:Field ... /> <TEST:Field ... /> </Fields> </TEST:FillOutForm ...> I defined the ParseChildren attribute for class FillOutForm to parse the child tags as properties: <ParseChildren(ChildrenAsProperties:=true)> _ Public Class FillOutForm .... It can ...

Getting Information from the Controls (TemplateField or BoundField ) from any of the Data Presentation Controls
Hello Everybody,I have a very important question for me.For example, I have a GridView.It has three BoundFields and one TemplateFieldI want to get information from any of the record (row,line etc ) using any of the BoundFields or TemplateFields.And also I want to accomplish this not only with GridView but also other Data Presentation Controls, DetailsView FormView and Repeater.Shortly, Can anybody help me how to refer Controls in GridView, FormView, DetailsView, RepeaterPS: I have searched in Google and many sites,forums. But I couldn't see any solution and see that many people ask the same ...

Get controlID from control (textbox) inside another control (gridview)
Ok, so I've been trying to get a link within the edit item template of a gridview to open a new window.  I can do that fine, but when I try to pass the new window the controlID of the textbox to pass the value back to in the originating page I can't get the correct ID.  (that was a mouthful)  Maybe my code will explain better...  <EditItemTemplate> <asp:TextBox ID="EndTextBox" runat="server" Text='<%# Bind("endtime") %>'></asp:TextBox> <a href="javascript:;" onclick="window.open...

Help Req: !!! :- On Disabling Controls Present inside a Gridview control
Hi All, We have A requirement Where we have disable controls inside a grid.These controls can be textbox, DropDownlist (in TemplateField), ComandField present inside the grid.We have to call a generic method for doing the same .(since it can be done for multiple grid.) PFB the code snippet we use. Which disables all the controls inside the page.The bolded part of the code is used to loop inside a grid view.(Not Working.)Is this ideal way to deal with the requirement.Or can someone suggest be a better way.        public void DisableMe(Page p1, st...

Getting value of a property in Parent User control from a Child user control
I have a ChildUserControl that is loaded inside a ParentUserControl. The host page loads ParentUserControl.I would need to access properties in ParentUserControl from the ChildUserControl.Thanks for your time Here's some ideas: You can from the child access the parent and run findcontrol. child.parent.findcontroL("indyanguy1") child.parent.parent.findcontrol("indyanguy1") The trick is when you get your findcontrol working to cast the result to the object type your looking forHere I'm looking for a label so I cast to label then I can use the .Text property.Y...

Web resources about - Child GridView control does not get displayed - asp.net.presentation-controls

Wikipedia:File copyright tags/Displayed and ranked - Wikipedia, the free encyclopedia
... images in Wikipedia. In order to more easily locate the best copyright tag for any given image, currently available copyright tags are displayed ...

Facebook to adjust calculations for total check-ins displayed on place pages
... go into effect within the next few weeks, and page owners might notice a difference in their total “were here” tally. Total check-ins are displayed ...

CSS3 : What is the best method for adding 2x images to webpages that will be displayed on the new iPad ...
Answer (1 of 14): WebKit deals in logical pixels and a device pixel ratio to render stuff. It knows nothing about the physical pixels of the ...

QuakeFeed Earthquake Map, Alerts and News - World Earthquakes Displayed on Esri Maps on the App Store ...
Get QuakeFeed Earthquake Map, Alerts and News - World Earthquakes Displayed on Esri Maps on the App Store. See screenshots and ratings, and read ...

Is this not bigotry displayed by Houston, TX 3rd grade teacher Angela Box? - YouTube
There is a controversy brewing over third grade elementary school teacher Angela Box. She teaches at Houston Independent School District (HISD) ...

Hoon’s crushed car displayed
Hoon’s crushed car displayed

Surgeon who cut away child's hip bone displayed 'unsatisfactory professional performance'
... orthopaedic surgeon who removed substantial bone from a teenage girl's misaligned hip, further destabilising it and destroying her joint, displayed ...

Wrong flag displayed before North Korea soccer match halts Games
... international incident when the North Korea women's team refused to take the field for more than an hour after the South Korean flag was displayed ...

MH17 plane fragment to be displayed by Russian museum: reports
A fragment of Malaysia Airlines flight MH17 will be put on display despite investigators seeking all debris to find out why it crashed.

Sydney siege: Flag displayed during Martin Place hostage crisis not same as that used by terrorist group ...
The flag displayed during the siege at a Sydney cafe is not the same one used by the Islamic State terrorist group.

Resources last updated: 1/15/2016 7:35:32 AM