Re: Display 1 data row as multiple datagrid rows

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Craig Banks (ban01_at_co.henrico.va.us)
Date: 02/20/04


Date: Fri, 20 Feb 2004 18:07:31 -0500


 Thanks for the response. It validates my thoughts.
I have written a custom control before, specifically a paging control
tailored to our intranet site. But writing a functionally rich datagrid is a
whole new ballgame. Given I have ASP and ASP.Net code I can reuse for
dynamically creating HTML tables, I know doing it the old-fashioned way is
quicker (at least in the short run; it's not fun to maintain long-term). It
isn't intuitively obvious how to easily extend the Microsoft datagrid to do
what I want.

The datalist isn't really close to what I want to do but it was a good
suggestion.

Generally speaking, horizontal scrolling is consider bad design. I don't
want to make too much of it because I can't say we don't do it here from
time to time to a modest degree. The issue is usability studies indicate
users don't mind scrolling vertically within reason but they generally don't
like scrolling horizontally. In my situation, we're talking scrolling over
2-3 screens worth at 1024x768 resolution (plus, they still have to scroll
vertically as well). We've used a multiple line format in ASP and ASP.Net
pages with great success. Obviously, it depends on the nature of the data
but ours consolidates nicely (e.g., name, address) so it isn't busy. Headers
wrap too and allow for sorting of any column it's practical to sort on.

It surprises me, though, that rather fundamental functionality is overlooked
in the datagrid. I've seen a number of questions about this on the Internet
so I'm hardly the only one in this bind. As it stands, a rather nice
Microsoft datagrid is useful only in rather trivial applications where I
work. Face it, like most organizations, presenting data -- often scads of
data -- is what we code for. It's more the rule than the exception to have
to present more data than can fit in the width of a screen using a readable
font size.

Anyway, thanks again for the suggestions. Happy .Net'n.

"Suresh" <anonymous@discussions.microsoft.com> wrote in message
news:99F38655-272E-4E92-AF8A-107BB6149D6F@microsoft.com...
> This is not that simple to do. As you already found out DataGrid will not
do this not will the Infragistics WebGrid products($$).
> Your best bet is do what you were doing before. You may want to look at
the DataList control in .NET. It'll be much like how you did it with HTML
but you might get some additional functionality from the DataList for free.
>
> If standardizing is your concern you can always build a custom web
control(somewhat advanced programming) to do what you want. All your users
with this specific requirment can use that control like any other ASP.NET
server control.
>
> Also if you want datarows to wrap then how do you deal with Column
headers. Do you wrap them as well?? Wouldn't that be an awkward UI?? IMO
it would be easier for users to scroll horizontally than to look at wrapped
rows.
>
> HTH,
> Suresh.
>
> ----- Craig Banks wrote: -----
>
> If a row of data in a dataset has a lot of columns the row
displaying the
> data in a datagrid will run way off the screen. What I'd like to do
is
> display a row of data over several datagrid rows so the user doesn't
have to
> scroll horizontally. Essentially, I want to wrap a datagrid row (not
text in
> individual columns) with as much control as possible. Make sense?
>
> While this seems simple enough on the surface, I can't figure out how
to do
> it and the scant information I've seen on the Internet says it can't
be done
> without buying a 3rd party datagrid -- Infragistics' NetAdvantage was
> recommended. To make a long story short, I called them and it isn't
clear
> their NetAdvantage product supports this either.
>
> In the past, I've done this building HTML tables on the fly but my
team at
> work wants to standardize on using the datagrid since most of our
developers
> come from a VB6, not a web development, background.
>
> Thanks for the help!
>
>
>



Relevant Pages

  • RE: Display 1 data row as multiple datagrid rows
    ... As you already found out DataGrid will not do this not will the Infragistics WebGrid products. ... All your users with this specific requirment can use that control like any other ASP.NET server control. ... Also if you want datarows to wrap then how do you deal with Column headers. ... display a row of data over several datagrid rows so the user doesn't have to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Auto-Scrolling text?
    ... The text will wrap around, i.e. when it hits the end it will restart at the ... I'd like to have control over the speed of scrolling or maybe halt the ...
    (microsoft.public.access.formscoding)
  • Re: ASP.NET limitations?!?
    ... displaying 1000s of rows in a single DataGrid may not be the best way ... the control as well, ... "Milan Todorovic" wrote in message ... When I understand the reason ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Adding dummy item to DropDownList in a DataGrid
    ... creates a new DdropDownList control called list, it is not in a DataGrid, it ... control that is inside a DataGrid. ... Dim cell As TableCell = CType ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Inherited class
    ... Page CLASS is one of inheritance. ... > What everyone is telling you is that the control you place on your ASPX ... >>> you can't just change the class from DataGrid to XXXDataGrid in the code ...
    (microsoft.public.dotnet.framework.aspnet)