Home All Groups Group Topic Archive Search About
Author
24 Jul 2006 3:52 PM
Arthur Dent
PLEASE!!!

Here are two things which i think the GridView is lacking which SERIOUSLY
detriment its usability in a BIG way!

1. RowCommand - Which Item?? when the grid throws a RowCommand event, it is
(_*just kind of*_) useful to know which item in the grid fired the event.
For example, we have projects where there is a grid of orders for a system,
and there are numerous commands on the grid rows, such as "Close Order",
"Cancel Order", "Download Order", which need to do specific stuff to that
specific order. And often times, certain commands need to reference back to
other controls in the same row (i.e. a txt field where the user typed in the
"Closed As Of" date) With the DataGrid, you could just do [
e.Item.FindControl("txtAsOfDate") ] to get this .
Now you have to store row indexes in the command argument, then go back to
the gridview.Rows collection, with that index, get the indexed row, and then
do a FindControl. This is a lot more and cumbersome code to do something
that should be simple.

2. A property on the GridView ... something like "ShowHeaderFooterOnEmpty"
or something which would (accounting for ShowHeader and ShowFooter
properties) show the header and footer rows in the grid even when there are
no rows in the grid. Right now i have to go to third-party controls for
this,... and i dont mind going to third party controls for extra advanced
functionality, but this is a simple simple thing, and if that is the only
thing i need extra, then the third party controls are usually way-overkill
just to get that little piece of functionality.

Cheers,
- Arthur Dent

Author
25 Jul 2006 12:06 PM
Christopher Reed
If I may, I will respond to these issues:

1) RowCommand is similar in functionality to ItemCommand in the DataGrid.
It's a catch-all event handler.  Look at the various event handlers that are
available for the GridView and see if one of those might help you out.
Additionally, I have found that the GridView-DetailsView model is most
effective in inserting and editing individual records as opposed to doing
everything in the GridView.  You might look at this as well.

2) I can't say whether or not I'm in the majority, but I have found that the
showing of the regular headers and footers of an HTML table object is not
considered user-friendly and seems awkward.  By adding the EmptyDataText
property to the GridView, IMHO, the GridView is enhanced and allows for a
lot of flexibility in presenting whatever you want when the GridView is void
of data.  Overall, though, your suggestion may have some merit and I would
hope that the MS designer at least consider it for future inclusion.

In general, the GridView is far better than the DataGrid (or the Table
class) when it comes to providing a great deal of usability to the users of
ASP.NET.  While there are probably some things that would make it better,
the GridView is not seriously lacking much.  Granted, this is my opinion,
but having used it over the past several months, it's an opinion that I can
live with for now.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

Show quoteHide quote
"Arthur Dent" <hitchhikersguideto-n***@yahoo.com> wrote in message
news:O5lPikzrGHA.516@TK2MSFTNGP05.phx.gbl...
> PLEASE!!!
>
> Here are two things which i think the GridView is lacking which SERIOUSLY
> detriment its usability in a BIG way!
>
> 1. RowCommand - Which Item?? when the grid throws a RowCommand event, it
> is (_*just kind of*_) useful to know which item in the grid fired the
> event. For example, we have projects where there is a grid of orders for a
> system, and there are numerous commands on the grid rows, such as "Close
> Order", "Cancel Order", "Download Order", which need to do specific stuff
> to that specific order. And often times, certain commands need to
> reference back to other controls in the same row (i.e. a txt field where
> the user typed in the "Closed As Of" date) With the DataGrid, you could
> just do [ e.Item.FindControl("txtAsOfDate") ] to get this .
> Now you have to store row indexes in the command argument, then go back to
> the gridview.Rows collection, with that index, get the indexed row, and
> then do a FindControl. This is a lot more and cumbersome code to do
> something that should be simple.
>
> 2. A property on the GridView ... something like "ShowHeaderFooterOnEmpty"
> or something which would (accounting for ShowHeader and ShowFooter
> properties) show the header and footer rows in the grid even when there
> are no rows in the grid. Right now i have to go to third-party controls
> for this,... and i dont mind going to third party controls for extra
> advanced functionality, but this is a simple simple thing, and if that is
> the only thing i need extra, then the third party controls are usually
> way-overkill just to get that little piece of functionality.
>
> Cheers,
> - Arthur Dent
>
Author
25 Jul 2006 7:25 PM
Arthur Dent
I agree that all in all, the GridView is a decent component, it does a good
job of presenting tabular data no doubt, and like i said, i have no problem
going 3rd-party for advanced thinks like grouping and child-tables and such.

To explain why i would like these features added back though, ....

