GridView (or table) on web site in asp.net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi
I need to put a grid on my website. The best would be something like the
same datagridview in c# (where you can set width of the column, reorder of
the columns etc). Unfortunatelly I haven't found any similar in asp.net.

What I need to do is:
- to be able to set the width of the columns and the height of the rows (if
any text is longer than cell it should be truncated, can it be done
automatically or should I write my own function?)
 
If you need to re-order and resize columns on the client then you will need
to get a 3rd party grid, the best I have seen of these for style and
usability is ComponentArt (www.componentart.com).
You can do these things on the server with the normal datagrid but it takes
code.


Ciaran O'Donnell
 
It is not a solution for me... anyway I have next question.
I want to edit rows in the datagrid (by built-in update method of datagrid
properties). I can do that, I can update db. The problem is how to validate
the input data. For expample there is a date in one column of the datagrid.
If the user
put a wrong date, I would like to be able to show him a message.

Moreover, there will be another column. It would excellent if I could put
there a combobox to let a user choose a proper value. Is it possible?
 
For this you need to use template columns. You can then put validators in the
Edit templates.
There are examples for template columns in the help files.
 
Back
Top