Discussion:
Expand and collapse detail editing
Brady Kelly
2007-11-07 09:10:53 UTC
Permalink
I have a Repeater control that hosts simple User List rows of system users.
Each row has an Edit icon, which the user clicks to open a User Details edit
page. I have been told to remove the separate details page, and create a
detail edit section that expands or collapses on demand, without leaving the
base User List page. How do I go about this?



My first idea is to include an edit control on the item template of the
Repeater, and simply use styling to hide the edit control until the edit
icon is clicked. Then I set the display to a visible, and the edit control
handles all the edit functionality itself. Is this the correct approach,
how could I improve on this, and what pitfalls await me?


===================================
This list is hosted by DevelopMentor� http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Shawn Wildermuth (MVP)
2007-11-07 09:36:26 UTC
Permalink
You might want to look at the ASP.NET AJAX Accordian Control. It might fit
just right.

Thanks,

Shawn Wildermuth
http://adoguy.com
http://wildermuthconsulting.com
Microsoft MVP (C#), MCSD.NET, Author and Speaker

The Silverlight Tour is coming to a city near you!


-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:DOTNET-***@DISCUSS.DEVELOP.COM] On Behalf Of Brady Kelly
Sent: Wednesday, November 07, 2007 4:11 AM
To: DOTNET-***@DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] Expand and collapse detail editing

I have a Repeater control that hosts simple User List rows of system users.
Each row has an Edit icon, which the user clicks to open a User Details edit
page. I have been told to remove the separate details page, and create a
detail edit section that expands or collapses on demand, without leaving the
base User List page. How do I go about this?



My first idea is to include an edit control on the item template of the
Repeater, and simply use styling to hide the edit control until the edit
icon is clicked. Then I set the display to a visible, and the edit control
handles all the edit functionality itself. Is this the correct approach,
how could I improve on this, and what pitfalls await me?


===================================
This list is hosted by DevelopMentor. http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor� http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Efran Cobisi
2007-11-07 09:44:15 UTC
Permalink
Hi Brady,

If your editing requirements encompass complex logic that couldn't
easily avoid postbacks, I would recommend replacing the Repeater with
something else, like the DataList control. In fact, while the former
does not automatically persist any information about its children
collection structure, the latter does it, allowing for complex editing
scenarios where postbacks are required.

HTH

--
Efran Cobisi
http://www.cobisi.com
Post by Brady Kelly
I have a Repeater control that hosts simple User List rows of system users.
Each row has an Edit icon, which the user clicks to open a User Details edit
page. I have been told to remove the separate details page, and create a
detail edit section that expands or collapses on demand, without leaving the
base User List page. How do I go about this?
My first idea is to include an edit control on the item template of the
Repeater, and simply use styling to hide the edit control until the edit
icon is clicked. Then I set the display to a visible, and the edit control
handles all the edit functionality itself. Is this the correct approach,
how could I improve on this, and what pitfalls await me?
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Brady Kelly
2007-11-07 10:06:22 UTC
Permalink
Efran, thanks for the pointer, I am already looking at the DataList for
future requirements, but the moment I require no actual postbacks for
editing. All my persistence is through home-brewed Ajax calls, with the
page class only performing the initial population of controls.
Post by Shawn Wildermuth (MVP)
-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
Sent: 07 November 2007 11:44 AM
Subject: Re: [DOTNET-WEB] Expand and collapse detail editing
Hi Brady,
If your editing requirements encompass complex logic that couldn't
easily avoid postbacks, I would recommend replacing the Repeater with
something else, like the DataList control. In fact, while the former
does not automatically persist any information about its children
collection structure, the latter does it, allowing for complex editing
scenarios where postbacks are required.
HTH
--
Efran Cobisi
http://www.cobisi.com
Post by Brady Kelly
I have a Repeater control that hosts simple User List rows of system
users.
Post by Brady Kelly
Each row has an Edit icon, which the user clicks to open a User
Details edit
Post by Brady Kelly
page. I have been told to remove the separate details page, and
create a
Post by Brady Kelly
detail edit section that expands or collapses on demand, without
leaving the
Post by Brady Kelly
base User List page. How do I go about this?
My first idea is to include an edit control on the item template of
the
Post by Brady Kelly
Repeater, and simply use styling to hide the edit control until the
edit
Post by Brady Kelly
icon is clicked. Then I set the display to a visible, and the edit
control
Post by Brady Kelly
handles all the edit functionality itself. Is this the correct
approach,
Post by Brady Kelly
how could I improve on this, and what pitfalls await me?
===================================
This list is hosted by DevelopMentorR http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentorR http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
Continue reading on narkive:
Loading...