Monday, March 26, 2012

Windows forms like Grid

Hello,

I have been working on converting a windows app to web app. Windows app has nice grid where users can enter data or edit by just clicking on the column.

For web environment, I tried to use gridview/detailsview but it requires users to click on update or insert button. Is there something built-in or AJAX based or any solution (not too costly) that provides windows like grid in asp.net 2.0?


Thanks,

VP

None that I can think of.

Thanks for giving details about the implementations. Though is seems like a lot of form elements making it heavy during postbacks. Has anybody done what you are suggestions or something similar? It would be great to get hands on it.

Here's what I might end up buying:

dhtmlxgrid

or codethatgrid

Thanks,

vp


Ofcourse there is a solution for that :-)

With just some creativity, you can create something like that, with a gridview and Ajax.

One direction to create a direct click grid, is to put the gridview in a updatepanel.
After that put a linkbutton in every cell to hold your data.
Attach a edit row_command to the linkbutton .
Use some css to have the linkbutton a 100% (cell) height and width.

In the codebehind of the row_command event, you can easily track the cell that is clicked.
You can even use the row databound event to open a textbox in the clicked cell , or someting like that.

Marchu


Hello,

You are right about the heavy postback, ± 50 rows with 32 cells make a 730 kb page. (in my case)
What i do is, when i change 1 cell, i change this cell directly in the grid, so i dont have to load the full data again. (only Ajax must draw the grid again, what take some time...5secs)

It is not a perfect solutions this, but i been looking and experimenting for a better one.
If i found one, i will post it here.

Marchu


I decided to go withdHTMLxGrid which seems to meet my needs.

I can add data to the grid from code-behing by emitting javascript and then read data back using javascript and copying data to a hidden text field in CSV format which I grab on postbacks. This is the only grid I found which has cell + rows tabbing and allows editing cells without needing any extra keystrokes.

Standard version is free and pro is $150

Thanks for your responses


vp

No comments:

Post a Comment