473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Expand/Collapse Datagrid

Does anyone have sample code for an expanding parent/child datagrid.
Like a treeview control with the "+/-" signs. ASP.NET 1.1

thanks

Jeff

Apr 6 '06 #1
7 5831
Denis Bauer does that in his HierarGrid and the source code is available:

http://www.denisbauer.com/ASPNETCont...ierarGrid.aspx

Ken
Microsoft MVP [ASP.NET]

"sirfunusa" <si*******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Does anyone have sample code for an expanding parent/child datagrid.
Like a treeview control with the "+/-" signs. ASP.NET 1.1

thanks

Jeff

Apr 6 '06 #2
Yes, I've seen this, but I don't want to include a user control or DLL
in our project. I was looking for a simpler implementation.

Apr 6 '06 #3
"sirfunusa" <si*******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Does anyone have sample code for an expanding parent/child datagrid.
Like a treeview control with the "+/-" signs. ASP.NET 1.1

thanks

Jeff


The implementation Ken mentioned looks a lot cleaner than what I have.
All the logic of my implementation is server-side. I am not binding to a
dataset, but rather a list of business objects.

Basically, I am including a "hidden" datagrid in the template for the last
column of the parent grid. This grid's Visible flag is toggled whenever the
user clicks the expand/collapse button (itself a separate column in the
parent grid). The 'hidden' grid is separated from the actual content of
that last column by a line break (<br>), which gives the appearance of the
table "expanding" when that grid suddenly becomes visible.

I cannot provide source to what I have done due to restrictions of the
project, so I hope between the information I have given and Ken's example
you can figure something out. If I was using datasets, Ken's example looks
to be a pretty good implementation.

--
Adam Clauss
Apr 6 '06 #4
Well,

Its difficult to understand your objection to using this component. The
sort of thing you are asking for is not built-into ASP.NET. So, to get
this behavior you have to create a custom control or manipulate the
Datagrid in some way and do all the hard work yourself. The good thing
is someone has already done all the hard work that is necessary to get
this done and was gracious enough to release the source code for all to
use. So, if you don't want to include a .dll or a usercontrol in your
project, then take the source code that was provided, included it in
your project and modify it till your heart is content, or, look at the
source code and use it as an example of how you want to go about
created this functionality yourself. And, if I am not mistaken, you
did ask in your question if there is some sample code that shows how to
do it. Well, you have it right in front of you.

Apr 6 '06 #5
No. That grid it completely over-engineered. I spent 2 days looking at
it. I don't use bad or overly-complex/black-box code blindly. We need
to support it too, in case users want to modify the functionality.

Apr 6 '06 #6
http://tinyurl.com/e953d

Don Quijote de Nicaragua

"Adam Clauss" <ca*****@tamu.edu> escribió en el mensaje
news:12*************@corp.supernews.com...
"sirfunusa" <si*******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Does anyone have sample code for an expanding parent/child datagrid.
Like a treeview control with the "+/-" signs. ASP.NET 1.1

thanks

Jeff


The implementation Ken mentioned looks a lot cleaner than what I have.
All the logic of my implementation is server-side. I am not binding to a
dataset, but rather a list of business objects.

Basically, I am including a "hidden" datagrid in the template for the last
column of the parent grid. This grid's Visible flag is toggled whenever
the user clicks the expand/collapse button (itself a separate column in
the parent grid). The 'hidden' grid is separated from the actual content
of that last column by a line break (<br>), which gives the appearance of
the table "expanding" when that grid suddenly becomes visible.

I cannot provide source to what I have done due to restrictions of the
project, so I hope between the information I have given and Ken's example
you can figure something out. If I was using datasets, Ken's example
looks to be a pretty good implementation.

--
Adam Clauss

Apr 6 '06 #7
Our company has not moved to ASP.NET 2.0 yet

Apr 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Hurrell | last post by:
Hi, I'm using the following javascript function to expand and collapse portions of text in a web page (targeted at IE5.5 and above): function doExpand(paraNum,arrowNum) { if...
7
by: peter | last post by:
I use the click-to-expand menu at http://javascript.internet.com/navigation/click-to-expand-menu.html This works fine, but is there a way to expand or collapse all the menus? An example of how...
1
by: Randy Starkey | last post by:
Hi, Is there a way to expand and collapse all if I have multiple implementations of this script on a single page? The script works well individually. Thanks! --Randy Starkey ---
1
by: The Bear | last post by:
Hi, I'm trying to figure out how to group items in a datagrid and be able to collapse that list or expand it... Anyone know how to do this, or where I can find documentation on it. thanks, TB
1
by: Vaclav Jedlicka | last post by:
Hi I need a datagrid on a page, but it is rendered with the style "border-collapse:collapse;". I do not need this style. It interferes with the settings in my CSS file. I tried to supress it...
4
by: Gönen EREN | last post by:
how can i collapse or expand a node of treeview control programmaticly? thanks.
0
by: Shadow Lynx | last post by:
When using ASP.NET 2.0's built-in TreeView on a page with <BASE target = "AnythingBut_Self"></BASE> in the HEAD, the expand/collapse buttons fail to function. The reason for this is that the...
0
by: jim | last post by:
Hi, I have a TreeView control that sits on the MasterPage. All of my other webpages inherit from that Master Page. The Treeview receives it's data using an XMLDataSource that has it's DataFile...
4
by: Rabel | last post by:
I am not very good at javascript I mostly am a flash developer but I am trying to apply one of our old expanding menus to work for a new site but it doesn't collapse the way I need it to right now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.