Forms Data Controls :: Nested Gridview With CollapsiblePanel Extender?
Jan 8, 2010
Am trying to build nested gridview with Edit,Update and Delete operations.Everything works fine at parent level,but child grid is only having last fetched datatable records.Any idea whats going on:
when i run the application,i can see parent grid showing all records.But the problem is with child grdiview which is showing the last recordset of childdata on expanding first row of parent grid.No idea whats going on...
Here is the aspx code:
[Code]....
Here is the Codebehind:
[Code]....
View 13 Replies
Similar Messages:
Aug 2, 2010
Ques 1. I am pasting only excerpts of my panel code (limited length here) within which I have 3 levels. The collapsible panel works fine till level 2 but when I am clicking on level 3 it shows for a second and collapses back to level 2. The collapsible doesnt work on panel pnlUserAccess below.
Ques 2. Can I make collapsible panel work on particular button click or image click?. As when I just put to to 2 levels I have to edit within the gridview and as soon as I click on the checkbox to edit the panel collapses.. I need to just give it a tree view style of appearance.
Ques 3. Can I also make the collapsible panel enable on read mode and disable on edit mode (if there is no possiblity for Ques 2)how to make it work. Just to be more specific on the code.
[Code]....
View 1 Replies
Mar 1, 2011
I'm trying to create a nested gridview, but I'm stuck at the editing/deleting part of the nested gridview. (Below is my code).The nested gridviews are filling out nice, I've set the DeleteParameter in the SQLDataSource, but I'm still getting this error when trying to delete a criteria: 'The Gridview 'gvCriteria' fired event RowDeleting which wasn't handled.'I've tried to create a method 'gvCriteria_RowDeleting', but that didn't seem to work out.Someone who can give me a piece of advice? Would it be possible to fill the gridview without using gvDomain_rowDataBound? Dries
[Code]....
[Code]....
And the C# behind:
[Code]....
View 10 Replies
Jun 17, 2010
Is there a better, cleaner way to do this in ASP.NET 2.0?
An ASP.NET 2.0 page displays a datalist of records. Each record can have many dates, so the dates are in a nested gridview (I chose a gridview over a datalist here because we want to be able to delete a date and this is easier done in a gridview). The parent record can never be deleted.
The display works fine: the nested gridview gets its datasource during the parent datalist's OnItemDataBound event.
The problem: the nested gridview's delete function. The date gets deleted without a problem (handled in the OnRowDeleting event), but somehow the redisplay is untying all the other nested gridviews from their datasources. The delete does not appear to cause a page postback, so I don't know how the other nested gridviews are losing their datasources.
View 3 Replies
Dec 5, 2013
In Nested Grid, we get a '+' sign. The problem is that '+' sign appears all times, even if there are no child records for that row. 1. Can we enable/disable OR Hide/Unhide '+' sign. depending on if child rows exits.2. OR alteast we can put some bgcolor indicating to user that this record do have child rows. Without any indicator user may feel quite annoying to click on '+' sign and nothing happens.
View 1 Replies
Mar 4, 2010
I have a Gridview with a template field which contains a select button to select a specific row.
I would like, when clicked, this button to expand a collapsiblepanelextender which is contained in another templatefield. How do I set the ExpandControlID of the collapsiblePanleExtender to reference the select button in the other templatefield?
I receive an error when I simply input the ID of the select LinkButton. The error informs me that there is no such control for that ID. I'm guessing because it is another container/parent.
View 5 Replies
Jan 24, 2016
I have designed a collapsible nested gridview project using this article as a reference Collapsible Nested GridView with Paging using ASP.Net. I am trying to modify the code to collapse a gridview when another gridview is expanded so that only one nested gridview will be open at a time.
View 1 Replies
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
Oct 12, 2010
i have the following nested gridview
i could get the inner gridview onRowDataBound working by setting that directly in the gridview
but i cannot get the linkbutton's onrowCommad inside the inner gridview working!!!
it does not fire the event even i have set it directly in the gridview
here is the code in my app_code page
[code]....
View 12 Replies
Oct 28, 2010
I have a nested gridview which has been working fine. Now I need to turn the inner gridview off based on some condition: a IF block is added to the existing RowDataBound event of the outer gridview. Now I'm getting "the Object reference not set to an instance of an object" error. What should be the proper way to go about this? The code:
[code]....
In addition, is there a way to "switch" columns of the inner gridview? For example, column 1 is "City", column 2 is "Price". If user selects to sort by "Price", I woud like column 1 be "Price" and column 2 be "City". Is this has to be done programmatically or if there's other way?
View 3 Replies
Jan 3, 2010
I have a nested gridview dynamically added. It seems I resolved all issues with the loading this control on a parent page along with other controls and I can trigger the edit of the first level - the master part of the gridview. However, I cannot trigger the edit on a child gridview.
OnRowEditing="grdChildGridEdit_RowEditing"
The master and the child gridviews have objectdatasources in a markup but I have to do the additional data binding after the loading the control on the parent page (see the code below). I'm doing that additional data binding only for the master gridview that is working fine and shows the data for the master and the child gridviews. When I click the Edit button on the master gridview it shows text boxes for the editing but when I click the Edit button on the child gridview it's doing nothing and moreover the editing mode for the master gridview is going back to the initial stage (labels).
I was trying to trigger it throughuse the registering the event:
[code]....
View 5 Replies
Apr 13, 2010
Using vb.net/asp.net 2005
I have a nested gridview (gridview within gridview) that I need to render beneath the outer gridview.
I keep finding examples online of showing a nested gridview in the last column of the outer gridview but I need to show my nested gridview instead under the outer gridview.
I was certain that I had done this before by putting a row (<TR>) inside the TemplateField so that the nested gridview would display under the outer gridview. I am getting the data ok for the nested gridview, that is not a problem. The only issue I am having is making the inner gridview display under the outer gridview.
btw, the error is below:
<ERROR>
Type 'System.Web.UI.WebControls.TemplateField' does not have a public property named 'tr'.
</ERROR>
View 3 Replies
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
Jan 28, 2011
I have a parent gridview5 with child gridview 6, today i deployed it to our dev server and on that server we have alot more records, so for the nested gridviews i need to enable paging on the parent gridview5. Doing so works fine, until i make a selection within the child gridview6, once any selection is made, and i try to page the page throws an error, i have the following bound to the parent gridview5.
[Code]....
[Code]....
View 4 Replies
Feb 5, 2010
I have a gridview (gvNested) nested inside another gridview (gvParent). I want to get the selected value of the nested gridview, but keep getting the classic 'object reference not set to an instance' error. I thought that this would work
[Code]....
Where gv.SelectedValue would return the information I needed.
View 5 Replies
Mar 24, 2010
I am using C# with Access/SQL databases. I have this piece of code for a nested gridview using access database working fine:
private AccessDataSource ChildDataSource(string strProjectCode, string strSort)
View 8 Replies
Aug 13, 2010
i'm new on this forum and my english is not the best, so i hope that i can explain my problemI have a gridview nested in a Repeater, this is the markup :
<ItemTemplate>
<asp:GridView ID="GridView1" EmptyDataText="<%#((mioDataTable)Container.DataItem).categoria %>" runat="server" AutoGenerateColumns="False" CellPadding="4" CssClass="grid" DataKeyNames="id"
[code]...
View 4 Replies
Jul 3, 2010
I have created a gridview (this is a usercontrol) with another gridview (also a usercontrol) inside it. Now I would like to bind a checkboxlist to the inner gridview. This is my markup for the inner gridview user control
<asp:GridView AutoGenerateColumns="False" GridLines ="None" Width ="100%"
View 5 Replies
Aug 19, 2010
I've got this page where I display a 3 level nested gridview. First gridview displays data, 2nd one displays data based on the 1st one's row and 3rd one displays data based on the 2nd gridview. All of this works perfectly, including the edit mode for the 3rd gridview.
The issue comes when I make each gridview collapsible, again, it works fine but when I click on "Edit" on the 3rd gridview all the grids collapse, I can then re-open them and the "edit mode" is still present and I can still save my updated data. But that collapsing thing is quite annoying. I based a lot of my code from this page: [URL] And I understand how I can fix my issue on a 2 level nested gridview, by simply adding the C# code:
[Code]....
This makes allows me to save the index and prevent it from collapsing when I'm editing. Unfortunately, because I'm actually editing the 3rd gridview, if I code:
[Code]....
That simply doesn't work because I get the error "GridView2 does not exist in the current context". I also tried adding it to the .designer.cs page, but that doesn't change anything and still doesn't work. I'm not at work atm, and hence cannot paste the entire code, however, would anyone still have any idea as to how I can fix that issue?
View 11 Replies
Jul 22, 2010
my page based on master and Details. there are two gridview one is header and other detail.detail gridview is inner gridview.so when i click on + symbol then details should diplay.i use dataKeys for display Inner gridview record.when i use one datakeys then it is working fine but i need two condtion for show Inner Gridview. how can use multiple datakeys here?my HTML code is below. just modify it for multiple Datakeys
[Code]....
View 8 Replies
Jan 14, 2010
I have an image button on my gridview in one column, and in the next column, I have a nested gridview. What I am looking to do, is to use my image button as a way to show and hide my nested gridview. I do not want to use JavaScript, because my page already uses a great deal of JavaScript. Therefore, I want to use code behind on the button, this is what I have done so far:
ImageButton b = (Button)sender;
GridViewRow row = (GridViewRow)b.NamingContainer;
if (row != null) {
int rowIndex = row.RowIndex;
How do I use my selected row index to call the nested gridview to be visible and not visible?
View 3 Replies
Mar 30, 2011
I have created a nested gridview and want to be able to export the gridview to CSV file. When I export it it also exports all the HTML in the file which I do not want. It is fine if i export it to and XLS file though.
I just wondered if anyone has managed to export to CSV with nested gridviews without the HTML getting exported also.
Here is my code
[Code]....
and here is my gridview
[Code]....
I am setting the datasource for the nested repeater here:
[Code]....
View 4 Replies
Mar 8, 2011
First, what I am showing here works fine, and I know how to do this if the nested control comes from the same bound table. I could leave it at that, but I don't like SQL code in my aspx page, and want to move it. I'm keeping it simple here, but I can move it to a data access layer later on..... for now, I want to understand what's going on when the page loads and the nested control is rendered and populated. WHAT I LEARN FROM THIS WILL BENEFIT ME ACROSS THE BOARD - NOT just for this instance!!!
My question is, how to grab the SQL query from the aspx page for the NESTED control and move it to the codebehind. I'd LOVE to also move the Selected Value parameter if possible, but mainly want to get the SQL out of the page. I KNOW HOW TO DO THIS for a GridView or any control, but I DO NOT know how to do it for a NESTED CONTROL from a different table - i.e. WHERE it fires (on GridViewEditing or GridViewUpdating or PageLoad....) so I can put in the SQL where it belongs.... and I'm PRETTY darn SURE this can be done without a 'foreach' loop. For discussion's sake here, imagine
1. DATABASE: simple table with employee_ID, employee_name, employee_city as fields
2. DATABASE: simple table containing all cities (city, cityval)
2. simple GridView that displays these 3 fields in same order ON VIEW
3. Template field for city. On PAGE LOAD, this is a simple label bound to the 'city' field. HOWEVER - On EDIT (with edit button), the field changes to a nested DropDownList that is bound to the 'city' table, NOT to the employee table.
4. Selected value is the current city for employee The PROC you see here in the edit item SQL is actually SELECT * FROM [cities] ORDER BY [city_name]
<asp:GridView ID="grdEmployee" runat="server" AutoGenerateColumns="False"
CssClass="grdE" DataKeyNames="employee_ID"
ShowFooter="True">
<Columns>
<asp:BoundField DataField="employee_ID" HeaderText="ID" ReadOnly="True" />
<asp:TemplateField HeaderText="Employee Name">
<ItemTemplate>
<asp:Label ID="lblEmployeeName" runat="server" Text='<%#Eval("employee_name")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtEmployeeName" runat="server" Text='<%#Eval("employee_name")%>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City">
<EditItemTemplate>
<asp:DropDownList ID="cboCity" runat="server"
DataSourceID="SqlDataSource1" DataTextField="city" DataValueField="cityval"
SelectedValue='<%# Bind("employee_city") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=XXXXXXXXXXXX;Initial Catalog=xxxxxxx;Integrated Security=True"
ProviderName="System.Data.SqlClient"
SelectCommand="QUERY_CITY" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblEmployeeCity" runat="server" Text='<%# Bind("employee_city") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
ALL I want to do is move the SQL Query in the EDIT template above to the code behind. I just don't know WHERE or WHEN in the code this fires and how to handle it when the table is different from the original GridView table. AND the cboCity.SelectedValue, if possible.
View 2 Replies
Jun 28, 2010
In the parent gridview the footer is appearing correct. in the child gridview the footer is not appearing.
View 5 Replies
Aug 31, 2010
I have a GridView within a GridView. I want o access child gridview's rowupdating event. i want to update row.
this is my GridView's code as follows
[Code]....
View 6 Replies