473,324 Members | 2,473 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,324 software developers and data experts.

UBound - DataSet Less - DataGrid

Hi There,

I simply want a DataGrid in .NET which acts .. well like the old VB6 grid
.... where you fill and access elements directly ... not being dependant on
some data source or DataSet to be more precise.

IOW need a perfectly UnBound DataGrid elements of which can be
added/accessed/modified using simple .Rows and .Columns

Thank You,
rawCoder
Nov 20 '05 #1
3 1620
If you need a unbound datagrid, you have to use DataTable class.

Example

//create a new data table
DataTable dgTable = new DataTable();

//lets create one column
DataColumn dgCol = new DataColumn();
dgCol.DataType = System.Type.GetType("System.String");
dgCol.Caption = "Names";
dgCol.ColumnName = "ColName";

//add column to data table
dgTable.Columns.Add(dgCol);

//lets create a row
DataRow dgRow = new DataRow();
dgRow["Names"] = "My Name";

//add row to data table
dgTable.Rows.Add(dgRow);

//set data table as datasource in the data grid
dataGrid1.DataSource = dgTable;

Shak
(Houston)
"rawCoder" <ra******@hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP11.phx.gbl...
Hi There,

I simply want a DataGrid in .NET which acts .. well like the old VB6 grid
... where you fill and access elements directly ... not being dependant on
some data source or DataSet to be more precise.

IOW need a perfectly UnBound DataGrid elements of which can be
added/accessed/modified using simple .Rows and .Columns

Thank You,
rawCoder

Nov 20 '05 #2
Hi RawCoder,

Why? You can simple make a datatable which acts perfectly as the datasource
for a datagrid with what you get a perfectly a not databasebound datagrid
(of couse with one table, with more you need a combined datatable so a
dataset, which is to make as well very easy without a database of course).

I think that it would be even possible to make an own userdatagrid with that
however I see no reason for that.

However when you are not looking for that, forgive me for interrupting this.

Cor
Nov 20 '05 #3
Thanx Shakir and Cor

But you see what i meant by UnBound and Dataset Less grid was that i dont
need the inclusion of any DataSet / DataTable / DataColumn / DataRow /
DataView ... nothing .

All i need is simple grid with data accessible Cell By Cell rather than
record based.

Actually i have certain need for which i want this and i am thinking of
writing a wrapper that does so.

Has someone written a wrapper over it.

Thanx anyways
rawCoder
Nov 20 '05 #4

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

Similar topics

0
by: Frosty | last post by:
Hi I am using the VS xsd designer to create a strongly typed dataset. The dataset is apparently successfully created, with no warnings or errors given. Is it not then to be expected that this...
3
by: Michael Schindler | last post by:
ROW Accountnr Amount 1 1001 12.00 2 1001 -12.00 3 1002 40.00 4 1002 -12.00 5 1002 ...
6
by: Boaz Ben-Porat | last post by:
I heard somewhere that the DataGrid class is implemented as a XML graph in memory. Is this true ? TIA Boaz Ben-Porat DataPharm a/s Denmark
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
3
by: rawCoder | last post by:
Hi There, I simply want a DataGrid in .NET which acts .. well like the old VB6 grid .... where you fill and access elements directly ... not being dependant on some data source or DataSet to be...
2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
3
by: AFN | last post by:
I need to manually create the data to be shown in a datagrid (or some data table object). Should I create an array and bind the array to the datagrid OR should I create a temporary dataset and...
4
by: About datagird and dataset | last post by:
Hi: I have two problems when using dataset and datagrid. One is how to set different color for each cell in Datagrid.If this is not supported in VB.Net 2003, the next version VB.NET 2005 wil...
17
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
1
by: None | last post by:
Hi, I have developed webshop application using asp.net 1.1. I'm using DataGrid in one of the pages of my site. During the page load the DataGrid will be binded by around 7500 products(rows). At...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.