Nevermind, solved it.
If anyone is interested, I solved it using this code:
DataRow drNew = null;
drNew = ds.Tables[0].NewRow();
drNew["ID"] = 0;
drNew["DESCRIPTION"] = "";
drNew.EndEdit();
ds.Tables[0].Rows.InsertAt(drNew, 0);
Best regards,
Eirik Hesthamar
Norway
Hallo,
I have this code today:
dv = new DataView(ds.Tables[0]);
cbo.DataSource = dv;
cbo.DisplayMember = "DESCRIPTION";
cbo.ValueMember = "ID";
This gives me a combobox / DropDownList which always choose a value. Since the combobox is optional, this needs to be changed, so that the default top...
First class answere!! And the reply speed was beyond words!!!! Were you just sitting around waiting for my question ;-)
Thanks!!!!!!!!!!
Best regards,
Eirik Hesthamar
Norway
Hallo,
In VB6 i used this function:
Function TimeDiff(ByVal inTime As String, ByVal outTime As String)
Dim ainTime As Date, aoutTime As Date
Dim mElapsed As Long
ainTime = Format(Right("0" & inTime, 4), "@@:@@") ' right justify the inTime
aoutTime = Format(Right("0" & outTime...
Hallo,
I just can't get this one figured out. I have a frmMain which contains some logic which controlls my app.
1.frmMain loads
[STAThread]
public static void Main() {
Application.Run(new frmMain());
}
2.frmMain calles StartUp() which looks something like this:
private void...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.