Hi All,
I'm using combobox in usercontrol data is bind from database through LoadCombo() method if I place this method in if (!ispostback) nothing is load out that it load data , and using this usercontrol in main page in RadTabStrip at first when I select the value and click submit button every things works fine then if I click combox for next selection I get this error :Selection out of range
Parameter name: value
Methods :
private void LoadCombo()
{
DataSet _objDS = new DataSet();
DataSet _objDSCard = new DataSet();
_objDS = _objBlGeneral.fn_EmpId_No_Card_Get(0);
rcbEmpId.DataSource = _objDS;
rcbEmpId.DataTextField = "Emp_Name";
rcbEmpId.DataValueField = "EmpId";
rcbEmpId.DataBind();
_objDSCard = _objBlGeneral.fn_CardId_Ready_Get();
rcbCardId.Items.Clear();
rcbCardId.DataSource = _objDSCard;
rcbCardId.DataTextField = "CatId";
rcbCardId.DataValueField = "CatId";
rcbCardId.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
GetData();
}
LoadCombo();
}
One more query How can I Flush data of combobox before loading the data like first time binding the data again.
Thanks
I'm using combobox in usercontrol data is bind from database through LoadCombo() method if I place this method in if (!ispostback) nothing is load out that it load data , and using this usercontrol in main page in RadTabStrip at first when I select the value and click submit button every things works fine then if I click combox for next selection I get this error :Selection out of range
Parameter name: value
Methods :
private void LoadCombo()
{
DataSet _objDS = new DataSet();
DataSet _objDSCard = new DataSet();
_objDS = _objBlGeneral.fn_EmpId_No_Card_Get(0);
rcbEmpId.DataSource = _objDS;
rcbEmpId.DataTextField = "Emp_Name";
rcbEmpId.DataValueField = "EmpId";
rcbEmpId.DataBind();
_objDSCard = _objBlGeneral.fn_CardId_Ready_Get();
rcbCardId.Items.Clear();
rcbCardId.DataSource = _objDSCard;
rcbCardId.DataTextField = "CatId";
rcbCardId.DataValueField = "CatId";
rcbCardId.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
GetData();
}
LoadCombo();
}
One more query How can I Flush data of combobox before loading the data like first time binding the data again.
Thanks