473,799 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add Items in the DatagridViewCom boboxColumn of DatagridView during runtime

45 New Member
Hi,

My application is in VS2008 and coded in VB.net.

I have a datagridView(DG V) on one of my form.DGV contains a column of type DatagridViewCom boboxColumn.I have another column of SrNo.

Consider Table1 to be the table from where my DatagridView is filled which contains following fields SrNo,Value1,Val ue2.

My requirement is i want to fill the values in my DatagridViewCom boboxColumn from Table1.The DatagridViewCom boboxColumn's combobox should contain values of columns Value1,Value2 of Table1.

Sample data of Table1

SrNo Value1 Value2

1 2 3

2 4 5

As data in datagridView is filled from Table1 the data of SrNo column of Table1 is also populated in one of the column of DGV.

Now my DatagridViewCom boboxColumn combobox should contain the values of Value1 and Value2 of Respective SrNo.

Like Row one of my DGV has SrNo 1 as first value,so the Value1 and Value2 of SrNo 1 should be added to the row's DatagridViewCom boboxColumn.

Select distinct Value1,Value2 From Table1 where SrNo=DGV.items( 0,DGV.currentce ll.rowIndex).va lue.Hope this Query willl make things more clear

Please Suggest.
Oct 11 '11 #1
3 3305
kadghar
1,295 Recognized Expert Top Contributor
Try creating a DataSet, fill the data set and then just use the BIND method of your DGView.
Oct 11 '11 #2
SEhtesham
45 New Member
dude i know how to fill the datagridview...
i want to fill the DatagridViewCom boboxColumn.Ple ase help how can i fill that combobox in DatagridView.Da tagridViewCombo boxColumn should have the values of columns Value1 and Value2 from Table1.
Oct 12 '11 #3
1sanjeev
1 New Member
How to calcuate clossing balance when opening fix in sql server:
Oct 13 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4375
by: Tom Rahav | last post by:
Hello. I use visual basic .net 2003 and Crystal Reports for creating win-reports. My question is if there is any possibility to set font properties (type, color and size) of a text control or data field during runtime. To be more accurate, I know I can set these settings by formula (next to each property in design time), but I would like to let the user choose what font settings he would like to use. I allow the user to set there...
1
32235
by: Jeff N | last post by:
It it possible to change a button's or text box's font size during runtime? When I try to build my application with this code: this.ActiveControl.Font.Size = "8.25"; I get this error message: Property or indexer "System.Drawing.Font.Size' cannot be assigned to -- it is read only I can change a button's text property during runtime, but I'd also like to change the font size as well.
2
1706
by: Newbie | last post by:
Hello! I'm trying to figure out how to do the following: I need to show a table (perhaps using DataGrids, repeaters or others) for each salesperson in the sales dept. But the no. of tables to be shown is to be determined during runtime. It's possible that some salespersons have no sales figures to begin with and therefore no table to show. Thanks in advance and please help!
3
3010
by: Newbie | last post by:
hi! i am able to upload files successfully. but i have one minor problem. files are uploaded correctly if the directory exists, it is throwing an exception if the directory doesnt exist. but the directory name is created during runtime. is there a way to create a directory during runtime? exception: Error saving file C:\temp\188\ System.IO.DirectoryNotFoundException: Could not find a part of the path
1
1361
by: sageer | last post by:
I'm want retrieve a file, edit it and then copy it to a folder during runtime I'm trying to figure where exactly can I store these files in the ..NET solution so that I can access them during RunTime.
3
10630
by: Sampson | last post by:
I have a question about enumeration and how to populate them during runtime. I am using vb.net but will happily take any advice in c# as well. Here is an example to help illustrate what I am after. Create a class named “clsMyItems” and in that class place an enum. Public Enum Items Item1 = 0 Item2 = 1 Item3 = 2
1
1050
by: polarbearvillage | last post by:
I am using Visual Basic 2005. Okay, I add items to a dropdown menu on a toolbar during runtime, and I when I click them, I need to shell the program that is associated with that one item (I have the program path figured out). Each item is in an array. How would I do this?
2
6229
by: sagarbakliwal | last post by:
hi, I am new to this forum but i have received a lot of help reading through this forum. I am creating a VB.NET application for Patient Record Management. In this there are various combo boxes and buttons being generated during run time when a particular patient ID is searched for. Say one patient might have 2 entries some may have 10 entries. So the controls are generated dynamically and then the control names are added to the forms...
8
39953
by: kashifabbasi786 | last post by:
I want to change the DataGridView Heading on run time by giving in textbox. how i will do this,plz help me Thnx
2
2285
by: letobale1982 | last post by:
Hello I would like to get some ideas on how to modify a Combobox during runtime and save the changes so next time the form is ran changes are available. Here is the plan. A form displays a combobox that get populated with several items. Next to the combobox I will add three buttons: Add, Delete and Modify. My idea is that the combobox will read a previously created file with the items of the list. And each button will modify that same...
0
9544
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.