Hello,
I've installed Visual Web Developer Express 2010 and Telerik ASP .NET Ajax Controls.
I'm trying to follow a tutorial.
At a certain point it says : "Add a RadMenu to the top of the web page."
I guess I have to drag and drop it from the Toolbox ? I think I've already seen someone doing this a year ago.
But my problem is : I have no Telerik's Rad controls in my toolbox and I have no idea how I'm supposed to add them.
Thank you if you can help.
<
telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function CheckAll_CCRLoadChartFilter_Location() {
var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
for (var i = 0; i < chkboxs_Location.length - 1; i++) {
if (document.getElementById(chkboxs_Location[i]) != null) {
document.getElementById(chkboxs_Location[i]).checked = document.getElementById(chkboxs_Location[0]).checked;
}
}
}
function RemoveCheckAll_CCRLoadChartFilter_Location() {
var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var d = $find("<%= ddlLocation.ClientID %>")
d.set_selectedItem(0)
document.getElementById(chkboxs_Location[0]).checked =
false;
}
function SetTextOfTheLocationComboBox_CCRLoadChartFilter(sender, eventArgs) {
var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var selectedLocation = "";
for (var i = 0; i < chkboxsLocation.length - 1; i++) {
var chkedItemLocation = document.getElementById(chkboxsLocation[i]);
var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);
if (chkedItemLocation != null && chkedItemLocation.checked) {
if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {
selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;
sender.set_text(selectedLocation);
return;
}
selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +
",";
}
}
if (selectedLocation == "")
selectedLocation =
"..."
else {
document.getElementById(
"<%= tdLocation.ClientID %>").title = selectedLocation;
if (selectedLocation.length > 25) {
selectedLocation = selectedLocation.substring(0, 22) +
"...";
}
}
sender.set_text(selectedLocation);
}
function SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close(sender, eventArgs) {
var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var selectedLocation = "";
for (var i = 0; i < chkboxsLocation.length - 1; i++) {
var chkedItemLocation = document.getElementById(chkboxsLocation[i]);
var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);
if (chkedItemLocation != null && chkedItemLocation.checked) {
if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {
selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;
sender.set_text(selectedLocation);
return;
}
selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +
",";
}
}
if (selectedLocation == "")
selectedLocation =
"..."
else {
document.getElementById(
"<%= tdLocation.ClientID %>").title = selectedLocation;
if (selectedLocation.length > 25) {
selectedLocation = selectedLocation.substring(0, 22) +
"...";
}
}
sender.set_text(selectedLocation);
}
</script>
</
telerik:RadScriptBlock>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel11">
<table width="235px" dir="rtl" style="text-align: left">
<tr>
<td>
<telerik:RadComboBox Width="100%" ID="ddlLocation" runat="server" Skin="Office2007"
MaxHeight="150px" AutoPostBack="true" CausesValidation="false" OnItemDataBound="ddlLocation_ItemDataBound"
OnClientSelectedIndexChanged="SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close" OnSelectedIndexChanged="ddlLocation_OnSelectedIndexChanged"
OnClientLoad="SetTextOfTheLocationComboBox_CCRLoadChartFilter">
<ItemTemplate>
<asp:CheckBox ID="chkDropLocationItem_CCRLoadChartFilter" AutoPostBack="false" Checked="true"
runat="server" Text='<%# Eval("Value")%>' />
<asp:HiddenField ID="hdnDropLocationItem_CCRLoadChartFilter" runat="server" Value='<%# Eval("Key")%>' />
</ItemTemplate>
<CollapseAnimation Type="OutQuint" Duration="0"></CollapseAnimation>
</telerik:RadComboBox>
</td>
</tr>
</table>
</
telerik:RadAjaxPanel>
* on .CS
protected override void OnPreRender(EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "Register_CCRLoadChart_checkBoxsLocation_ID", "<script> var Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs='" + CheckBoxesLocationIds + "';</script>", false);
base.OnPreRender(e);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
FillLocationLookup();
}
}
protected
void ddlLocation_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
CheckBox chk = e.Item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;
if (chk != null)
{
if (e.Item.Index == 0)
chk.Attributes[
"onClick"] = "CheckAll_CCRLoadChartFilter_Location()";
else
chk.Attributes[
"onClick"] = "RemoveCheckAll_CCRLoadChartFilter_Location()";
if (!CheckBoxesLocationIds.Contains(chk.ClientID))
CheckBoxesLocationIds += chk.ClientID +
",";
}
}
protected void ddlLocation_OnSelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
List<String> selectedLocation = new List<String>();
foreach (RadComboBoxItem item in ddlLocation.Items)
{
CheckBox chk = item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;
HiddenField hdnField = item.FindControl("hdnDropLocationItem_CCRLoadChartFilter") as HiddenField;
if (chk != null && hdnField != null && chk.Checked && !String.IsNullOrEmpty(hdnField.Value))
{
if (hdnField.Value == Constants.AllLocation_Key)
{
selectedLocation.Add(
Constants.AllLocation_Key);
break;
}
else
{
selectedLocation.Add(hdnField.Value);
}
}
}
FilterParameters filterParameters = (((IAdvanceSearch)Page).Parameters);
List<string> courts = filterParameters.Courts; ;
CourtNodeTree courtNameTree = FiltersManager.CurrentUserCourtNodeTree.GetCourtNameTree(courts.ToArray());
List<LookupItem> lookupCourtType = new List<LookupItem>();
string[] classification = new string[1];
classification[0] = filterParameters.Classificaton;
lookupCourtType = courtNameTree.GetCourtTypeNodes(selectedLocation.ToArray(), classification);
if (lookupCourtType.Count > 0)
{
lookupCourtType.Sort(
new LookupItemComparer());
lookupCourtType.Insert(0,
new LookupItem(Constants.AllCourtsType_Key, Constants.AllCourtsType_Value));
FillDropDown(lookupCourtType, ddlCourtType);
}
else
{
ddlCourtType.Items.Clear();
ddlCourtType.ClearSelection();
}
}
yours comments and fix will be highly apprieciated,
Regards,
Samar hamdan.
For Each grdItem As Telerik.Web.UI.GridItem In GridAssignmentRelocationAssistance.Items
For Each selectedFilesItem In selectedFiles
If selectedFilesItem = GridAssignmentRelocationAssistance.MasterTableView.DataKeyValues(grdItem.ItemIndex)
(GridAssignmentRelocationAssistance.MasterTableView.DataKeyNames(2)).ToString() Then
Dim selectBox As CheckBox = grdItem.FindControl("chkRelocationAssistanceFiles")
selectBox.Checked =
True
End If
Next
Next
Thanks,
Kapil