Best way to generate custom UI component?

  • Thread starter sean.gilbertson
  • Start date
S

sean.gilbertson

Hi,

I'm sort of new to ASP.NET 2.0 and ASP.NET in general. I have some
data that I would like to display in a tabular format, but I'm going
to be generating the columns dynamically, and I would like to make it
so that each row can be expanded downward dynamically to show detailed
information.

So far, it seems like I'll have to use an asp:Table and generate the
entire thing in code -- including the Javascript to hide and show the
detailed information. Is this the case? Is there some way I can
externalize this behavior, like in a user control or something?

If I weren't using ASP.NET 2.0, I'd be using jQuery to generate all of
this dynamically. Is there an easier way in ASP.NET 2.0?

Thanks :)
Sean
 
T

Tim Mackey

hi sean,
out of the box, the way .net handles this sort of thing is with a
combination of gridview and detailsview controls. you view the records in
the gridview and select one then, which displays whatever info you want in
the detailsview below the gridview (or above). you can scroll to the
details view position. but your idea with the javascript sounds nicer. i
haven't come across a control that does this. however there is an ajax
CollapsiblePanel control
http://ajax.asp.net/ajaxtoolkit/CollapsiblePanel/CollapsiblePanel.aspx
i guess you've already thought about this though and you want to have the
columns as part of a single table to keep the column widths consistent. i
doubt the collapsiblePanel will do this.

hope somebody else can make a better suggestion
tim
 
S

sean.gilbertson

hi sean,
out of the box, the way .net handles this sort of thing is with a
combination of gridview and detailsview controls. you view the records in
the gridview and select one then, which displays whatever info you want in
the detailsview below the gridview (or above). you can scroll to the
details view position. but your idea with the javascript sounds nicer. i
haven't come across a control that does this. however there is an ajax
CollapsiblePanel controlhttp://ajax.asp.net/ajaxtoolkit/CollapsiblePanel/CollapsiblePanel.aspx
i guess you've already thought about this though and you want to have the
columns as part of a single table to keep the column widths consistent. i
doubt the collapsiblePanel will do this.

hope somebody else can make a better suggestion
tim

Thanks for the info and suggestions, Tim :) I hope things are going
well for you today.

I like to have a lot of control over the UI of a web app. What I've
been doing for about 4 years now is constructing interfaces that are
tailored to the task. This usually means that I'll code from scratch
in HTML and Javascript. Right now, the tools I prefer are jQuery and
Ruby on Rails -- though I did have to write a jQuery add-on library
for generating DOM nodes dynamically (http://www.pinkblack.org/itblog/?
page_id=22).

Anyway :) The point is that I tend to build things from scratch
because I find that the best and most fitting UI components can be
achieved that way. I'd love to be able to have this kind of power
(and more) in ASP.NET, especially now that it can do some Ajax.

Take care,
Sean
 
T

Tim Mackey

hi sean,
i totally agree and find myself taking the same approach most of the time.
the .net controls are good, but to really achieve what you want, i agree
that you'll probably need to roll your own this time as well.
good luck with it
tim
 
S

sean.gilbertson

hi sean,
i totally agree and find myself taking the same approach most of the time.
the .net controls are good, but to really achieve what you want, i agree
that you'll probably need to roll your own this time as well.
good luck with it
tim

Thanks :) And it's comforting to hear these words from a fellow
developer! I don't get to talk to many other programmers very often,
sadly. (BTW: Can you recommend any good programming trade journals?)

Anyway, so this foray into ASP.NET was worth it: Now I have a defense
for "How come you didn't use ASP.NET again?" Right? :)

Take care,
Sean!
 
S

sean.gilbertson

hi sean,
i totally agree and find myself taking the same approach most of the time.
the .net controls are good, but to really achieve what you want, i agree
that you'll probably need to roll your own this time as well.
good luck with it
tim

Update: I looked into some code that was written for this app in a
place where the same type of task was accomplished, and I discovered
that they didn't use the .NET widgets at all; they used XSL
templates. XSL is cool but I think it's more work than my method.
Anyway, it's interesting to see that data-bound - or other - .NET
controls weren't used.

Take care!
Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top