Hi,
I am using 2 Radlistbox controls in my application for trnasferring items.
the item is transferring well when i press inbuilt transfer button but same it not working on server side after publishing my application in IIS.
i wrote below code:
<telerik:RadListBox runat="server" ID="RadListBoxSource" OnItemDataBound="RadListBoxSource_ItemDataBound"
OnTransferring="RadListBoxSource_Transferring" AllowTransferOnDoubleClick="true" AutoPostBack="true"
AllowTransfer="true" SelectionMode="Multiple" TransferToID="RadListBoxDestination"
AutoPostBackOnTransfer="true" OnSelectedIndexChanged="RadListBoxSource_SelectedIndexChanged">
</telerik:RadListBox>
<telerik:RadListBox runat="server" ID="RadListBoxDestination" AllowTransferOnDoubleClick="true"
EnableDragAndDrop="false" OnSelectedIndexChanged="RadListBoxDestination_SelectedIndexChanged"
SelectionMode="Multiple" OnItemDataBound="RadListBoxDestination_ItemDataBound" AutoPostBack="true"
AutoPostBackOnTransfer="true" />
in c# code behind:
protected void RadListBoxSource_Transferring(object sender, RadListBoxTransferringEventArgs e)
{
if (e.SourceListBox.ID == "RadListBoxSource")
{
if (e.Items.Count == e.SourceListBox.Items.Count)
{
RadListBoxSource.ClearSelection();
}
if (RadListBoxSource.SelectedIndex == -1)
{
if (e.SourceListBox.ButtonSettings.ShowTransferAll == true)
{
for (int i = 0; i < RadListBoxSource.Items.Count; i++)
{
if (RadListBoxSource.Items[i].Text == RadListBoxSource.Item[i].Value)
RadListBoxSource.Items[i].Selected = false;
else
RadListBoxSource.Items[i].Selected = true;
}
foreach (RadListBoxItem item in RadListBoxSource.SelectedItems)
{
AddToDestination(item.Text, item.Value);
BindListBoxes();
}
e.Cancel = true;
}
}
else
{
LeftLstboxSelection();
e.Cancel = true;
}
}
if (e.SourceListBox.ID == "RadListBoxDestination")
{
if (e.Items.Count == e.SourceListBox.Items.Count)
{
RadListBoxDestination.ClearSelection();
}
if (RadListBoxDestination.SelectedIndex == -1)
{
if (e.SourceListBox.ButtonSettings.ShowTransferAll == true)
{
for (int i = 0; i < RadListBoxDestination.Items.Count; i++)
{
if (RadListBoxDestination.Items[i].Text == RadListBoxDestination.Items[i].Value)
RadListBoxDestination.Items[i].Selected = false;
else
RadListBoxDestination.Items[i].Selected = true;
}
foreach (RadListBoxItem item in RadListBoxDestination.SelectedItems)
{
AddToSource(item.Text, item.Value);
}
BindListBoxes();
e.Cancel = true;
}
}
else
{
RightLstboxSelection();
e.Cancel = true;
}
}
if (RadListBoxDestination.Items.Count == 0)
{
btnExportTemplate.CssClass = "my_custom_button_gray_l";
btnExportTemplate.Enabled = false;
}
else
{
btnExportTemplate.CssClass = "my_custom_button_l";
btnExportTemplate.Enabled = true;
}
}
after publishing on server item is not tranferring when double click or selecting item.
Please support.waiting for quick response from Telerik Team
Thanks & Regards,
Santhosh Naik
I am using 2 Radlistbox controls in my application for trnasferring items.
the item is transferring well when i press inbuilt transfer button but same it not working on server side after publishing my application in IIS.
i wrote below code:
<telerik:RadListBox runat="server" ID="RadListBoxSource" OnItemDataBound="RadListBoxSource_ItemDataBound"
OnTransferring="RadListBoxSource_Transferring" AllowTransferOnDoubleClick="true" AutoPostBack="true"
AllowTransfer="true" SelectionMode="Multiple" TransferToID="RadListBoxDestination"
AutoPostBackOnTransfer="true" OnSelectedIndexChanged="RadListBoxSource_SelectedIndexChanged">
</telerik:RadListBox>
<telerik:RadListBox runat="server" ID="RadListBoxDestination" AllowTransferOnDoubleClick="true"
EnableDragAndDrop="false" OnSelectedIndexChanged="RadListBoxDestination_SelectedIndexChanged"
SelectionMode="Multiple" OnItemDataBound="RadListBoxDestination_ItemDataBound" AutoPostBack="true"
AutoPostBackOnTransfer="true" />
in c# code behind:
protected void RadListBoxSource_Transferring(object sender, RadListBoxTransferringEventArgs e)
{
if (e.SourceListBox.ID == "RadListBoxSource")
{
if (e.Items.Count == e.SourceListBox.Items.Count)
{
RadListBoxSource.ClearSelection();
}
if (RadListBoxSource.SelectedIndex == -1)
{
if (e.SourceListBox.ButtonSettings.ShowTransferAll == true)
{
for (int i = 0; i < RadListBoxSource.Items.Count; i++)
{
if (RadListBoxSource.Items[i].Text == RadListBoxSource.Item[i].Value)
RadListBoxSource.Items[i].Selected = false;
else
RadListBoxSource.Items[i].Selected = true;
}
foreach (RadListBoxItem item in RadListBoxSource.SelectedItems)
{
AddToDestination(item.Text, item.Value);
BindListBoxes();
}
e.Cancel = true;
}
}
else
{
LeftLstboxSelection();
e.Cancel = true;
}
}
if (e.SourceListBox.ID == "RadListBoxDestination")
{
if (e.Items.Count == e.SourceListBox.Items.Count)
{
RadListBoxDestination.ClearSelection();
}
if (RadListBoxDestination.SelectedIndex == -1)
{
if (e.SourceListBox.ButtonSettings.ShowTransferAll == true)
{
for (int i = 0; i < RadListBoxDestination.Items.Count; i++)
{
if (RadListBoxDestination.Items[i].Text == RadListBoxDestination.Items[i].Value)
RadListBoxDestination.Items[i].Selected = false;
else
RadListBoxDestination.Items[i].Selected = true;
}
foreach (RadListBoxItem item in RadListBoxDestination.SelectedItems)
{
AddToSource(item.Text, item.Value);
}
BindListBoxes();
e.Cancel = true;
}
}
else
{
RightLstboxSelection();
e.Cancel = true;
}
}
if (RadListBoxDestination.Items.Count == 0)
{
btnExportTemplate.CssClass = "my_custom_button_gray_l";
btnExportTemplate.Enabled = false;
}
else
{
btnExportTemplate.CssClass = "my_custom_button_l";
btnExportTemplate.Enabled = true;
}
}
after publishing on server item is not tranferring when double click or selecting item.
Please support.waiting for quick response from Telerik Team
Thanks & Regards,
Santhosh Naik