I have a dropdownlist bound to a data source with 3 items, iid, cPolicyNo, GroupFundID
I need to reference both iid and groupfundid when the user selects an item.
The method I am trying to use is as below however I am getting an error:
Error 1 Cannot convert type 'Telerik.WinControls.UI.RadListDataItem' to 'System.Data.DataRow' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion
Thanks for any help.
private void Underwriting_Load(object sender, EventArgs e)
{
this.vPolicyNoForCBOTableAdapter.Fill(this.rG.vPolicyNoForCBO);
// Load CBO Source
this.cboPolicyNo.DataBindings.Clear();
this.cboPolicyNo.DataSource = this.rG.vPolicyNoForCBO;
this.cboPolicyNo.DisplayMember = "cPolicyNo";
}
private void cboPolicyNo_SelectedValueChanged(object sender, EventArgs e)
{
// TheSWShop 103014 Find Policy
// Behavior - Allow the user to search for the Policy Number, cbo follows this behavior.
// In original system, once the first 3 letters are typed pull all of the related Policy Data.
// Get latest Year for Policy
// Get Group Fund
DataRow cboPolicyRow = (this.cboPolicyNo.SelectedItem as DataRow);
var groupfundid = cboPolicyRow["groupfundid"].ToString();
this.groupFundID = Int32.Parse(groupfundid);
}
I need to reference both iid and groupfundid when the user selects an item.
The method I am trying to use is as below however I am getting an error:
Error 1 Cannot convert type 'Telerik.WinControls.UI.RadListDataItem' to 'System.Data.DataRow' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion
Thanks for any help.
private void Underwriting_Load(object sender, EventArgs e)
{
this.vPolicyNoForCBOTableAdapter.Fill(this.rG.vPolicyNoForCBO);
// Load CBO Source
this.cboPolicyNo.DataBindings.Clear();
this.cboPolicyNo.DataSource = this.rG.vPolicyNoForCBO;
this.cboPolicyNo.DisplayMember = "cPolicyNo";
}
private void cboPolicyNo_SelectedValueChanged(object sender, EventArgs e)
{
// TheSWShop 103014 Find Policy
// Behavior - Allow the user to search for the Policy Number, cbo follows this behavior.
// In original system, once the first 3 letters are typed pull all of the related Policy Data.
// Get latest Year for Policy
// Get Group Fund
DataRow cboPolicyRow = (this.cboPolicyNo.SelectedItem as DataRow);
var groupfundid = cboPolicyRow["groupfundid"].ToString();
this.groupFundID = Int32.Parse(groupfundid);
}