PC Review


Reply
Thread Tools Rate Thread

Data Grid help

 
 
Shane
Guest
Posts: n/a
 
      19th Dec 2003
I made a Database in MS Access, and i want to try to port
it over to VB.NET. One thing i have is a subform that is a
datasheet. what I want to know, is there away to make the
data grid to have combo boxes or is there away edit the
data grid some how?


Shane
 
Reply With Quote
 
 
 
 
Puneet Taneja
Guest
Posts: n/a
 
      19th Dec 2003
Dear Shane,

..Net DataGrid basically contains a collection of type
GridTableStylesCollection accessible through the
TableStyles property of the DataGrid.

Each tablestyle (of type DataGridTableStyle) within this
collection corresponds to a DataTable. This mapping is
done by setting the MappingName property of the
DataGridTableStyle object to the name of the DataTable.

Finally each TableStyle (type DataGridTableStyle)
contains a property GridColumnStyles that returns a
collection of type GridColumnStylesCollection. This
collection contains individual instances of types derived
from DataGridColumnStyle. The existing types that this
collection can hold are DataGridTextboxColumn and
DataGridBoolColumn for displaying the textbox style of
column or checkbox style of columns respectively.


For displaying combobox, you will have to create a class,
say DataGridComboboxColumn that should derive from the
DataGridColumnStyle class. Within this class
implementation you can write your code to display the
combobox. Try it out.... In case you require more help, I
can send you the implemented code for this class.

Finally instead of having DataGridTextboxColumn or
DataGridBoolColumn instances added to the
GridColumnStylesCollection class, you will have to ensure
that the DataGridComboboxColumn instance is added to your
generated form's code. Remember each type within the
GridColumnStylesCollection class corresponds to a
DataColumn. This mapping is done using the MappingName
property of the DataGridColumnStyle class (accessible
through one of the derived types). Basically the
MappingName property is set the same string as ColumnName.


Regards,
Puneet Taneja

>-----Original Message-----
>I made a Database in MS Access, and i want to try to

port
>it over to VB.NET. One thing i have is a subform that is

a
>datasheet. what I want to know, is there away to make

the
>data grid to have combo boxes or is there away edit the
>data grid some how?
>
>
>Shane
>.
>

 
Reply With Quote
 
Alphonse Giambrone
Guest
Posts: n/a
 
      19th Dec 2003
I have been working on something similar and have found the following links
very helpful:

http://msdn.microsoft.com/msdnmag/issues/02/03/cutting/

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

http://www.dotnetjunkies.com/Tutoria...63C4C9BBC.dcik
--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us


"Shane" <(E-Mail Removed)> wrote in message
news:061701c3c5fd$1fd4bfa0$(E-Mail Removed)...
> I made a Database in MS Access, and i want to try to port
> it over to VB.NET. One thing i have is a subform that is a
> datasheet. what I want to know, is there away to make the
> data grid to have combo boxes or is there away edit the
> data grid some how?
>
>
> Shane



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Add the Data grid and How to load the Grid? =?Utf-8?B?S2FydGhpa2V5YW4gUGVyaWFzYW15?= Microsoft Access Form Coding 3 2nd Jul 2007 03:02 PM
Grid View / Data Grid =?Utf-8?B?TWFyY28=?= Microsoft Access Forms 4 3rd May 2007 06:03 PM
custom data column headers, specific columns with web data grid =?Utf-8?B?YW5kcmV3Y3c=?= Microsoft C# .NET 0 9th Jul 2004 05:32 AM
How do you alternate images in a data bound column of a data grid control? C Newby Microsoft ASP .NET 7 2nd Apr 2004 06:00 PM
exception during sorting data in a data grid in the constructor of the System.Data.Index class Frank Microsoft Dot NET Framework 0 30th Sep 2003 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:31 AM.