-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Govind_k22
Message 1 in Discussion
Hi , I have a strange problem in C# combobox. I am binding a Datatable with C#
Combo. Before binding i am inserting a row at position 0. After this i am setting a
SelectedValue. That time it throws ArgumentOutOfRangeException DataTable DT= new
DataTable();
DT.Columns.Add("A");
DT.Columns.Add("B");
DataRow dr; dr= DT.NewRow();
dr[0]="0";
dr[1]="Gope";
DT.Rows.Add(dr); dr= DT.NewRow();
dr[0]="1";
dr[1]="Govind";
DT.Rows.Add(dr);
dr= DT.NewRow();
dr[0]="-1";
dr[1]="<Select Default>";
DT.Rows.InsertAt(dr,0);
Cmb.DataSource =DT;
Cmb.ValueMember ="A";
Cmb.DisplayMember ="B";
After this i am trying to set the value Using Cmb.SelectedValue = -1 ; that
time i am getting an Exception. It is coming only when i use Rows.inserAt(dr,pos)
method. If any solutions welcome. Regards, Govind,.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]