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

Data Grid help

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
Nov 22 '05 #1
2 1362
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 portit over to VB.NET. One thing i have is a subform that is adatasheet. what I want to know, is there away to make thedata grid to have combo boxes or is there away edit the
data grid some how?
Shane
.

Nov 22 '05 #2
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" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
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

Nov 22 '05 #3

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

Similar topics

2
by: Jordan O'Hare | last post by:
Hello Everyone, I am after some help with the following: I have a windows application that contains a list box and two data grids. All three controls are binded to a dataset that contains...
2
by: kk | last post by:
Have 2 problems, any help is appreciated. Tab with Grids -------------- BL - fetching data from DB ( 5 secs - 10 rows) Grid Laod - 20 secs Grid Paint on tab change - 20 secs Problem: The...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
1
by: Linda | last post by:
Hi, I'm new to asp.net and tryign to learn how to work with data grids. I'm retrieving data from a stored procedure and putting it in a data grid. I then want to be able to sort the data when...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
6
by: Tejpal Garhwal | last post by:
I have datagrid filled with some data rows. At the run time i want know how many total rows are there in the data grid ? Any idea ? Any Suggestions ? Thanks in advance Tej
0
by: hlam | last post by:
Help - Calculating the total of a column in a data grid -- when data grid is part of Master-Detail set-up I have setup a Master-Detail form using Visual Studio.Net. A ListBox is the (Master)...
12
by: Kimberley Wiggins | last post by:
Can someone please help me? I am still learning vb so this is fairly new. I have been chasing this problem for 3 days now and I think that I am ready to give up. Does anyone know how to make...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
9
by: trint | last post by:
How can I retrieve all of the data from a datagridview? Any help is appreciated. Thanks, Trint
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.