1. knowing which item fired RowCommand: in many of our grids, the fields on
every row are all editable all the time, instead of only having one edit
row.... much like how a spreadsheet is. Users like this because they can
change a whole bunch of stuff at once without having to go through extra
steps of putting a certain row into edit mode. This is most pressing reason
for this feature. When they click save on the row, sure, i could loop
through every row of the grid and just recommit every row back to the
database, but that will be excessive network traffic and database hits if
they only changed one row. Or, i could "hijack" the
editing/updating/deleting commands, ... which DO provide a RowIndex. (Why
did they presume that only the MS commands need to know what row it was, but
anyone else's custom commands dont? arrogant?) But this would then limit me
to only 3 commands per row. We have several projects where a grid may have a
half-dozen different commands that can be performed on each row. I suppose i
could put a dropdown in the row with a list of available commands, and then
use one of the three "real" commands to check the drop down and see what the
user REALLY wanted to do.... but then they need to first open, browse and
click a drop down, and then click a command button on top of that. Can we
say HACK? In example, we have one project, an inventory and order management
system for a large warehouse company.... and when they search their orders,
on the results screen in the grid, they can perform any of the following
actions: Edit (which brings up a very complex edit screen, not suitable for
in-grid), Create Packing List, Export, Generate a Bill of Lading, Generate a
Pick Order, Pack and Ship, Duplicate Order, and Cancel Order. Thats 8
different commands per row. Keep in mind too, a lot of users are not
technically saavy, and just having a bunch of little pictures (icons) to
click on in the grid to do various things is a lot more understandable for
them than to have to deal with dropdowns and such. Plus, using just link or
image buttons per command keeps it to one mouseclick per command. For most
users, generally More Mouse Clicks = Less Usability.

2. Showing header/footers when no rows: I agree that it is a VERy nice
addition of the "NoDataTemplate" (or whatever it is called exactly). It does
look a lot nicer to show a little message like that than to just show a
header and footer with no rows between them. But a lot of the projects we
do, it is in the specs that in the footer of the grid, there are textboxes
(or other input controls) where the user can type in the values and then
click a button in a "command" column or somewhere which would then insert a
row. So the footer effectively acts as the "new record" input area... much
like you would have in Access, or Sql Enterprise Manager, or ORACLE table
contents. This was easy with the DataGrid, a bunch of template columns and a
linkbutton. Ideally, i think it should remain unchanged from how it
currently is what with the NoDataTemplate, just have the option to ALSO show
the header and footer over and under (respectively) the contents of the
NoDataTemplate.

CheerZ,
- Arthur Dent.

Show quoteHide quote
"Christopher Reed" <carttu@nospam.nospam> wrote in message
news:Otu$2K%23rGHA.1196@TK2MSFTNGP04.phx.gbl...
> If I may, I will respond to these issues:
>
> 1) RowCommand is similar in functionality to ItemCommand in the DataGrid.
> It's a catch-all event handler.  Look at the various event handlers that
> are available for the GridView and see if one of those might help you out.
> Additionally, I have found that the GridView-DetailsView model is most
> effective in inserting and editing individual records as opposed to doing
> everything in the GridView.  You might look at this as well.
>
> 2) I can't say whether or not I'm in the majority, but I have found that
> the showing of the regular headers and footers of an HTML table object is
> not considered user-friendly and seems awkward.  By adding the
> EmptyDataText property to the GridView, IMHO, the GridView is enhanced and
> allows for a lot of flexibility in presenting whatever you want when the
> GridView is void of data.  Overall, though, your suggestion may have some
> merit and I would hope that the MS designer at least consider it for
> future inclusion.
>
> In general, the GridView is far better than the DataGrid (or the Table
> class) when it comes to providing a great deal of usability to the users
> of ASP.NET.  While there are probably some things that would make it
> better, the GridView is not seriously lacking much.  Granted, this is my
> opinion, but having used it over the past several months, it's an opinion
> that I can live with for now.
> --
> Christopher A. Reed
> "The oxen are slow, but the earth is patient."
>
> "Arthur Dent" <hitchhikersguideto-n***@yahoo.com> wrote in message
> news:O5lPikzrGHA.516@TK2MSFTNGP05.phx.gbl...
>> PLEASE!!!
>>
>> Here are two things which i think the GridView is lacking which SERIOUSLY
>> detriment its usability in a BIG way!
>>
>> 1. RowCommand - Which Item?? when the grid throws a RowCommand event, it
>> is (_*just kind of*_) useful to know which item in the grid fired the
>> event. For example, we have projects where there is a grid of orders for
>> a system, and there are numerous commands on the grid rows, such as
>> "Close Order", "Cancel Order", "Download Order", which need to do
>> specific stuff to that specific order. And often times, certain commands
>> need to reference back to other controls in the same row (i.e. a txt
>> field where the user typed in the "Closed As Of" date) With the DataGrid,
>> you could just do [ e.Item.FindControl("txtAsOfDate") ] to get this .
>> Now you have to store row indexes in the command argument, then go back
>> to the gridview.Rows collection, with that index, get the indexed row,
>> and then do a FindControl. This is a lot more and cumbersome code to do
>> something that should be simple.
>>
>> 2. A property on the GridView ... something like
>> "ShowHeaderFooterOnEmpty" or something which would (accounting for
>> ShowHeader and ShowFooter properties) show the header and footer rows in
>> the grid even when there are no rows in the grid. Right now i have to go
>> to third-party controls for this,... and i dont mind going to third party
>> controls for extra advanced functionality, but this is a simple simple
>> thing, and if that is the only thing i need extra, then the third party
>> controls are usually way-overkill just to get that little piece of
>> functionality.
>>
>> Cheers,
>> - Arthur Dent
>>
>
>