473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Grid in ASP.Net like Windows Forms

Hi,

I have a question. Is it possible reproduce the behavior of windows
forms datagrid in asp.net? For example, I want to fill the grid, but
the data must not be inserted in my database. I think use a dataset in
session or viewstate, but i think this is very heavy, what do you think
? do you have any example? or url?

Thanks,

Alfredo Barrientos

Nov 19 '05 #1
3 1075
A dataset does have a lot of overhead, and is costly to Session and
Viewstate

Try using something like an array which is less costly
This can too be bound to a datagrid

"Alfredo" <ab*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,

I have a question. Is it possible reproduce the behavior of windows
forms datagrid in asp.net? For example, I want to fill the grid, but
the data must not be inserted in my database. I think use a dataset in
session or viewstate, but i think this is very heavy, what do you think
? do you have any example? or url?

Thanks,

Alfredo Barrientos

Nov 19 '05 #2
Hi Grant,

An Array or an ArrayList? Which is the least costly?

In Viewstate or session?

Is there any way to get a dataset from datagrid viewstate?

Thanks,

Alfredo Barrientos

Nov 19 '05 #3
Hey Alfredo.

Sorry, went home friday evening before i saw your question.

Array vs. ArrayList

An Array is the least costly, as an ArrayList has alot of built in
functionality which make them much easier to use.
E.g.
with an Array you have to specify the size of it when you instantiate it,
whereas an Arraylist you don't
An ArrayList infact sits between a DataSet and Array in terms of
functionality and overhead.

I often use ArrayLists to get my data initially, then use the
ArrayList.ToArray function to get them to an Array.

I would say these type of objects are better to session than viewstate.
The reason being is the Viewstate can get really big and can slow down the
page load time.
Also, sometimes you get the Infamous Viewstate errors which are painfull to
fix up.

But then again, you don't exactly want to punish your server with sessions,
as that can slow down the whole site and not just a given user on a given
page.
Ultimately, you should be using your Cache (that is for general data, not
client specific - i.e. like a list of countries, not a users answers to a
questionairre)
DataSet from DataGrid

you can get a DataSet from a DataGrid, you'll need to cast its datasource.
Something like
DataSet ds = (DataSet)MyDataGrid.DataSource;

Good luck

"Alfredo Barrientos" <ab*********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi Grant,

An Array or an ArrayList? Which is the least costly?

In Viewstate or session?

Is there any way to get a dataset from datagrid viewstate?

Thanks,

Alfredo Barrientos

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Carnley | last post by:
I am learning how to use windows forms and I have come across a small problem. Whenever I run my program it opens a console window before launching the windows form. The console doesnt go away...
3
by: rawCoder | last post by:
Hi, Ever been to George Shepherd's Windows Forms FAQ site at Sysfusion http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp Great site with almost all the How-To stuff related to Windows Forms. ...
4
by: waltborders | last post by:
Hi, Because the blind are unable to use a mouse, keyboard navigation is key. A major difficulty is that not all windows forms controls are keyboard 'tab-able' or 'arrow-able' or have "tab...
3
by: mahtan | last post by:
Please help I have the problem that when I change the data in a Windows.Forms.DataGrid by a separate thread the following Exception is thrown: ThreadSystem.NullReferenceException in...
3
by: John Jasobs | last post by:
I know this has been asked before but I have not seen it answered. How would one implement nested datagrids in windows forms based on the table relationships within a dataset? Or, is there some...
11
by: Michael Kellogg | last post by:
I have a collection of custom objects that I am displaying in a Windows Forms Datagrid. To display it, I take the collection and build a DataTable object on the fly, then set the grid's DataSource...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
1
by: Logician | last post by:
I am trying to just load a datagrid and save the changes. I have googled and sweated over this, and thanks to Microsoft I have much pain. Can anyone help? I am populating the DataGrid with NP,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.