.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Expand/collapse row to create a new row to display a frame in a datagrid

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
Hi , I am using .Net Framework 2.0 as its a old application with a datagrid in a page. I want to expand each row when clicked to create a new row to display a page in the newly created row. Can someone help me in this regard<asp:datagrid id="dgdOrders" runat="server" cellpadding="4" borderwidth="1" gridlines="Horizontal" allowpaging="True" autogeneratecolumns="false" datakeyfield="OrderNumber" cssclass="gridStyle" pagerstyle-visible="False"> <itemstyle wrap="False" cssclass="gridItemStyle" backcolor="white"></itemstyle> <alternatingitemstyle wrap="False" cssclass="gridAltItemStyle" backcolor="WhiteSmoke"></alternatingitemstyle> <headerstyle cssclass="gridHeader"></headerstyle> <columns> <asp:templatecolumn headertext="Hold"> <headerstyle horizontalalign="center"></headerstyle> <itemstyle horizontalalign="center"></itemstyle> <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "IsHold") %> </itemtemplate> </asp:templatecolumn> <asp:templatecolumn headertext="Purchase Order"> <headerstyle horizontalalign="center"></headerstyle>

View Complete Post

More Related Resource Links

Create a Tree view with expand or collapse using XSLT


I have created an XSLT file to show the contents of xml in HTML format in the form of a tree. Now, my requirement is to add expand or collapse capability to this output(html) using XSLT and Javascript. The sample output looks like this:

Resource Center

  • Home
    • Resource Center
    • List of Resource Types
    • May i use the collapse and expand feature (like tree menu) in Report ?


      HI all,

      May i use the collapse and expand feature (like tree menu) at Report iam using the Report viewer  Control for displaying the Report on my Asp.net Page .


      I have number records and each record have detail as i clicked or expand the record then details will be shown is it possible with report viewer control 
      If any one have experince before please share the ideas.


      Best Regards

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






How to Prevent the expand/collapse behaviour of my Custom Activity?

  How can I prevent the expand feature of my custom activity with custom designer ? I have custom WF4 activities with Custom designers. These activities are not container activities. I just want to prevent the expand feature of the same; just like Assign activity. I set the Collapsible attribute of teh ActivityDesigner false; but still it is expanding to the next level. Thanks AmbilyIT Analyst

Expand /Collapse quick launch

Hi All, Can any one help in getting the below link script for collapse and expand quick launch. I did not find any script. it says to paste script in master page using designer http://www.endusersharepoint.com/2009/03/27/deploy-custom-jquery-scripts-to-the-sharepoint-site-collection/ any idea? i want exact above link Thanks in Advance

How to create SPUser obj or SPRoleAssignment using the user display name not using login name "domai

Suppose there is a user called "Jake Gittes" with login name "domain\jakeg". Now I want to create either SPUser/SPRoleAssignment object using the user full name ("Jake Gittes"). I tried using SPWeb.AllUsers["Jake Gittes"]. But it is throwing exception.

What is the best way to dynamically create a scrollable list of forms that when clicked expand for e

Hello, What is the best way to dynamically create a scrollable list of forms that when clicked expand for entry? More details: In my XAML I have a TabControl. One particular TabItem looks like this:   <TabItem Name="Tab_Forms" Header="4" Width="50" Height="20" Background="{x:Null}" BorderBrush="{x:Null}"> <Border Name="Tab_CategoryTabSelected_Border" BorderThickness="10" BorderBrush="Transparent" Padding="3"> <... What do I use here? ...> </Border> </TabItem> At the location <... What do I use here? ...> I need some sort of scrollable control.  The scrollable control can be part of the XAML above. However, the contents of that scrollable control will be entirely code generated. Within that scrollable control will be a vertical list of forms by name with an expansion/contract button next to the name.  When the user clicks the expansion button, the form expands into view, and may be longer than the viewable area, and the user will need to be able to enter data into the entry fields.  I need the tab key to go from field to field as would be expected. If the user is on the last viewable field and there are more fields below, when the user hits the tab key, the for

Navigation headings and links display in Treeview expandable collapse buttons in quick launch in Sha

