Hello,
Inside a RadScheduler (ID= "Radscheduler1")
I have a RadComboBox (ID="acbProjet") with an 'OnSelectedIndexChanged' Inside Advanced Insert Form.
I have also an other RadDropDownList (ID="RadDropDownListTypeHeure") depending on the choice of the RadComboBox.
protected void acbProjet_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
// ??? RadDropDownList rddl = (RadDropDownList) RadScheduler.FindControl("RadDropDownListTypeHeure");
// ??? RadDropDownListTypeHeure = (RadComboBox)e.Container.FindControl("RadDropDownListTypeHeure");
}
HOW can i access the RadDropDownList for update the datasource ?
THANK you for your HELP

| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <div> |
| <asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
| <ContentTemplate> |
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server"> |
| <Items> |
| <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1"> |
| <Items> |
| <telerik:RadPanelItem> |
| <ItemTemplate> |
| <cc1:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="Append" AutoPostBack="true" DropDownStyle="DropDown"> |
| </cc1:ComboBox> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2"> |
| <Items> |
| <telerik:RadPanelItem> |
| <ItemTemplate> |
| <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </div> |
| </form> |
| </body> |
<GroupByExpressions> <telerik:GridGroupByExpression> <GroupByFields> <telerik:GridGroupByField FieldName="OrderID" /> </GroupByFields> <SelectFields> <telerik:GridGroupByField FieldName="OrderID" HeaderText="Order ID" /> <telerik:GridGroupByField FieldName="CustLastFirst" HeaderText="Customer" /> <telerik:GridGroupByField FieldName="Total" HeaderText="Order Total" FormatString="{0:C}" /> </SelectFields> </telerik:GridGroupByExpression></GroupByExpressions><SortExpressions> <telerik:GridSortExpression FieldName="CustLastFirst" SortOrder="Ascending" /></SortExpressions><GroupByFields> <telerik:GridGroupByField FieldName="OrderID" /> <telerik:GridGroupByField FieldName="CustLastFirst" /></GroupByFields><telerik:RadWindowManager ID="rwmManagerUsers" runat="server" Style="z-index: 3" > <Windows> <telerik:RadWindow ID="rwManagerUsers_SelectUsers" runat="server" OnClientClose="rwManagerUsers_SelectUsers_OnClientClose" Modal="true" AutoSize="true" Behaviors="Close" v> <ContentTemplate> <asp:ValidationSummary ID="vsAddUserToRoleValidationSummary" runat="server" EnableClientScript="true" ShowMessageBox="true" ValidationGroup="vgAddUserToRoleForm" HeaderText="ERROR! The user cannot be set due to the following reasons: " /> <table> <tr> <td><asp:Label ID="lblSelectedUser" Text="User:" runat="server"></asp:Label></td> <td> <telerik:RadComboBox ID="ddlSelectedUser" runat="server" DataTextField="DisplayName" DataValueField="UserName"></telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvSelectedUser" runat="server" Text="*" ErrorMessage="A User must be selected." ToolTip="A User must be selected." ControlToValidate="ddlSelectedUser" ValidationGroup="vgAddUserToRoleForm" InitialValue="-1"></asp:RequiredFieldValidator> </td> </tr> <tr> <td><asp:Label ID="lblSelectedLocation" Text="Location:" runat="server"></asp:Label></td> <td> <telerik:RadComboBox ID="ddlSelectedLocation" runat="server" DataTextField="Description" DataValueField="LocationCode"></telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvSelectedLocation" runat="server" Text="*" ErrorMessage="A Location must be selected." ToolTip="A Location must be selected." ControlToValidate="ddlSelectedLocation" ValidationGroup="vgAddUserToRoleForm" InitialValue=""></asp:RequiredFieldValidator> </td> </tr> <tr> <td colspan="2"> <asp:Button ID="btnAddUserToRoleSave" runat="server" Text="Add User To Role" OnClick="btnAddUserToRoleSave_Click" ValidationGroup="vgAddUserToRoleForm" /> <asp:Button ID="btnAddUserToRoleCancel" runat="server" Text="Cancel" OnClientClick="rwManagerUsers_Cancel();cancelEvent()" /> </td> </tr> </table> </ContentTemplate> </telerik:RadWindow> </Windows> </telerik:RadWindowManager>Hi, i have a RadDatePicker, how can i change the date textfield edit behaviour?
When I edit my selected date by using the date textfield (not by using the datepicker), when i click on the date textfield, the whole date is highlighted.
Can I make it not highlight the whole date instead?
Attached image (1.png) shows that the current behavior. Click once, whole date is highlighted.
Attached image (2.JPG) is the behavior which I want.
I am using Telerik 2016.2.607.45.
Thank you.
I am opening the popup window with the below code from Server side
var url = string.Format("../UserPopup.aspx?user_Ids={0}&fromDate={1}&toDate={2}", user_Ids, fromDate, toDate);string script = string.Format("function f(){{openDialog('{0}', {1}, {2}, {3});Sys.Application.remove_load(f);}}Sys.Application.add_load(f);", url, "true", 1000, 300);ScriptManager.RegisterStartupScript(Page, Page.GetType(), "someKey", script, true)Below is the code for closing the popup window from javascript. The below code is not working.
function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; return oWindow; }function Close() {var result = window.confirm("Are you sure you want to close the window!");if (result == true) { var oWindow = GetRadWindow(); oWindow.argument = null; oWindow.onunload = refreshParent; oWindow.close(); return false; } } function refreshParent() { window.opener.location.reload(); }How can I close the popup window from client side and refresh the parent page?
FYI: I am using RadWindow as popup for this.
<telerik:RadListView ID="RadListView1" runat="server"
ItemPlaceholderID="ProductsContainer" DataKeyNames="ProductId" AllowPaging="true" PageSize="12"
OnItemCommand="RadListView1_ItemCommand" OnNeedDataSource="RadListView1_NeedDataSource">
<LayoutTemplate>
<fieldset id="FieldSet1" style="border: none; padding: 0px;">
<asp:PlaceHolder ID="ProductsContainer" runat="server"></asp:PlaceHolder>
<div style="clear: both">
</div>
<div style="border-top: dashed 0px #CACACA; padding-top: 30px;">
<div style="float: left; margin-left: 0%;">
<asp:Button runat="server" ID="btnFirst" CommandName="Page" CommandArgument="First"
Text="<<" Enabled="<%#Container.CurrentPageIndex > 0 %>" CssClass="Button_Grid_Pager"></asp:Button>
<asp:Button runat="server" ID="btnPrev" CommandName="Page" CommandArgument="Prev"
Text="<" Enabled="<%#Container.CurrentPageIndex > 0 %>" CssClass="Button_Grid_Pager"></asp:Button>
<span style="vertical-align: middle; line-height: 22px; display: inline-block;"> Page
<%#Container.CurrentPageIndex + 1 %>
of
<%#Container.PageCount %></span>
<asp:Button runat="server" ID="btnNext" CommandName="Page" CommandArgument="Next"
Text=">" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CssClass="Button_Grid_Pager"></asp:Button>
<asp:Button runat="server" ID="btnLast" CommandName="Page" CommandArgument="Last"
Text=">>" Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" CssClass="Button_Grid_Pager"></asp:Button>
</div>
<div style="border: none; padding-top: 2px;">
<span style="vertical-align: middle; font-weight: normal; line-height: 22px; padding-left: 15px;">Items per page: </span>
<telerik:RadComboBox runat="server" ID="cmbPageSize"
OnSelectedIndexChanged="cmbPageSize_SelectedIndexChanged"
AutoPostBack="true" Width="60px" Skin="Default"
SelectedValue="<%#Container.PageSize %>">
<Items>
<telerik:RadComboBoxItem Text="4" Value="4"></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="12" Value="12"></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="36" Value="36"></telerik:RadComboBoxItem>
<telerik:RadComboBoxItem Text="100" Value="100"></telerik:RadComboBoxItem>
 
