or
<telerik:RadGrid ID="rgd_UserJobRoles" runat="server" DataSourceID="sds_UserJobRoles" GridLines="None" Width="245px"> <clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> <Selecting AllowRowSelect="true" /> </clientsettings> <MasterTableView DataKeyNames="DbRole" AutoGenerateColumns="False" DataSourceID="sds_UserJobRoles"> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="DbRole" HeaderText="Job Roles" SortExpression="DbRole" UniqueName="DbRole"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadGrid ID="rgd_UserTaskRoles" runat="server" DataSourceID="sds_UserTaskRoles" GridLines="None" Width="245px"> <MasterTableView AutoGenerateColumns="False" DataSourceID="sds_UserTaskRoles"> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" SortExpression="UserName" UniqueName="UserName" Visible="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="RoleName" HeaderText="Task Roles" SortExpression="RoleName" UniqueName="RoleName" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="sds_UserJobRoles" runat="server" ConnectionString="<%$ ConnectionStrings:AeriesAdmin_ConnectionString %>" SelectCommand="SELECT [MemberName], [DbName], [DbRole] FROM [Aeries_RoleMembers] WHERE (([DbName] = @DbName) AND ([MemberName] = @UserName)) AND [DbRole] LIKE '%jr_%'"> <SelectParameters> <asp:ControlParameter ControlID="rcb_Database" Name="DbName" PropertyName="SelectedValue" Type="String" /> <asp:ControlParameter ControlID="rcb_Users" Name="UserName" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="sds_UserTaskRoles" runat="server" ConnectionString="<%$ ConnectionStrings:AeriesAdmin_ConnectionString %>" SelectCommand="SELECT DISTINCT [UserName], [RoleName] FROM [vw_AA_Users] WHERE ([UserName] = @DbRole)"> <SelectParameters> <asp:ControlParameter ControlID="rgd_UserJobRoles" Name="DbRole" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <ajaxsettings> <telerik:AjaxSetting AjaxControlID="rgd_UserJobRoles"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgd_UserJobRoles" /> <telerik:AjaxUpdatedControl ControlID="rgd_UserTaskRoles" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rgd_UserTaskRoles"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgd_UserTaskRoles" /> </UpdatedControls> </telerik:AjaxSetting> </ajaxsettings> </telerik:RadAjaxManager>Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If rgd_UserJobRoles.SelectedIndexes.Count = 0 AndAlso rgd_UserTaskRoles.SelectedIndexes.Count = 0 Then rgd_UserJobRoles.SelectedIndexes.Add(0) rgd_UserTaskRoles.SelectedIndexes.Add(0) End IfEnd SubHi
How can I restrict the user to select only a docx file for upload and to catch it if it’s not?
Thanks
Regards
function ClientNodeDragStart(sender, eventArgs) { $(".someTrigger,.someOtherTrigger").each(function () { $(this).original_show = $(this).data("tooltip").show; $(this).data("tooltip").show = function () { }; }); }foreach (GridDataItem item in RadGrid1.EditItems) { str = ""; if (item["Users"].Text != null) { strID = item["ID"].Text; StrLicenseType = item["AppliedFor"].Text; UnderLicenseeID = item["UnderLi"].Text; msg = item["LiName"].Text; RadGrid2.Visible = false; }<TimeSlotContextMenus> <tel:RadSchedulerContextMenu ID="TimeSlotContextMenu" runat="server" > <Items> <tel:RadMenuItem Text="Assign Employee" Value="NoClick" /> </Items> </tel:RadSchedulerContextMenu></TimeSlotContextMenus>private void CreateTimeSlotMenu() { RadMenuItem menu = TimeSlotContextMenu.Items.FindItemByText("Assign Employee"); menu.Items.Clear(); DataTable dtValidEmps = DAL.GetEmployeesForCalendar(_accountID, _locationID); foreach (DataRow dr in dtValidEmps.Rows) { menu.Items.Add(new RadMenuItem() {Text = (string)dr["EmployeeName"], Value = string.Format("AssignEmp{0}",dr["EmployeeID"])}); }}hi,
I have Grid with 1 DetailTable, and there are static columns with GridButtonColumns, clicking which should open new page with parameter.
The call to popup page is in code behind:
if (e.CommandName == "History") { popupScript = "<script language='javascript'>" + "window.open('History.aspx?code=" + codeStr + "'," + "'_blank', 'scrollbars=yes, resizable=yes,status=yes," + "location=yes, toolbar=yes, menubar=yes,top = 0, left = 0, target='_self')" + "</script>"; ClientScript.RegisterStartupScript(cstype, "History", popupScript); //Page.RegisterStartupScript("???????", popupScript); }In debug mode, I put breakpoint in - ClientScript.RegisterStartupScript(cstype,"History", popupScript);
It reaches there, but the page is not poped up. What I am doing wrong ?
Here is aspx code:
<div>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<!-- content start -->
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RBL_UType">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="panelTest_DIV" />
<telerik:AjaxUpdatedControl ControlID="RadSplitter1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RBtn_Search">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadSplitter1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RG_SearchResult">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RG_SearchResult" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
</telerik:RadAjaxLoadingPanel>
<!-- content end -->
<asp:RadioButtonList ID="RBL_UType" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
AutoPostBack="True">
<asp:ListItem Value="0">??????????</asp:ListItem>
<asp:ListItem Value="1">???????????</asp:ListItem>
</asp:RadioButtonList>
<br />
<div id="panelTest_DIV" title="?????? ?? ???????? ??? ???" runat="server">
<asp:Panel ID="panelTest" runat="server">
<table>
<tr>
<td>
<asp:Label ID="LBL_Surname" runat="server" Text="???????:" Visible="false"></asp:Label>
</td>
<td>
<asp:TextBox ID="TB_Surname" runat="server" Visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="LBL_Name" runat="server" Text="???:" Visible="false"></asp:Label>
</td>
<td>
<asp:TextBox ID="TB_Name" runat="server" Visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<telerik:RadButton runat="server" ID="RBtn_Search" OnClick="RB_Search_Click" Text="?????"
Visible="false" Skin="Telerik">
</telerik:RadButton>
</td>
</tr>
</table>
</asp:Panel>
</div>
<br />
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%"
Style="margin-top: 0px" Height="100%">
<telerik:RadPane ID="RadPane1" runat="server" Width="100%" Visible="false">
<telerik:RadGrid ID="RG_SearchResult" runat="server" OnItemDataBound="RG_SearchResult_ItemDataBound"
OnNeedDataSource="RG_SearchResult_NeedDataSource" OnDetailTableDataBind="RG_SearchResult_DetailTableDataBind"
OnItemCommand="RG_SearchResult_ItemCommand" DataSourcePersistenceMode="NoPersistence"
HeaderStyle-Font-Bold="true" Width="100%" PageSize="1000" PagerStyle-AlwaysVisible="true"
ShowStatusBar="True" Visible="false" AllowPaging="false" Skin="Telerik">
<MasterTableView Name="Level1" DataKeyNames="ID">
<Columns>
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false" />
</Columns>
<DetailTables>
<telerik:GridTableView Name="Level2" DataKeyNames="ID" HierarchyLoadMode="ServerOnDemand"
Width="100%" BackColor="#EFEFFB">
<Columns>
<telerik:GridButtonColumn CommandName="RollInfo" Text="???????" UniqueName="RollInfo" />
<telerik:GridButtonColumn CommandName="History" Text="???????" UniqueName="History" />
<telerik:GridButtonColumn CommandName="TechSpec" Text="???. ?????????" UniqueName="TechSpec" />
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false" />
<telerik:GridBoundColumn DataField="PropCode" HeaderText="???" UniqueName="PropCode" />
<telerik:GridBoundColumn DataField="PropAddr" HeaderText="?????" UniqueName="PropAddr" />
<telerik:GridBoundColumn DataField="Owner" HeaderText="???" UniqueName="Owner" />
</Columns>
<PagerStyle AlwaysVisible="True"></PagerStyle>
</telerik:GridTableView>
</DetailTables>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<PagerStyle AlwaysVisible="True"></PagerStyle>
</MasterTableView><HeaderStyle Font-Bold="True"></HeaderStyle>
<PagerStyle AlwaysVisible="True"></PagerStyle>
</telerik:RadGrid></telerik:RadPane>
</telerik:RadSplitter>
</div>
void Application_BeginRequest(object sender, EventArgs e) { // URLRewrtingEnabled string ue = ""; try { ue = System.Configuration.ConfigurationManager.AppSettings["URLRewrtingEnabled"].ToString(); } catch (Exception ex) { ue = ""; } if (ue.ToLower() == "true") { string fullOrigionalpath = Request.Url.ToString(); DataAccessLayer Dal = new DataAccessLayer(); Activity act = new Activity(); string st, sv, sn, dp, sn2; st = Dal.GetDefautURL(); // Site name sn = Request.ServerVariables["SERVER_NAME"].ToString(); // Server name string ds = Dal.getDestinationURL(sn, st, fullOrigionalpath); if (ds != "") { try { Context.RewritePath(ds); } catch (Exception ex) { Dal.ErrorLog(ex.Message, "URL Rewrite"); } } }