<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"manager"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadScheduler
ID
=
"scheduler"
runat
=
"server"
SelectedView
=
"TimelineView"
RowHeight
=
"40px"
DataKeyField
=
"ID"
DataSubjectField
=
"Subject"
DataStartField
=
"Start"
DataEndField
=
"End"
>
<
TimelineView
NumberOfSlots
=
"24"
SlotDuration
=
"0:15"
ColumnHeaderDateFormat
=
"h tt"
TimeLabelSpan
=
"4"
ShowInsertArea
=
"false"
/>
</
telerik:RadScheduler
>
</
div
>
</
form
>
</
body
>
</
html
>
I need to move selected items from a RadList box to two other listboxes depending upon which button a user clicks. I cannot use the built-in TransferToID because that will only handle one source and one target.
The RadListBox get populated with a databind on the first load ...
if (!Page.IsPostBack)
{
RadListBox1.DataSource = dt;
RadListBox1.DataValueField = "UserID";
RadListBox1.DataTextField ="FullName";
RadListBox1.DataBind();
}
When I try accessing the selected items during a button-click event I do NOT get any hits ... nothing shows up in the SelectedItems collection of the RadListBox. How can I solve this problem ?
Thanks.
protected void btnFindSelected_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
foreach (RadListBoxItem item in RadListBox1.SelectedItems)
{
sb.Append(item.Text);
// THIS IS ALWAYS EMPTY NO MATTER HOW MANY ITEMS I SEE ON THE PAGE THAT AREA SELECTED
}
for (int i = 0; i < RadListBox1.Items.Count; i++)
{
if (RadListBox1.Items[i].Selected)
{
sb.Append(RadListBox1.Items[i].Text);
}
}
}
NOTE: I was able to get a similar version of this to work successfully in a new project ... so there must be something else affecting the original that I haven't spotted.
Hi
I am uploading files to server from webpage. Here I am checking whether file exist or not in server if exist I would like to ask Confirmation message like ‘File already Exist on Server, do you want to Override, if YES I want to Override, if NO I want to skip that file and go for next file.
Here I am using Telerik:RadUpload control to upload multiple files.
Can you please help me to solve this issue.