Showing posts with label enter. Show all posts
Showing posts with label enter. Show all posts

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

Saturday, March 24, 2012

Wizard Control, Ajax and the Enter key

I've been through quite a few posts talking about problems with the Enter key in these forums, but no-one describing exactly what I'm experiencing, so please forgive me if I've missed the answer.

I've narrowed it down to a simple repeatable scenario in a VB ASP.NET application. Create a new form, add a Scriptmanager, an UpdatePanel and a Wizard control. Put a single textbox on the first step of the wizard control. This is the crucial bit: in the code-behind Page_Load event, put TextBox1.focus(). View the new form in the browser, type any text in the textbox (focus should already be set) and hit the Enter Key. It crashes with

this._postbackSettings.async is null or not an object

Any ideas anyone? If I don't set the focus in the codebehind, but click on the textbox and then enter text, it's ok.

_Ade.

Hi

I am afraid we cannot find out the exact root cause without further information captured when the problem occurs.

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

Thank you.


Sorry I didn't reply earlier but I've been away for a couple of weeks.

If you do exactly what I said in the original post, doesn't that reproduce the problem? It does for me.

I can send you sample code if you like, but I'm not sure how to go about it it. The only line of code I've actually *written* is "Textbox1.focus", the rest is form creation, dragging and dropping!

_Ade