473,795 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Presenting run-time generated data in sortable datagrid?

Jon
My application needs to present data generated at run time in a datagrid that
can be sorted by clicking on columns, and where rows can be selected and
events generated.

Do I need to set up a dataset and datatable to do this or can I do this
through arrays (which I believe can not be sorted in a datagrid)?

Can anyone point me towards any samples or in the right direction?

thanks much - Jon
Nov 21 '05 #1
2 1396
You have to put the data in a DataTable. Here's a blog post on gen'ing up a
DataTable from scratch:

http://weblogs.asp.net/dneimke/archi.../16/43679.aspx

- Scott Swigart
blog - http://ea.3leaf.com
"Jon" <Jo*@discussion s.microsoft.com > wrote in message
news:53******** *************** ***********@mic rosoft.com...
My application needs to present data generated at run time in a datagrid
that
can be sorted by clicking on columns, and where rows can be selected and
events generated.

Do I need to set up a dataset and datatable to do this or can I do this
through arrays (which I believe can not be sorted in a datagrid)?

Can anyone point me towards any samples or in the right direction?

thanks much - Jon

Nov 21 '05 #2
Jon,
Using a DataSet & DataTable is easier...

However! if you put your data in a collection that implements IBindingList
such as:

Public Class Data
End Class

Public Class DataCollection
Inherits CollectionBase
Implements System.Componen tModel.IBinding List

...

End Class

You can bind an instance of DataCollection to your DataGrid and it will be
sortable.

Rockford Lhotka's book "Expert One-On-One Visual Basic .NET Business
Objects" from A! Press, provides demonstrates how to implement IBindingList.
http://www.lhotka.net

Post if you would like other samples.

Hope this helps
Jay

"Jon" <Jo*@discussion s.microsoft.com > wrote in message
news:53******** *************** ***********@mic rosoft.com...
My application needs to present data generated at run time in a datagrid
that
can be sorted by clicking on columns, and where rows can be selected and
events generated.

Do I need to set up a dataset and datatable to do this or can I do this
through arrays (which I believe can not be sorted in a datagrid)?

Can anyone point me towards any samples or in the right direction?

thanks much - Jon

Nov 21 '05 #3

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

Similar topics

3
4932
by: leroybt.rm | last post by:
Can someone tell me how to run a script from a interactive shell I type the following: >>>python filename >>>python filename.py >>>run filename >>>run filename.py >>>/run filename >>>/run filename.py
4
3217
by: Ed | last post by:
Hello, I took a course in asp about 2 years ago and I was practicing with IIS 5.0. Then I put it down for a while. Now trying to get back to it. I can't run asp files from subdirectories of my root directory, but I can run asp files from the root directory of my website and I can run htm files from the subdirectories. If I run localhost/mytest.asp
5
7043
by: Patrice FRITSCH | last post by:
I'm trying to run a batch file from an asp page using WScript.Shell object. Dim oWSH set oWSH= Server.CreateObject("WScript.Shell") call oWSH.Run("cmd.exe /c " & szCmd , 0, true) szCmd contains the program to execute (fop.bat with several parameters). But I'm getting the following error message :
6
20088
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are quite a few words in this post but the questions are actually quite similar and should be fairly quick to answer ... (1) What is Happening with the Threads
13
5097
by: Bob Day | last post by:
Using vs2003, vb.net I start a thread, giving it a name before start. Code snippet: 'give each thread a unique name (for later identification) Trunk_Thread.Name = "Trunk_0_Thread" ' allow only 1 thread per line Trunk_Thread.ApartmentState = ApartmentState.STA
4
3230
by: trichert | last post by:
Ok , developing a .aspx page with Visual Web Studio (the full page is at the bottom). Basically its a page that displays all my computers and the current logged on user pulling data from a live Altiris database. This works fine, i have added a feature with a link for me to click to run radmin against that computer so i can remote control it. The link shows properly when I hover over it "S:\apps\!drivers\WindowsETC\rview.bat PCNAME". ...
9
4691
by: Brett Wesoloski | last post by:
I am new to VS2005. I changed my program.cs file to be a different form I am working on. But when I go to run the application it still brings up the form that was originally declared as new. When I put in a break point the program does not stop. It is in debug mode. If I change the program.cs file back to the form that was originally being used. The program does go into debug mode. But if I change code in that file it isn't using...
8
3023
by: David Thielen | last post by:
Hi; In our setup program how do I determine if I need to run "aspnet_regiis –i" and if so, is there an API I can calll rather than finding that program on the user's disk and calling it? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
3
1458
by: Nick Wedd | last post by:
Maybe this isn't really a PHP problem. But it's possible that PHP has a good solution for it. I have a php page which collects some input from the user, constructs an image, and then displays it to the user. The line of php that does the actual presentation to the user is print "<a href='$string'><img src='$string' width=784 height=431 border=0></a>\n"; where $string is something like 'r.pl?ar=7;cl=10'
3
11303
by: traceable1 | last post by:
Is there a way I can set up a SQL script to run when the instance starts up? SQL Server 2005 SP2 thanks!
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10439
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.