Showing posts with label users. Show all posts
Showing posts with label users. 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

Windows XP-Like Folder Browser

Hi I'm not sure whether I'm posting to the correct place. I am trying to create a page that allows users to create a page to my website. This page contains a "Store" button, which when clicked calls a popup window (using ModalPopupExtender), which will then prompt the user where the page is to be stored. I was thinking of making this popup look similar to a "Save File As..." dialog box in Windows. My problem is I have no idea what controls to choose or how to even start on this popup. I am fairly new to asp.net and ajax and would like to hear your feedbacks/suggestions. Thanks.Hello gulrnpink,

why not to use the standard one? Just prepare the file to store and use the
following code for this

Response.Clear
Response.AddHeader("Content-Disposition", "attachment; filename=" + targetFile.Name)

Response.AddHeader("Content-Length", targetFile.Length.ToString)
Response.ContentType = "application/"
Response.WriteFile(targetFile.FullName)

g> Hi I'm not sure whether I'm posting to the correct place. I am
g> trying to create a page that allows users to create a page to my
g> website. This page contains a "Store" button, which when clicked
g> calls a popup window (using ModalPopupExtender), which will then
g> prompt the user where the page is to be stored. I was thinking of
g> making this popup look similar to a "Save File As..." dialog box in
g> Windows. My problem is I have no idea what controls to choose or how
g> to even start on this popup. I am fairly new to asp.net and ajax and
g> would like to hear your feedbacks/suggestions. Thanks.
g>
The page will actually be stored in a table called directory, which will then be called by another page using a treeview structure. This "Folder Browser" control will be populated using the data in my directory table. The control will not be displaying the folder structure within their Windows OS. Any suggestion? Thanks.

I think you can use Membership class which is built in .NET 2.0

There you can create profile per user and about storing page you have to create folder in web root

Store the pages under that folder


Actually, before users can access my website, they are prompted to enter their logon credentials. When the logon info entered has a match in my user table, the user is then granted access to my website. Things displayed inside the website will vary depending on the user's rights.

The thing I am looking for is how I can create a folder browser much like a Windows XP's "Save File As..." dialog. In this dialog box, I am planning to have a "Path" area where in the parent folder (first level) is displayed on the top maybe using a dropdownlist by default with a box underneath containing all the subfolders at the second folder. If such subfolder contains subfolders (third level), then double-clicking on that particular folder will cause its subfolders to be displayed and replacing the "Path" area to display the parent folder of the subfolders currently being displayed. All of the said folders will be coming directly from a table in my Oracle database. I can't find any documentation to help me get started on this project. Any suggestions?


Checkout the following, it has a nice filebrowsing features based upon update panel:
http://mattberseth.com/blog/2007/07/ajax_style_folder_browser_part.html
http://mattberseth.com/blog/2007/07/hwo_to_create_an_aspnet_ajax_s.html


Thanks, Kazi. Those were some helpful sites. I can use the gridview technique to populate my child nodes. My only problem now is how I would be able to populate the dropdownlist above the gridview to show a treeview structure of my whole directory. Thanks.

I think you can modify it to suite your need.


Thats cool example

Saturday, March 24, 2012

Would this be practical?

I was thinking it might be nice to have a search user screen which in the background uses a webservice to call out and retrieve a list of users from the db and use the autocomplete method I have seen used before - I'm not worried about security its just would this by using atlas to do this would this be a reasonable thing to do?

hello.

well, you could do that if you have a web service that returns that info...

Wednesday, March 21, 2012

Write to database using AJAX

Hello, everyone. I'm trying to finish up a project where users store information into our sales database. It would be immensely helpful to be able to insert this data (or update the data) without refreshing the page, which I can only imagine would use AJAX. Unfortunately, I'm having a hard time finding the proper information on how to do this. Is there a handy little AJAX control that helps with this? Is it something I'll have to write myself? Any hints, suggestions and/or pointings in the right direction would be greatly appreciated.

not sure on what you have, but you do have several options:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

2. use an updatepanel to wrap parts of the page that should be refreshed.


Luis Abreu:

1. use web services to do that. you'd call them through your page by using js proxies that can be automatically inserted on the page.

This is precisely what I'm going to try to use. Seems cleaner to me and I think I understand it better than the updatepanel. Thanks for the information! I really appreciate it.


hello again.

yes, if you ask me, the correct way of using ajax it to use web services to get the data and then js to update the dom presented by the browser. anyway, you cannot deny that the UpdatePanel has some cool things and it'll work nicely in several scenarios.