Hi There ! I've using some properties set in my class to replace Tag
public string cfield { get; set; }
but it is doesnt work for checkbox and combobox. Thank you for your help.
Hi There ! I've using some properties set in my class to replace Tag
public string cfield { get; set; }
but it is doesnt work for checkbox and combobox. Thank you for your help.
Hi ! Pardon for my bad english. Ive been working this code for weeks,
foreach (Control Ctrl in this.Controls)
{
switch (Ctrl.GetType().ToString())
{
case "clarinrt.form.other.sdate":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("Text", formdataset, Ctrl.Tag.ToString()));
break;
case "clarinrt.form.other.slookup":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("Text", formdataset, Ctrl.Tag.ToString()));
break;
case "clarinrt.form.other.scheck":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("Checked", formdataset, Ctrl.Tag.ToString()));
break;
case "clarinrt.form.other.snumeric":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("Text", formdataset, Ctrl.Tag.ToString()));
break;
case "clarinrt.form.other.stext":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("Text", formdataset, Ctrl.Tag.ToString()));
break;
case "clarinrt.form.other.sdropdown":
if (Ctrl.Tag.ToString() != "") Ctrl.DataBindings.Add(new Binding("SelectedIndex", formdataset, Ctrl.Tag.ToString()));
break;
default:
break;
}
}
For each control, TAG property will be filled such as "account.detail" refering to a column in table name, while formdataset is Dataset for this form. This code in Load method on base form. the problem with sdropdown and scheck which inherited from combobox and Checkbox. If I comment out, those two part, Databind work fine. Can someone told me, what I should do ? sdropdown will be databind with Integer column while scheck will be databind with Boolean column Thank you for your help...
Thank you Pravin for the link. It gives me an understanding.
Thank You Dave. It clear my mind.
Hi, I'm new in vb.net What the difference of these codes
for u = 0 to datatable.rows.count - 1
' process code
next
for each rows in datatable.rows
' process code
next
assuming process code are to parsing data datatable.rows either to search or to print or to calculate. which one is faster ? can someone give me some enlighment ? sorry for bad english.
Hi, I'm new in VB.NET I would like to ask what difference of these code
For z = 0 to datagridview.rowcount - 1
'.. code to process ..
next
with these one
for each row in datagridview.rows
'.. Code to process
next
which one is faster ? Thank you for your enlightment