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

This is a hack that needs some help

A
Hi Group,

I am trying to find how to insert a blank combo box option in my list of
available choices thus representing no choice. I have a total hack right
now below

DataTable dt = Facility.GetDataTable;

//hack starts

DataRow dr = dt.NewRow();
dr["colA"] = string.Empty;
dr["colB"] = string.Empty;
dt.Rows.InsertAt(dr,0);

cboRef.DataSource = dt;
cboRef.ValueMember = "colA";
cboef.DisplayMember= "colB";
As you can see, I am using data binding and so I am not sure how to insert a
blanck row any other way than throught the data rows collection. This is
causing a crash when I try to set the SelectedItem property later.

Any help?
Nov 15 '05 #1
0 972

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

Similar topics

3
by: delerious | last post by:
I've read about the child selector hack (using something like html>body as a selector in the stylesheet), which is good when you want to use styles for all non-IE browsers. Is there a hack just...
4
by: Vigil | last post by:
If only it worked :-( http://www.projectseven.com/csslab/boxmodel/ -- ..
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
31
by: DeltaOne | last post by:
#include<stdio.h> typedef struct test{ int i; int j; }test; main(){ test var; var.i=10; var.j=20;
7
by: Alfonso Morra | last post by:
I cannot believe how convoluted it is to export function templates and class templates from a shared library (or DLL as it is called in the Windoze world). Micro$oft support for STL and...
18
by: R. Bernstein | last post by:
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in...
3
by: nutso fasst | last post by:
Hello. IE7 will support fixed positioning, the lack of which prompted my use of the * html hack. Will the hack be broken by IE7, or will IE7 properly ignore * html rules? Thx, nf
12
by: Ivo | last post by:
I am programming forum. Tech is ASP.NET, C# and SQL Server 2005. I want to see is my site safe, have I made some security problems. Can you try to hack my site untill 10-september-2007.:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
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...

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.