Hi,
I have two list boxes : available & selected values.
When I'm allowing edits , I need to pre-populate the available & selected values. So I have tried doing the transfer programmatically :
It is transferring the items but not removing them from available values list box. Am I missing something ?
Please advice.
Thanks
Kiran
I have two list boxes : available & selected values.
When I'm allowing edits , I need to pre-populate the available & selected values. So I have tried doing the transfer programmatically :
radLstAvailable.DataSource = dataList; |
radLstAvailable.DataTextField = "Name"; |
radLstAvailable.DataValueField = "ID"; |
radLstAvailable.DataBind(); |
if (edit) |
{ |
List<Steps> steps = DataSvcClient.GetSteps(); |
radLstAvailable.TransferToID = "radLstSelected"; |
foreach (Step step in steps) |
{ |
RadListBoxItem lbItem = radLstAvailable.Items.Where(item => item.Value == step.ID.ToString()).FirstOrDefault(); |
if (lbItem != null) |
{ |
if (step.Order == 0) |
lbItem.Checked = true; |
radLstAvailable.Transfer(lbItem, radLstAvailable, radLstSelected); |
} |
} |
} |
It is transferring the items but not removing them from available values list box. Am I missing something ?
Please advice.
Thanks
Kiran