473,772 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing contents of a combo in datagridview to remove data.

Bob
I have a combox column in a datagridview (vs2005 and VB.NET). Once I select
an item from the dropdownlist in the combox and do a save, I can no longer
remove the item. I can change my selection but not return to a no item
selected state (ie set its foreign key value in the table the row is bound
to null). I can hit Ctrl-0 and the text portion of the combobox dissapears
but on save it always comes back with a selected item in the list. How do
you force a null to the value item of the combobox ?

Thanks for any insights,

Bob
Jan 5 '06 #1
0 1169

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

Similar topics

3
3002
by: Doug | last post by:
Hi I have the following code (not mine) that populates a datagrid with some file names. But I want to replace the datagrid with a combo box. private void OnCurrentDataCellChanged(object sender, System.EventArgs e) {try{ DataSet ds = dgMembers.DataSource as DataSet;
9
9645
by: bill.jenner | last post by:
I have two related tables I wish to use in a grid. The second table has to drive the list of items apart of a combo box apart of one of the grids columns. Table 1 schema has columns ( . . . . "Department" . . . ) and needs to populate the entire grid. Table 2 schema had one column ("Department") and needs to populate a combo box attached to one column of the grid. I attempted to configure this using the DataGridView wizard but I wasn't...
1
4711
by: mark carew | last post by:
Hi, Problem - An extra column to the left (even with row headers disabled) ---------------------------------------------------------- Apologies if this posting is already in the newsgroup; but have changed to 40tude and can't see it in the newly dowloaded messages. It was originally html (tut tut) so maybe it didn't register. I have tried a new xml file and generated a new xsd file from it using xsd.exe and now the xml file produces...
7
1852
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table in a different dataset. One combo box is displaying the Employees payroll ID. The other is
2
1474
by: gwoodhouse | last post by:
Hello all, I have a combobox cell in a datagridview component. Im using a seperate window to remove the items from the combo box. Whenever i drop down the combo box however the items still seem to be there. My first thought was that i was somehow cloning the combobox and removing items from the clone but that doesnt seem to be the case: the underlying object confirms it has had those items deleted.
0
1173
by: Chris | last post by:
I have a DataGridView in a form that will display the information from various DataTables in my DataSet. The user is provided a list of tables and when they select a table name, the DataGridView displays the appropriate DataTable. When a user changes some of the settings in my program, I sometimes have to recreate some of the DataTables, however, the DataGridView will still somehow display the original DataTable even if the DataGridView...
7
3755
oll3i
by: oll3i | last post by:
i want to change the values in two columns one colum is a combobox and the secons column is editable too i want to get the value of that second column and the value of combobox and sent that to another application i have setValueAt(Object value,int row, int col) but it works only for combobox when i enter some data in the second editable column the value i entered disappears rows are a list data = new...
4
4862
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a sql DataAdapter (da) da.SelectCommand.CommandText = "Select * from Servertbl1" da.Fill(ds, "tbl1") so far, so good. If I add a row to the datagridview I use the following sqlDataAdapter code to update the server table - which works OK when...
2
4680
by: Rob | last post by:
I have a few columns wich represent a primary key from a table. I would like to disallow changing any of its content within the datagridview. Something that would appear logical to me does not work (to disable changing the first column).... DataGridView1.Columns(0).ReadOnly.ToString - does not work DataGridView1.Columns(0).Enabled = False - no such command
0
9620
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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
10104
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
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
8934
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...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.