473,320 Members | 1,839 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,320 software developers and data experts.

Datagrid tutorial needed.

Coming from VB, I find the changes needed to manipulate a datagrid are much
more taxing than previously.

Is there a good tutorial for things like:

Setting the column widths
making the grid uneditable
making the whole row highlight when selected

There are a number of posts but as I am trying to learn on my own, they are
a bit confusing.
For example,. I have found the following code to remove the updating row at
the end, but dont understand why I need a currencyManager to do this. (I
know it is C# code)

CurrencyManager cm = (CurrencyManager)dataGrid.BoundContext[
dataGrid.DataSource,
dataGrid.DataMember];

DataView theView = (DataView)cm.List;
theView.AllowNew = false;

Any help appreciated.

Thanks

Andrew Baker.
Nov 20 '05 #1
2 1932
Cor
Hi Andrew,

You are a little bit confusing.
Coming from VB, I find the changes needed to manipulate a datagrid are much more taxing than previously.


Do you want to do it with VB.net code or with C# code because you are
talking about that also?

However in general, there are lots of methods to manipulate a datagrid. For
the columnwidth and things like that I think that the best you can do is
look at the datgridstyles and datagridcolumnstyles on msdn.microsoft.com

http://msdn.microsoft.com/library/de...ridcontrol.asp

For manipulating rows, you can look at the underlaying layers. Mostly the
dataview or basicly the datatable. However some people like to do the
manipulating from rows using the binding and currency manager. I think that
is a matter of preference (I like the most the dataview).

One of the nicest thing from dotNet is that there is not one best method,
but you can choose the best method for your problem or your way of thinking.

I hope this helps?

Cor
Nov 20 '05 #2
Cor
Hi Andrew,

You are a little bit confusing.
Coming from VB, I find the changes needed to manipulate a datagrid are much more taxing than previously.


Do you want to do it with VB.net code or with C# code because you are
talking about that also?

However in general, there are lots of methods to manipulate a datagrid. For
the columnwidth and things like that I think that the best you can do is
look at the datgridstyles and datagridcolumnstyles on msdn.microsoft.com

http://msdn.microsoft.com/library/de...ridcontrol.asp

For manipulating rows, you can look at the underlaying layers. Mostly the
dataview or basicly the datatable. However some people like to do the
manipulating from rows using the binding and currency manager. I think that
is a matter of preference (I like the most the dataview).

One of the nicest thing from dotNet is that there is not one best method,
but you can choose the best method for your problem or your way of thinking.

I hope this helps?

Cor
Nov 20 '05 #3

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

Similar topics

4
by: Aaron Ackerman | last post by:
I am using typed datasets in an N-Tier Windows app using VB.NET. I know this posting cannot be fully explained in a single post that is why I am asking for someone to point me to a real world...
0
by: admin | last post by:
New Article Building a DataGrid with Add and Edit Features By Tulga Kalayci The DataGrid server control is one of the most widely used controls in ASP.NET-based projects to display data in a...
0
by: Stephen | last post by:
This is a real brain-teaser and i'd really appreciate it if someone can try and understand what im trying to do and give me a few pointers or ideas to help me work out my problem. Im basically...
4
by: Do | last post by:
Hi, I tried to bind an XML similar to the following to a datagrid. <Idontwant> <Iwant> <Yes></Yes> <Yes></Yes> <Yes></Yes> <Yes></Yes>
1
by: jm | last post by:
I manually put a datagrid in on a form. I then added this code to an event to populate it: OdbcConnection conn = new OdbcConnection("DSN=CardBase"); sqlCardHolders = "SELECT * FROM...
5
by: quanga | last post by:
Hi- I have a datagrid that in some cases can be several thousand rows in length. What I'd like it to do is have the data pushed to the browser after every, say, 100 rows or so. Kind of a...
2
by: Andrew Baker | last post by:
Coming from VB, I find the changes needed to manipulate a datagrid are much more taxing than previously. Is there a good tutorial for things like: Setting the column widths making the grid...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
7
by: Mark B | last post by:
Can someone write some VB.Net example code for me that does this: 1) Creates a gridview control with the results of a SQL stored procedure that has 1 parameter (text) 2) Adds an extra column...
2
by: brock wade | last post by:
I have a Datagrid that is working fine displying my records, but I'm trying to program buttons on each record line to launch another web page that shows all the details for the product: ...
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
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...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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

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.