473,387 Members | 1,579 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,387 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 16 '05 #1
3 1862
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 16 '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 16 '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 16 '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: 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...
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...
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: 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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.