</Items>
</telerik:RadComboBox>
</div>
</div>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<fieldset class="item">
<asp:Panel ID="ItemContainer" runat="server">
<asp:ImageButton ID="imgbtnProductDetails" runat="server" ImageUrl='<%# "prodimages/" & Eval("ProdRef") & "-1_Grid.jpg"%>'
AlternateText='<%# Eval("ImageAltText") %>' Width="240px"
CommandName="SelectProduct" CommandArgument='<%# Eval("ProductId")%>' Enabled='<%# IIf(Eval("IsVoucher") = True, False, True)%>' />
</asp:Panel>
</fieldset>
</ItemTemplate>
</telerik:RadListView>
Hi I have been able to hide hidden files but i cant seem to get the directories to hide my files code is -
public override DirectoryItem ResolveDirectory(string virtualPath)
{
DirectoryItem basedir = base.ResolveDirectory(virtualPath);
string physicalPath;
physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
if (physicalPath == null)
return null;
DirectoryItem result = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
virtualPath,
virtualPath,
virtualPath,
GetPermissions(physicalPath),
GetFiles(virtualPath),
new DirectoryItem[] { }// Directories are added in ResolveRootDirectoryAsTree method
);
// Update all file items with the additional information (date, owner)
DirectoryItem oldItem = base.ResolveDirectory(physicalPath);
List<FileItem> visibleFiles = new List<FileItem>();
foreach (FileItem fileItem in result.Files)
{
// Get the information from the physical file
FileInfo fInfo = new FileInfo(physicalPath + "\\" + fileItem.Name);
// Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer
// If the name attribute matches the unique name of a grid column
fileItem.Attributes.Add("CreationDate", fInfo.CreationTimeUtc.ToString());
fileItem.Attributes.Add("ModifiedDate", fInfo.LastWriteTime.ToString());
FileAttributes fileattr = File.GetAttributes(physicalPath + "\\" + fileItem.Name);
if((fileattr & FileAttributes.Hidden) != FileAttributes.Hidden)
{
visibleFiles.Add(fileItem);
}
}
DirectoryItem result1 = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
virtualPath,
virtualPath,
virtualPath,
GetPermissions(physicalPath),
visibleFiles.ToArray(),
new DirectoryItem[] { }// Directories are added in ResolveRootDirectoryAsTree method
);
return result1;
}
Which works really well my Directory code is code is - >
public override DirectoryItem ResolveRootDirectoryAsTree(string path)
{
string physicalPath;
string virtualPath = string.Empty;
if (PathHelper.IsSharedPath(path) || PathHelper.IsPhysicalPath(path))
{
physicalPath = path;
foreach (KeyValuePair<string, string> mappedPath in MappedPaths)
{
if (physicalPath.StartsWith(mappedPath.Value, StringComparison.CurrentCultureIgnoreCase))
{
string restOfPhysicalPath = physicalPath.Substring(mappedPath.Value.Length);
virtualPath = mappedPath.Key + restOfPhysicalPath.Replace('\\', '/');
virtualPath = PathHelper.AddEndingSlash(virtualPath, '/');
break;
}
}
}
else
{
virtualPath = PathHelper.AddEndingSlash(path, '/');
physicalPath = this.GetPhysicalFromVirtualPath(path);
if (physicalPath == null)
return null;
}
DirectoryItem result = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
string.Empty,
virtualPath,
string.Empty,
GetPermissions(physicalPath),
new FileItem[] { }, // Files are added in the ResolveDirectory method
GetDirectories(virtualPath)
);
return result;
}
Any help would be much appreciated.
