Hai,
IN Asp.net i used to set by default text for a year dropdown is folloing....
its work well..
ddlFiscalYear.Items.Add("--Select Year--");
ddlFiscalYear.Items.FindByText("--Select Year--").Value ="0";
ddlFiscalYear.SelectedIndex = ddlFiscalYear.Items.Count - 1;
But i want the same functionality in windows applications..
In the windows i can't find "FindByText" Property,
How i cant get the same functionality in windows...
If u know help me.....
i am binding comboBox suing DataBase like following
ds= ObjUtl.FillDropdownlist("Mt_GetPostName_For_DOBCriteria");
cmbPostName.DataSource = ds.Tables[0];
cmbPostName.DisplayMember = "Name";
cmbPostName.ValueMember = "Id";
ComboBox binds successfully, and by default shows the first item in comboBox but i want first item is
-- Select Post -- which is added programatically by me.
i wrote the following code for that but didn't get the proper output
cmbPostName.SelectedText = "--Select PostName--";
cmbPostName.SelectedIndex = -1;
will u help me to get my desired output........
Thanks & Regards
Honey 4 U........