This question is locked. New answers and comments are not allowed.
hi
I have been working with this from past one week,but i am unable to validate the radcombobox
Acutally,
Binding the values from the dataset like the below
public DataSet GetZipValue(string str)
{
StringBuilder sb = new StringBuilder();
DataSet ds = new DataSet();
try
{
sb.Append("EXEC Spzip @zip='");
sb.Append(str);
sb.Append("'");
ds = LoginParams.GetSQL(sb.ToString(), login.ConnectionString(), "zip", CommandTimeOut);
}
catch (Exception ex)
{
}
finally
{
sb = null;
}
return ds;
}
protected void radZipCode_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
try
{
e.Item.Text = ((DataRowView)e.Item.DataItem)["Zip"].ToString();
e.Item.Value = ((DataRowView)e.Item.DataItem)["City"].ToString();
e.Item.Attributes["Zip"] = ((DataRowView)e.Item.DataItem)["Zip"].ToString();
e.Item.Attributes["City"] = ((DataRowView)e.Item.DataItem)["City"].ToString();
e.Item.Attributes["State"] = ((DataRowView)e.Item.DataItem)["State"].ToString();
}
catch (Exception ex)
{
}
}
protected void radZipCode_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
try
{
if (e.Text.Length > 1)
{
RadComboBox combo = (RadComboBox)o;
DataSet ds = new DataSet();
ds = GetZipValue(e.Text);
combo.DataSource = ds.Tables[0];
combo.DataBind();
}
}
catch (Exception ex)
{
}
}
}
Problem is :
how to validate the radcombobox that the selected item (after the obclientblur event)is matched with the DATASETgetting from backend..?
if it is matched the value is TRUE
other wise false value returns...
I have been working with this from past one week,but i am unable to validate the radcombobox
Acutally,
Binding the values from the dataset like the below
public DataSet GetZipValue(string str)
{
StringBuilder sb = new StringBuilder();
DataSet ds = new DataSet();
try
{
sb.Append("EXEC Spzip @zip='");
sb.Append(str);
sb.Append("'");
ds = LoginParams.GetSQL(sb.ToString(), login.ConnectionString(), "zip", CommandTimeOut);
}
catch (Exception ex)
{
}
finally
{
sb = null;
}
return ds;
}
protected void radZipCode_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
try
{
e.Item.Text = ((DataRowView)e.Item.DataItem)["Zip"].ToString();
e.Item.Value = ((DataRowView)e.Item.DataItem)["City"].ToString();
e.Item.Attributes["Zip"] = ((DataRowView)e.Item.DataItem)["Zip"].ToString();
e.Item.Attributes["City"] = ((DataRowView)e.Item.DataItem)["City"].ToString();
e.Item.Attributes["State"] = ((DataRowView)e.Item.DataItem)["State"].ToString();
}
catch (Exception ex)
{
}
}
protected void radZipCode_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
try
{
if (e.Text.Length > 1)
{
RadComboBox combo = (RadComboBox)o;
DataSet ds = new DataSet();
ds = GetZipValue(e.Text);
combo.DataSource = ds.Tables[0];
combo.DataBind();
}
}
catch (Exception ex)
{
}
}
}
Problem is :
how to validate the radcombobox that the selected item (after the obclientblur event)is matched with the DATASETgetting from backend..?
if it is matched the value is TRUE
other wise false value returns...