I have a hierarchal grid with check boxes against all the records (both parent and child), I also have a select all option which selects all the records in parent as well child. I am unable find the inner grid using FindControl method. Do let me know if you have any suggestion.
protected void ToggleSelectedState(object sender, EventArgs e) { if ((sender as CheckBox).Checked) { foreach (GridDataItem dataItem in radGridProgramList.MasterTableView.Items) { (dataItem.FindControl("cbSelect") as CheckBox).Checked = true; dataItem.Selected = true; RadGrid radGridPolicyList = (RadGrid)dataItem.FindControl("radGridPolicyList"); foreach (GridDataItem InnerdataItem in radGridPolicyList.MasterTableView.Items) { (InnerdataItem.FindControl("cbSelect") as CheckBox).Checked = true; InnerdataItem.Selected = true; } } } else { foreach (GridDataItem dataItem in radGridProgramList.MasterTableView.Items) { (dataItem.FindControl("cbSelect") as CheckBox).Checked = false; dataItem.Selected = false; } } }<telerik:RadGrid ID="radGridProgramList" AllowMultiRowSelection="true" runat="server" Width="100%" Height="476px" ShowStatusBar="true" AutoGenerateColumns="False" PageSize="15" AllowSorting="True" AllowPaging="True" OnItemCommand="RadGrid_ItemCommand" OnNeedDataSource="RadGrid_NeedDataSource" OnPreRender="RadGridClientList_PreRender" GridLines="Vertical"> <ClientSettings AllowExpandCollapse = "true" EnableRowHoverStyle="true"> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> <Selecting AllowRowSelect="false" /> </ClientSettings> <PagerStyle Mode="NumericPages"></PagerStyle> <MasterTableView ClientDataKeyNames="ProgramId" Name="Programs" Width="100%" GridLines="Vertical" NoMasterRecordsText="" ShowHeadersWhenNoRecords="false"> <Columns> <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"> <HeaderTemplate> <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox> </HeaderTemplate> <ItemTemplate> <asp:CheckBox id="cbSelect" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="ProgramId" HeaderText="Program ID" DataField="ProgramId" UniqueName="ProgramId" Visible="false" /> <telerik:GridTemplateColumn UniqueName="ProgramName" HeaderText="Program Name" DataField="ProgramName" HeaderStyle-Width="280px"> <ItemTemplate> <asp:Label ID="lblProgramName" runat="server" Text='<%#(Eval("ProgramName").ToString().Length >39)?Eval("ProgramName").ToString().Substring(0, 39) + "...":Eval("ProgramName") %>' /> <telerik:RadToolTip ID="ProgramNameToolTip" runat="server" TargetControlID="lblProgramName" Width="150px" RelativeTo="Element" Position="MiddleRight" EnableShadow="true"><%# Eval("ProgramName") %></telerik:RadToolTip> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="ProgramEffectiveDate" AllowSorting = "false" HeaderText="Eff. Date" DataField="ProgramEffDate" DataFormatString="{0:MM/dd/yyyy}" /> <telerik:GridBoundColumn SortExpression="ProgramExpiryDate" AllowSorting = "false" HeaderText="Exp. Date" DataField="ProgramExpDate" DataFormatString="{0:MM/dd/yyyy}" /> <telerik:GridBoundColumn SortExpression="FSGOfficeName" AllowSorting = "false" HeaderText="FSG Office" DataField="FSGOfficeName" /> <telerik:GridBoundColumn SortExpression="FSGProgramTeamName" AllowSorting = "false" HeaderText="FSG Team" DataField="FSGTeamName" /> <telerik:GridTemplateColumn Reorderable="false" Resizable="false"> <HeaderStyle Width="20px" /> <ItemStyle Width="20px" HorizontalAlign="Center" /> </telerik:GridTemplateColumn> </Columns> <NestedViewTemplate> <div class="programBackground"> <telerik:RadGrid ID="radGridPolicyList" AllowMultiRowSelection="true" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid_NeedDataSource" OnItemCommand="RadGrid_ItemCommand"> <ClientSettings AllowExpandCollapse = "true" EnableRowHoverStyle="true"> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> <Selecting AllowRowSelect="false" /> </ClientSettings> <MasterTableView ClientDataKeyNames="PolicyId" Name="Policies" Width="100%" GridLines="Vertical" NoMasterRecordsText="" ShowHeadersWhenNoRecords="false"> <Columns> <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"> <ItemTemplate> <asp:CheckBox id="cbSelect" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="PolicyId" HeaderText="PolicyId" DataField="PolicyId" UniqueName="PolicyId" Visible="false" /> <telerik:GridBoundColumn SortExpression="PolicyNumber" HeaderText="Policy Number" DataField="PolicyNumber" /> <telerik:GridBoundColumn SortExpression="PolicyEffectiveDate" HeaderText="Policy Eff. Date" DataField="PolicyEffectiveDate" /> <telerik:GridBoundColumn SortExpression="PolicyExpiryDate" HeaderText="Policy Exp. Date" DataField="PolicyExpiryDate" /> <telerik:GridTemplateColumn Reorderable="false" Resizable="false"> <HeaderStyle Width="20px" /> <ItemStyle Width="20px" HorizontalAlign="Center" /> </telerik:GridTemplateColumn> </Columns> <NoRecordsTemplate>The Program doesn't have Policies</NoRecordsTemplate> </MasterTableView> <ClientSettings AllowKeyboardNavigation = "true" > <Scrolling AllowScroll="true" UseStaticHeaders="true" /> <Selecting AllowRowSelect="True"></Selecting> </ClientSettings> </telerik:RadGrid> </div> </NestedViewTemplate> <NoRecordsTemplate>There are no clients</NoRecordsTemplate> </MasterTableView> <ClientSettings AllowKeyboardNavigation = "true" > <Scrolling AllowScroll="true" UseStaticHeaders="true" /> <Selecting AllowRowSelect="True"></Selecting> </ClientSettings> </telerik:RadGrid><telerik:RadGrid ID="RadGrid1" runat="server"> <MasterTableView> <NestedViewTemplate> <asp:Panel ID="Panel1" runat="server"> <telerik:RadTabStrip ID="RadTabStrip1" runat="server"> <Tabs> <telerik:RadTab runat="server" Text="RadTab1" PageViewID="RadPageView1"></telerik:RadTab> <telerik:RadTab runat="server" Text="RadTab2" PageViewID="RadPageView2"></telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" runat="server"> <telerik:RadPageView ID="RadPageView1" runat="server"> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView2" runat="server"> <asp:Label ID="Label13" runat="server" Text='<%# Eval("LokationID") %>' Visible="false" /> <asp:FormView ID="FormView1" runat="server" DataSourceID="sdsFile" DataKeyNames="FileID" DefaultMode="Insert" oniteminserting="FormView1_ItemInserting"> <InsertItemTemplate> <table> <tr> <td> <asp:Label ID="Label1" runat="server"> File: (max 1,5GB) </asp:Label> </td> <td> <asp:FileUpload ID="FileUpload1" runat="server" Enabled='<%# Bind("FileDocument") %>' /> </td> </tr> <tr> <td> <asp:Label ID="Label2" runat="server"> Remarks: </asp:Label> </td> <td> <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Bind("FileRemarks") %>' TextMode="MultiLine"> </telerik:RadTextBox> </td> </tr> <tr> <td colspan="2"> <asp:ImageButton ID="ibtnInsert" runat="server" CommandName="Insert" /> <asp:ImageButton ID="ibtnAbort" runat="server" onclick="ibtnAbort_Click" /> </td> </tr> </table> </InsertItemTemplate> </asp:FormView> <asp:SqlDataSource ID="sdsFile" runat="server" ConnectionString="<%$ ConnectionStrings:AppendoConnStr03 %>" SelectCommand="SELECT FileID, LokationID, FileDocument, FileName, FileExtension, FileMIMEType, FileRemarks FROM Files" InsertCommand="INSERT INTO Files(LokationID, FileDocument, FileName, FileExtension, FileMIMEType, FileRemarks) VALUES (@LokationID, @FileDocument, @FileName, @FileExtension, @FileMIMEType, @FileRemarks)">
<InsertParameters> <asp:ControlParameter ControlID="Label13" PropertyName="Text" Type="Int32" Name="LokationID" /> <asp:Parameter Name="FileDocument" /> <asp:Parameter Name="FileName" /> <asp:Parameter Name="FileExtension" /> <asp:Parameter Name="FileMIMEType" /> <asp:Parameter Name="FileRemarks" /> </InsertParameters> </asp:SqlDataSource> </telerik:RadPageView> </telerik:RadMultiPage> </asp:Panel> </NestedViewTemplate> </MasterTableView> </telerik:RadGrid>protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e) { FileUpload fileUpload = (FileUpload)FormView1.FindControl("FileUpload1"); if (fileUpload.HasFile) { e.Values["FileName"] = fileUpload.FileName; e.Values["FileExtension"] = Path.GetExtension(fileUpload.PostedFile.FileName).ToLower(); e.Values["FileMIMEType"] = fileUpload.PostedFile.ContentType; e.Values["FileDocument"] = fileUpload.FileBytes; } else { e.Values["FileName"] = null; e.Values["FileExtension"] = null; e.Values["FileMIMEType"] = null; e.Values["FileDocument"] = System.Data.SqlTypes.SqlBinary.Null; } }<link href="../_UpgradeReport_Files/Menu.Default.css" rel="Stylesheet" type="text/css" /> <link href="../_UpgradeReport_Files/Menustyle.css" rel="Stylesheet" type="text/css" /> <style type="text/css"> .CustomItem { background:#FFA07A; text-decoration:none; } .CustomItem:hover { background:#FFA07A; text-decoration:none; } .style1 { height: 114px; } </style> <style type="text/css"> .WrappingItem1 { background-color:#ffffff; color:#ffffff !important; width:1px; height:1px; } .WrappingItem { background-color:#4682B4; color: #ffffff; text-align:left; /*margin:0px;*/ /*padding-right :100px; padding-left:150px; /* white-space: normal;*/ } .WrappingItem:hover { border:#811D06; color:#000000 !important; background-color:#EFCDA9 !important;--%> } .WrappingItem.horizontal .separator { width:0px; height:0px; } .RedItem { background-color: #FF9900 !important; color: #ffffff; } .RedItem:hover { background-color: #FF9900 !important; color: #ffffff; } </style> <telerik:RadMenu ID="radMenuHMO" runat="server" Width="100%" Height="25px" CssClass="RadMenu_Green" Skin="Outlook" Flow="Horizontal"> <Items> <telerik:RadMenuItem Text="Master" AccessKey="M" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem Text="Currency Master" NavigateUrl="~/CMS/CurrencyMaster.aspx" CssClass="WrappingItem1" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem Text="Insurance" AccessKey="I" Width="6%" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem Text="ICD Codes" NavigateUrl="~/CMS/ICDCodesMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem Text="Relation" NavigateUrl="~/CMS/RelationMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ Hospital Menu*************************--%> <telerik:RadMenuItem Text="Benefit Provider" AccessKey="B" Width="9%" style="text-align:center" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem Text="Hospital Master" NavigateUrl="~/CMS/HospitalMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem Text="Hospital Contract" NavigateUrl="~/CMS/HospitalContractsMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ Policy Menu*************************--%> <telerik:RadMenuItem Text="Policy Admin" AccessKey="P" width="8%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem Text="Group Master" NavigateUrl="~/CMS/GroupDetailsMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem AccessKey="A" Text="Approval" Width="5.5%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="Approval Request" NavigateUrl="~/CMS/ApprovalRequestMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="Approval Status Report" NavigateUrl="~/Reports/ApprovalRequestStatus.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem AccessKey="U" Text="Customer Service" Width="9.5%" style="text-align:center" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem runat="server" Text="Member System Info" NavigateUrl="~/CMS/MemberSystemInfoApproval.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem AccessKey="C" Text="Claims" Width="5%" style="text-align:left" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem runat="server" Text="Claim Batch" NavigateUrl="~/CMS/ClaimsBatch.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"></telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="Claims Status Report" NavigateUrl="~/Reports/ClaimsStatusReport.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ Rate Module *************************--%> <telerik:RadMenuItem AccessKey="U" Text="Rate Module" Width="6.5%" style="text-align:center" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem runat="server" Text="Tarrif Module" NavigateUrl="~/CMS/QuotationsReport.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="Rating Report" NavigateUrl="~/Reports/Rating.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ Application *************************--%> <telerik:RadMenuItem AccessKey="U" Text="Application" Width="6%" style="text-align:center" ExpandedCssClass="RadMenu_Green"> <Items> <telerik:RadMenuItem runat="server" Text="Application Form Details" NavigateUrl="~/CMS/ApplicationFormDetails.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="Application Decision" NavigateUrl="~/CMS/ApplicationStatus.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem runat="server" AccessKey="R" Text="ReInsurance" Width="6%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="ReInsurance Master" NavigateUrl="~/RCMS/ReInsuranceMaster.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff" > </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem runat="server" AccessKey="R" Text="Reports" Width="5%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="Computation of Premium" NavigateUrl="~/Reports/PremiumComputation.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff" > </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <telerik:RadMenuItem runat="server" AccessKey="T" Text="SAMA Reports" Width="6%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="Policy Data Report" NavigateUrl="~/Reports/PolicyData.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ CCHI Reports Menu*************************--%> <telerik:RadMenuItem runat="server" AccessKey="C" Text="Compliance Reports" Width="7%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="CCHI Members Upload Report" NavigateUrl="~/Reports/CCHIMembersUpload.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="CCHI Policy Report" NavigateUrl="~/Reports/CCHIReport.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> <telerik:RadMenuItem runat="server" Text="CCHI Beneficary Report" NavigateUrl="~/Reports/NewCCHIBeneficaryReport.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> </Items> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" IsSeparator="True" Text="|" /> <%-- ************************ Downloads Menu*************************--%> <telerik:RadMenuItem runat="server" AccessKey="D" Text="Downloads" Width="5%" style="text-align:center" ExpandedCssClass="RadMenu_Green" > <Items> <telerik:RadMenuItem runat="server" Text="Import Templates" NavigateUrl="~/CMS/DataImportTemplates.aspx" CssClass="WrappingItem" BackColor="#4682B4" ForeColor="#ffffff"> </telerik:RadMenuItem> <telerik:RadMenuItem runat="server" CssClass="WrappingItem1" IsSeparator="True" /> </Items> </telerik:RadMenuItem> </Items> </telerik:RadMenu>Hello EveryBody,
in my Project i used Rad menu control. i have so many menus. when I put all menus if the name is Lengthy it is overlapping with the next one . can you Please help me how to solve this problem.
thanks in advance.
I am using 2 RadButtons to search for a (Host or Victim) student then load 2 Radgrids via ajax.
I am pre populating the search criteria txtFirstName with "Cor" and txtLastName with "A".
This returns 5 rows from my DB.
When the Radgrids bind the ajax fires correctly and I can compare the 2 Students below.
In the Other radgrids that hold additional information.
If I change my search criteria to something else that will return more rows to the RadGrid.
The ajax is only firing for the first 5 rows.
If I swap out my 2 search RadButtons with regular ASP:Buttons and fire a post back to bind the 2 SearchRadGrids then all the rows are able to fire the ajax correctly.
any help is appreciated? Thanks
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnHostSearch"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="hostSearchGrid" LoadingPanelID="hostSearchLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="btnVictimSearch"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="victimSearchGrid" LoadingPanelID="victimSearchLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="hostSearchGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="hostStudentInfoGrid" LoadingPanelID="hostStudentInfoLoadingPanel" /> <telerik:AjaxUpdatedControl ControlID="hostSchoolInfoGrid" LoadingPanelID="hostSchoolInfoLoadingPanel" /> <telerik:AjaxUpdatedControl ControlID="hostAdmissionInfoGrid" LoadingPanelID="hostAdmissionInfoLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="victimSearchGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="victimStudentInfoGrid" LoadingPanelID="victimStudentInfoLoadingPanel" /> <telerik:AjaxUpdatedControl ControlID="victimSchoolInfoGrid" LoadingPanelID="victimSchoolInfoLoadingPanel" /> <telerik:AjaxUpdatedControl ControlID="victimAdmissionInfoGrid" LoadingPanelID="victimAdmissionInfoLoadingPanel" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <%--Loading Panels--%> <telerik:RadAjaxLoadingPanel ID="hostSearchLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="victimSearchLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="hostStudentInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="hostSchoolInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="hostAdmissionInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="victimStudentInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="victimSchoolInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="victimAdmissionInfoLoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="Buttons"> </telerik:RadFormDecorator> <br /> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <asp:Label Text="First Name:" runat="server"></asp:Label> <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox> <asp:Label ID="Label1" Text="Last Name:" runat="server"></asp:Label> <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox> <telerik:RadButton ID="btnHostSearch" runat="server" OnClick="btnHostSearch_Click" Font-Underline="false" Text="Search for Host"> <Icon PrimaryIconCssClass="rbSearch" PrimaryIconLeft="4" PrimaryIconTop="4" /> </telerik:RadButton> <telerik:RadButton ID="btnVictimSearch" runat="server" OnClick="btnVictimSearch_Click" Font-Underline="false" Text="Search for Victim"> <Icon PrimaryIconCssClass="rbSearch" PrimaryIconLeft="4" PrimaryIconTop="4" /> </telerik:RadButton> </telerik:RadAjaxPanel> <br /> <h5><%--Host Students--%></h5> <hr /> <telerik:RadGrid ID="hostSearchGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" AllowSorting="false" GridLines="None" OnItemCommand="hostSearchGrid_Click_ItemCommand" OnNeedDataSource="hostSearchGrid_NeedDataSource"> <MasterTableView AutoGenerateColumns="true" DataKeyNames="StudentID"> <Columns> <telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="Select"> <ItemStyle HorizontalAlign="Center" /> <ItemTemplate> <asp:ImageButton ID="ibtnAddToCart" CommandName="Compare" runat="server" Height=25px Width=25px ImageUrl="~/_Images/circle-up.png" AlternateText="Select" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadGrid ID="victimSearchGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" AllowSorting="false" GridLines="None" OnItemCommand="victimSearchGrid_Click_ItemCommand" OnNeedDataSource="victimSearchGrid_NeedDataSource"> <MasterTableView AutoGenerateColumns="true" DataKeyNames="StudentID"> <Columns> <telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="Select" AllowFiltering="false"> <ItemStyle HorizontalAlign="Center" /> <ItemTemplate> <asp:ImageButton ID="ibtnAddToCart" runat="server" Height=25px Width=25px ImageUrl="~/_Images/circle-up.png" AlternateText="Select" CommandName="Compare"/> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> <br /> <br /> <h5><%--Host Students--%></h5> <hr /> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Outlook" MultiPageID="RadMultiPage1" SelectedIndex="0" CssClass="tabStrip"> <Tabs> <telerik:RadTab Text="Student Information"> </telerik:RadTab> <telerik:RadTab Text="School Information"> </telerik:RadTab> <telerik:RadTab Text="Admission Information"> </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage"> <telerik:RadPageView ID="RadPageView1" runat="server"> <telerik:RadGrid ID="hostStudentInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadGrid ID="victimStudentInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView2" runat="server" CssClass="pageViewEducation"> <telerik:RadGrid ID="hostSchoolInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadGrid ID="victimSchoolInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPageView> <telerik:RadPageView ID="RadPageView3" runat="server"> <telerik:RadGrid ID="hostAdmissionInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadGrid ID="victimAdmissionInfoGrid" runat="server" AllowFilteringByColumn="false" AllowPaging="false" ShowFooter="true" AllowSorting="false" GridLines="None" PageSize="5"> <MasterTableView AutoGenerateColumns="True" DataKeyNames="StudentName"> <NoRecordsTemplate> No Records Found. </NoRecordsTemplate> <Columns> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPageView> </telerik:RadMultiPage>
'General Controls
Protected txtFirstName, txtLastName As TextBox
Protected RadAjaxManager1 As RadAjaxManager
Protected WithEvents btnHostSearch, btnVictimSearch As RadButton
Protected WithEvents Button1 As Button
Protected WithEvents hostStudentInfoLoadingPanel, hostSchoolInfoLoadingPanel, hostAdmissionInfoLoadingPanel As RadAjaxLoadingPanel
' Host Grids
Protected WithEvents hostSearchGrid, hostStudentInfoGrid, hostSchoolInfoGrid, hostAdmissionInfoGrid As RadGrid
'Victim Grids
Protected WithEvents victimSearchGrid, victimStudentInfoGrid, victimSchoolInfoGrid, victimAdmissionInfoGrid As RadGrid
Public Property HostStudentsData() As DataTable
Get
Dim obj As Object = Me.Session("HostStudentsData")
If obj IsNot Nothing Then
Return DirectCast(obj, DataTable)
End If
Dim _hostStudentData As New DataTable()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
_hostStudentData = studentMerge.GetStudentInfo(txtLastName.Text + "%", txtFirstName.Text + "%", CurrentContext.WorkingSchool.DistrictId)
Me.Session("HostStudentsData") = _hostStudentData
Return _hostStudentData
End Get
Set(value As DataTable)
Me.Session("HostStudentsData") = value
End Set
End Property
Public Property VictimStudentsData() As DataTable
Get
Dim obj As Object = Me.Session("VictimStudentsData")
If obj IsNot Nothing Then
Return DirectCast(obj, DataTable)
End If
Dim _victimStudentData As New DataTable()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
_victimStudentData = studentMerge.GetStudentInfo(txtLastName.Text + "%", txtFirstName.Text + "%", CurrentContext.WorkingSchool.DistrictId)
Me.Session("VictimStudentsData") = _victimStudentData
Return _victimStudentData
End Get
Set(value As DataTable)
Me.Session("VictimStudentsData") = value
End Set
End Property
Protected Sub btnHostSearch_Click(sender As Object, e As EventArgs) Handles Button1.Click
HostStudentsData = Nothing
hostSearchGrid.Visible = True
Dim dt As DataTable = HostStudentsData
dt.AcceptChanges()
hostSearchGrid.DataSource = dt
hostSearchGrid.DataBind()
End Sub
Protected Sub btnVictimSearch_Click(sender As Object, e As EventArgs)
VictimStudentsData = Nothing
victimSearchGrid.Visible = True
victimSearchGrid.DataSource = VictimStudentsData
victimSearchGrid.DataBind()
End Sub
Protected Sub hostSearchGrid_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
Dim HostSearchStudents As DataTable = HostStudentsData
hostSearchGrid.DataSource = HostSearchStudents
End Sub
Protected Sub victimSearchGrid_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
Dim VictimSearchStudents As DataTable = VictimStudentsData
victimSearchGrid.DataSource = VictimSearchStudents
End Sub
Protected Sub hostSearchGrid_Click_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
If e.CommandName = "Compare" Then
Dim itemValues As IDictionary = New Dictionary(Of Object, Object)()
hostSearchGrid.Rebind()
Dim item As GridDataItem = DirectCast(e.Item, Global.Telerik.Web.UI.GridDataItem)
itemValues("StudentID") = item.OwnerTableView.DataKeyValues(item.ItemIndex)("StudentID").ToString()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
Dim studentId As Guid = New Guid(itemValues("StudentID").ToString)
Dim studentDS As DataSet = studentMerge.GetStudentInfoById(studentId, CurrentContext.WorkingSchool.DistrictId)
BindHostInformation(studentDS)
End If
End Sub
Protected Sub victimSearchGrid_Click_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
If e.CommandName = "Compare" Then
Dim itemValues As IDictionary = New Dictionary(Of Object, Object)()
victimSearchGrid.Rebind()
Dim item As GridDataItem = DirectCast(e.Item, Global.Telerik.Web.UI.GridDataItem)
itemValues("StudentID") = item.OwnerTableView.DataKeyValues(item.ItemIndex)("StudentID").ToString()
Dim studentMerge As New MCOECN.DASL.BusinessLogic.SIS.StudentMerge.Merge()
Dim studentId As Guid = New Guid(itemValues("StudentID").ToString)
Dim studentDS As DataSet = studentMerge.GetStudentInfoById(studentId, CurrentContext.WorkingSchool.DistrictId)
BindVictimInformation(studentDS)
End If
End Sub
Private Sub BindHostInformation(ByVal hostStudentDS As DataSet)
hostStudentInfoGrid.DataSource = hostStudentDS.Tables(0)
hostSchoolInfoGrid.DataSource = hostStudentDS.Tables(1)
hostAdmissionInfoGrid.DataSource = hostStudentDS.Tables(2)
hostStudentInfoGrid.DataBind()
hostSchoolInfoGrid.DataBind()
hostAdmissionInfoGrid.DataBind()
End Sub
Private Sub BindVictimInformation(ByVal victimStudentDS As DataSet)
victimStudentInfoGrid.DataSource = victimStudentDS.Tables(0)
victimSchoolInfoGrid.DataSource = victimStudentDS.Tables(1)
victimAdmissionInfoGrid.DataSource = victimStudentDS.Tables(2)
victimStudentInfoGrid.DataBind()
victimSchoolInfoGrid.DataBind()
victimAdmissionInfoGrid.DataBind()
End Sub
Private Sub Page_Load1(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
txtFirstName.Text = "Cor"
txtLastName.Text = "A"
End If
End Sub
Protected Sub lvMissionSubTasks_ItemDeleting(sender As Object, e As Telerik.Web.UI.RadListViewCommandEventArgs) Handles lvMissionSubTasks.ItemDeleting
If TypeOf e.ListViewItem Is RadListViewItem Then
Dim lbl As Label = TryCast(e.ListViewItem.FindControl("lblItemID"), Label)
Dim de As New LaunchChecklist.BUS.Items
de.Delete(
CInt(lbl.Text))
'lvMissionSubTasks.DataBind()
Dim lv As RadListView = DirectCast(e.ListViewItem.FindControl("lvMissionLevel3SubTasks"), RadListView)
lv.DataBind()
End If
End Sub