Whenever i am adding Headings and Links in my sharepoint site under "Navigation", it should display in Treeview collapse expandable buttons in quick launch. How to achieve this, any suggestions please. I tried by enabling Treeview in Site settings-->Tree view, but it is not useful here(it only displays document libraries with folders in "+" or "-" symbols. I want this "+" and "-" for all items which  i am adding from Navigation.  Thanks & Regards, Neerubee

Disable Expand All/Collapse All workflow designer hyperlinks?

Hi,In a blog post by Matt Winker (http://blogs.msdn.com/mwinkle/archive/2009/10/20/wf4-designer-enhancements-in-vs-2010-beta-2.aspx), he notes that: "Additionally, you can choose to expand or collapse individual nodes, or go to the "Expand All" command in order to expand out the tree.  One thing to note is that we don't allow expansion inside of a flowchart because we don't yet have a mechanism that lets me rearrange all of the items around that newly expanded activity.  "My question is, will there be a way by the time RTM releases to do expansion within a flow chart?  The flow chart model is what I'll be using exclusively, so I'm quite interesetd in this.If there will not be support by the time workflow reaches RTM, is there or will there be a way that we can hide the Expand All/Collapse All hyperlinks?Thank you,Notre

Animation of Expander expand / collapse programmatically



once more a post about the expander animation.

i found a lot of xaml examples for a animated expander during expand/collapse.

like this => http://mattserbinski.com/blog/animating-expander


but how can i do that programmatically?

i have dynamic created nested expander controls and i would like to have a global animation for all controls.

how can i solve that ?


thanks for help




Expand control with DataGrid in wpf


i have a problem,

iam using a datagrid and in datagrid every row has a expander control with mentain a comments. my problem is whenever i expand that time datagrid is also expand and again whenever i collapse then some space is meintain in bottom of datagrid how can i solve this.

another thing is that iam using a datagrid.Items.Refresh(). but when datagrid refresed comments is also clear...plz give me a solution immediately

programmatically expand/collapse the collapsiblepanelextender


using c#.net/asp.net 2005.

I have a collapsiblepanelextender that is working well when the user clicks on the "expand" and "collapse" buttons on the screen, however I would like to programmatically expand and collapse the collapsiblepanelextender in the c# code-behind.  Has anyone done this before?

I am typing the name of the collapsiblepanelextender in the code behind function and intellisense is not even showing that control as being a control that I can access from the aspx page so not certain why this is happening.

when I look in the aspx page the collapsiblepanelextender has a red squiqqly error line under it that says (when you mouse over it): "element 'collapsiblepanelextender' is not a known element. this can occur if there is a compilation error in the website"

but the panel works well when the user clicks it to expand and collapse and there are no compilation errors on the page, otherwise the page would not run, does this make sense?



Expand /Collapse quick launch


Hi All,

Can any one help in getting the below link script for collapse and expand quick launch.

I did not find any script. it says to paste script in master page using designer


any idea?

i want exact above link

Thanks in Advance

SSRS 2008 - Drilldown - Grouping collapse/expand /title/header



I have been able to have a report with Group / Group count and Details.

The issue I have are:

1. When I collapse the drilldown to get only the Group and Group countit just collapse per page not the full report...I would like to have all Group / Group count on 1 or two pages and then epand as needed...

2. The title and column headers appear only on the first page... how to get it on all pages?

What is the "Linked Report" doing? Is it another kind of Drill Down..?

I need to have my summary report per OS for example shows only the OS Name then Count and if I click to expand I will have the servers in this group... but it seems working reverse way, I mean you have the details and if you collaspe you have the summary but this seems limited per page...



System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 Support

Expand All/Collapse All Buggy


I've scoured the forums and no one has ever answered this question for other people who have posted it.

I have a SSRS 2005 report where the user can choose to expand all groups by selecting yes or no in a parameter called ExpandAllGroups. It works great for the most part - if they chose to expand all groups, then all four groups and my details line all show as expected.

However, once they've run the report with everything initially expanded and they decide to collapse group #1 it will actually still retain all the space that the three child groups occupied. So if it took up five pages total and you collapse it, it still has five pages of white space showing between what you just collapsed and the next grouping. My report is massive and I have one group that if you collapse it then you have something like 50 pages of white space until the next group.

The only suggestion I've seen is setting up your visibilty property via the group dialog box rather than the visibility properties for the row. I did this to no avail. It doesn't appear to matter if I do it on the row or on the group, it still fails to collapse correctly.

Anyone found a solution to this?? There were about a half dozen previous posts with the same issue but no resolution was ever posted.




Getting a Checkbox in a datagrid to check before RowDetails expand the row.



I am having trouble getting a checkbox in my datagrid to check in certain situations. The row details in my grid cause the row to expand when the row is selected. When no row is selected, or a row below the row just clicked was the selected row prior to the click, things work fine (the checkbox I clicked on gets toggled and the row expands to show its rowdetails). If a row above the row I am clicking was selected (and therefore expanded, showing its rowdetails) when that row collapses, my current row moves up (because the row above collapsed) and the current row expands. However, the checkbox in that row (in the column that I clicked on) does not get checked in this case. I suspect it's because it is no longer in the space where the click occurred (because it works if clicking this checkbox/row doesn't cause it to move up before expanding). Is there a way to get the checkbox click to happen before the row selection? I seem to recall properties on controls in the past that indicated whether they answered before or after their child controls (maybe that was forms) but I cannot find any such property to set on the WPF DataGrid. Any suggestions? Thanks.


Create controls inside the datagrid cell based on the datatype uisng WPF


I have a requirement that I need to develop a component which should display variable types of data inside a datagrid. The datagrid will have two coulmns. Fisrt column will display the list Captions (like: FirstName, DateOfBirth, IsMarried, Age) and the second column will display the list of data based on their data type, like:

> As FirstName is in string format it should display the value inside a TextBox control on right side of FirstName caption

> As DateOfBirth is in Date format it should display the Date value inside a DatePicker control on right side of DateOfBirth caption

> As IsMarried is in Boolean format it should display the CheckBox control with check state on right side of IsMarried caption

> As Age is in integer format it should display the integr value inside a TextBox Control on right side of Age caption.

If any body has any idea please guide me the way to develop. I request you to kindly help on this for creating this control



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend