or
<br /> <style type="text/css"> .rsTimelineView .rsAllDayRow { height:32px !important; } .rsContentScrollArea { /*overflow-x: scroll;*/ } .rhs table tbody tr td iframe { z-index: 9000000!important; } .rsAllDayTable ,.rsHorizontalHeaderTable { width:100%!Important; } .RadScheduler, .rsHeader { /*Z-index:0!important;*/ } .rsHeader { /*z-index:1; */ /*z-index:0!Important; */ } .rsContent { position:relative; /*top:-8px;*/ top:0px; /*z-index:-1!important;*/ } .rsAptRecurrenceException { display:none!important; } .ms-inputuserfield { border-style:solid; border-color:Gray; border-width:1px; } /*.rsAptOut*/ .overrideRsAptOut { width: inherit !important; } .placeholder { /*border-color:Teal; border-width:1px; border-style:solid;*/ } .clear { float:none; clear: both; } .lhs { position:relative; float:left; width: 150px; } .rhs { position:relative; float:left; width:300px; margin-right:10px; margin-left:5px; } #divResourcePicker { padding-top:10px!important; } #divDisplayMissingResources, .errors { padding-top:10px; color:Red; } #divDisplayAvailability { margin:0px auto 0px auto; padding-top:10px; } #divGetAvailability, #divDisplayMissingResources, #divDisplayAvailability { position:relative; top:40px; } </style> <script type="text/javascript" src="~/_layouts/Amp.AvailabilityViewer.SharePoint/jquery-1.6.2.min.js"></script> <script type="text/javascript"> </script> <div id="divWebPartContainer" > <div id= "divStartDateTime"> <div class="lhs placeholder"> Start Date & Time </div> <div class="rhs placeholder"> <SharePoint:DateTimeControl ID="dtcStartingDateTime" runat="server" /> </div> </div> <div class="clear"></div> <div id= "divResourcePicker"> <div class="lhs placeholder"> Names</div> <div class="rhs placeholder" style="height:26px;"> <SharePoint:PeopleEditor id="peopleEditor" runat="server" IsValid="true" AllowEmpty="true" Height="20px" Width="290px" AllowTypeIn="true" MultiSelect="true" /> </div> </div> <div class="clear"></div> <div id= "divGetAvailability"> <div class="lhs placeholder"> <asp:Button ID="btnCheckAvailability" runat="server" Text="Check Availability" onclick="btnCheckAvailability_Click" /> </div> <div class="rhs placeholder"> </div> </div> <div class="clear"></div> <asp:Panel ID="pnlDisplayMissingResources" runat="server" visible="false"> <div id= "divDisplayMissingResources"> <div class="lhs placeholder"></div> <div class="rhs placeholder"> <asp:Literal ID="litInaccableCalendars" runat="server" ></asp:Literal></div> </div> </asp:Panel> <div class="clear"></div> <div id= "divDisplayAvailability" class="placeholder"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <div class="lhs placeholder"></div> <div class="rhs placeholder"><asp:Label ID="RadSchedulerError" runat="server" Text="" Visible="false" CssClass="errors"></asp:Label></div> <div class="clear"></div> <telerik:RadScheduler ID="RadScheduler1" runat="server" AllowEdit="false" AllowInsert="false" ShowViewTabs="false" OnAppointmentCreated="RadScheduler1_AppointmentCreated" ShowNavigationPane="true" EnableExactTimeRendering="true" OnNavigationCommand = "RadScheduler1_NavigationCommand" EnableDatePicker="false" visible="true" > <AdvancedForm Modal="true" /> <TimelineView GroupingDirection="Vertical" /> <MonthView UserSelectable="false" /> <DayView UserSelectable="false" /> <WeekView UserSelectable="false" /> </telerik:RadScheduler> </ContentTemplate> </asp:UpdatePanel> </div> <br /> </divprivate void initialiseSchedulerUI() { RadScheduler1.SelectedView = Telerik.Web.UI.SchedulerViewType.TimelineView; RadScheduler1.DayStartTime= TimeSpan.Parse("08:00:00") ; RadScheduler1.DayEndTime=TimeSpan.Parse("19:00:00") ; RadScheduler1.Skin= "Office2007" ; RadScheduler1.TimelineView.UserSelectable = false; RadScheduler1.TimelineView.GroupBy = "User"; RadScheduler1.TimelineView.ShowInsertArea = false; //Timescales scale = Timescales.Hours; //RadScheduler1.TimelineView.ShowTimescale(scale); RadScheduler1.DataKeyField = "ID"; RadScheduler1.DataStartField = "Start"; RadScheduler1.DataDescriptionField = "Subject"; RadScheduler1.DataEndField = "End"; RadScheduler1.DataSubjectField = "Subject"; RadScheduler1.DataRecurrenceField = "RecurrenceRule"; RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID"; //RadScheduler1.OverflowBehavior="Expand" ; RadScheduler1.TimelineView.SlotDuration = TimeSpan.Parse("00:15:00"); RadScheduler1.TimelineView.TimeLabelSpan = 4; RadScheduler1.TimelineView.ColumnHeaderDateFormat = "h tt"; RadScheduler1.TimelineView.NumberOfSlots = 64; RadScheduler1.TimelineView.StartTime = TimeSpan.Parse("08:00:00"); RadScheduler1.TimelineView.HeaderDateFormat = "dddd, dd MMMM yyyy"; RadScheduler1.RowHeight = Unit.Pixel(32); RadScheduler1.ReadOnly = true; } protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e) { string radDate; // = startDate.ToShortDateString(); string dtcDate; DateTime convertedRadDate; //= DateTime.Parse(sDate); DateTime converteddtcDate; radDate = RadScheduler1.SelectedDate.ToShortDateString(); dtcDate = dtcStartingDateTime.SelectedDate.ToShortDateString(); convertedRadDate = DateTime.Parse(radDate); converteddtcDate = DateTime.Parse(dtcDate); if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView) { if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod) { RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(8); RemoveRadEditorError(); //if (RadScheduler1.SelectedDate > dtcStartingDateTime.SelectedDate.AddDays(5)) if (convertedRadDate > converteddtcDate.AddDays(5)) { DisplayRadEditorError("You can only browse five days in Advance!"); RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(-8); e.Cancel = true; UpdatePanel1.Update(); } } else if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod) { RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(-8); RemoveRadEditorError(); //if (RadScheduler1.SelectedDate < dtcStartingDateTime.SelectedDate) if (convertedRadDate <= converteddtcDate) { DisplayRadEditorError("You cannot browse before the selected date!"); RadScheduler1.SelectedDate = RadScheduler1.SelectedDate.AddHours(8); e.Cancel = true; UpdatePanel1.Update(); } } } } protected void RemoveRadEditorError() { RadSchedulerError.Text = ""; //RadScheduler1.Visible = true; RadSchedulerError.Visible = false; } 

protected void ProgressBar2_RunTask(object sender, EO.Web.ProgressTaskEventArgs e) { int tcount = UploadListBox.Items.Count; if (tcount < 1) { e.UpdateProgress(0, "You must have files to process."); return; } int increment = 100 / tcount; int completed = 0; string pfile; string[] fileparts; //var item = new Telerik.Web.UI.RadListBoxItem(); for (int i = 0; i < (tcount); i++) { string filetype; InitMstrVariables(); InitFGVariables(); InitTransactionSet(); pfile = UploadListBox.Items[0].Value.ToString(); e.UpdateProgress(completed, "Processing: " + pfile); fileparts = pfile.Split('_'); MstrType = Right(fileparts[1], 1).ToUpper(); Batch = Convert.ToInt32(fileparts[0]); MstrYearMonth = Convert.ToInt32(Left(fileparts[3], 6)); DateCreated = StrToDate(fileparts[3]); filetype = Left(fileparts[1], 3); if (filetype == "834") { DeleteBatch834(); ProcessFile834(pfile); } else if (filetype == "820") { DeleteBatch820(); ProcessFile820(pfile); } var item = new Telerik.Web.UI.RadListBoxItem(); item.Value = pfile; item.Text = pfile; ProcessedListBox.Items.Add(item); UploadListBox.Items[0].Remove(); File.Delete(filepath + pfile); completed = completed + increment; } e.UpdateProgress(100, "Completed..."); }function OnProgress(progressBar) { var extraData = progressBar.getExtraData(); if (extraData) { //The following code demonstrates how to update //client side DHTML element based on the value //RunTask passed to us with e.UpdateProgress var div = document.getElementById("divStatus"); div.innerHTML = extraData; } }<Title> <Images> <Image> 1.jpg</Image> <text>something</text> <Images> . . .<Title>
Hi
I am using RadGrid With Paging(Mode:NextPrevAndNumeric).
Issue:-
The Problem is when i change the Page Size From the dropdown Let's say 2 to 10. then there is no record Display even the Grid has 5 records.
This Problems has Come after I implemented the "expand/collapse images when no records" in the grid followed your tetelrik article.
If I do the, Hieararchy Load Mode="Server" or remove "expand/collapse images when no records" behaviour then it's works fine.
But I need Both feature..
I also Attached the Code and Images
<
telerik:RadGrid AutoGenerateColumns="False" ID="rgSurvey" AllowPaging="True" AllowSorting="True"
AllowCustomPaging="True" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" AllowAutomaticDeletes="true" OnItemCommand="rgSurvey_ItemCommand" OnSortCommand="rgSurvey_SortCommand" OnNeedDataSource="rgSurvey_NeedDataSource" runat="server" Skin="Office2007" PageSize="20" ShowGroupPanel="false" ClientSettings-AllowDragToGroup="true" ClientSettings-AlowExpandCollapse="true" OnDetailTableDataBind="rgSurvey_DetailTableDataBind" DataMember="SurveyTemplateID" OnItemDataBound="rgSurvey_ItemDataBound" OnPreRender="rgSurvey_PreRender"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView TableLayout="Fixed" DataKeyNames="SurveyTemplateID" HierarchyDefaultExpanded="false" CommandItemDisplay="None" CommandItemSettings-AddNewRecordText="Add New User" HierarchyLoadMode="Client"> <DetailTables> <telerik:GridTableView AllowPaging="false" AllowSorting="false" > <Columns> <telerik:GridTemplateColumn UniqueName="LockUnlock" HeaderText="" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70"> <itemtemplate> <asp:ImageButton ID="Image1" runat="server" OnClientClick="return checkuserlock(this);" CommandName="UnlockSurvey" /> <br /> <asp:Label ID="lblLockUserName" runat="server" Text='<%# Eval("LockUserName") %>' /> <asp:Label ID="lblInnerLockUserId" runat="server" Text='<%# Eval("LockUserID") %>' style="display:none;"></asp:Label> </itemtemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn HeaderText="Version" DataField="SurveyVersion" HeaderStyle-Width="40"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="ID" DataField="SurveyTemplateID" UniqueName="SurveyTemplateID" SortExpression="SurveyTemplateID" HeaderStyle-Width="40" /> <telerik:GridButtonColumn HeaderText="Title" DataTextField="SurveyName" UniqueName="SurveyName" ItemStyle-Font-Bold="false" SortExpression="SurveyName" CommandName="editcontent" /> <telerik:GridBoundColumn HeaderText="Created By" DataField="UserNAME"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Last Updated By" DataField="LastUpdatedUser"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Approved By" DataField="ApprovedBy"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Active Date" DataField="ActiveDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Termination Date" DataField="TerminationDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Approval Status" DataField="ApprovalStatus"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="" DataField="LockUserID" Visible="false"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridTemplateColumn UniqueName="LockUnlock" HeaderText="" HeaderStyle-Width="70" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70"> <ItemTemplate> <asp:ImageButton ID="Image1" runat="server" OnClientClick="return checkuserlock(this);" CommandName="UnlockSurvey"/><br /> <asp:Label ID="lblLockUserName" runat="server" Text='<%# Eval("LockUserName") %>' /> <asp:Label ID="lblLockUserId" runat="server" Text='<%# Eval("LockUserID") %>' style="display:none;"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn HeaderText="Version" DataField="SurveyVersion" HeaderStyle-Width="40"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="ID" DataField="SurveyTemplateID" UniqueName="SurveyTemplateID" SortExpression="SurveyTemplateID" HeaderStyle-Width="40" /> <telerik:GridButtonColumn HeaderText="Title" DataTextField="SurveyName" UniqueName="SurveyName" ItemStyle-Font-Bold="true" ItemStyle-ForeColor="Red" SortExpression="SurveyName" CommandName="editcontent" /> <telerik:GridBoundColumn HeaderText="Created By" DataField="UserNAME" SortExpression="UserNAME"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Last Updated By" DataField="LastUpdatedUser" SortExpression="LastUpdatedUser"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Approved By" DataField="ApprovedBy" SortExpression="ApprovedBy"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Active Date" DataField="ActiveDate" SortExpression="ActiveDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Termination Date" DataField="TerminationDate" SortExpression="TerminationDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Approval Status" DataField="ApprovalStatus" SortExpression="ApprovalStatus"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="" DataField="LockUserID" Visible="false"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Page.IsPostBack) { this.rgSurvey.PageSize = 2; } } protected void rgSurvey_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { if (!e.IsFromDetailTable) { SetSurveyContentGridDataSource(); } } private void SetSurveyContentGridDataSource() { int totalRecord = 0; this.rgSurvey.DataSource = GetSearchBySurvey(ref totalRecord); this.rgSurvey.VirtualItemCount = totalRecord; } private List<GetSearchSurveyResult_Result> GetSearchBySurvey(ref int totalRecord) { string approvalstatus = string.Empty; SurveyQuestionBL oSurveyCategory = new SurveyQuestionBL(); int pageSize = this.rgSurvey.PageSize; string sortExpression = GetSortedColumnName("SURVEY"); string sortDirection = GetSortedDirection("SURVEY"); foreach (ListItem li in cbApprovalStatus.Items) { if (li.Selected == true) { approvalstatus += li.Value + ","; } } GetSearchSurveyResult_Result obj = new GetSearchSurveyResult_Result { SurveyTemplateID = txtSurveyID.Text.Length > 0 ? Convert.ToInt32(txtSurveyID.Text) : 0, SurveyName = txtSurveyTitle.Text, SurveyScopeID = Convert.ToInt32(rblScope.SelectedValue), ApprovalStatusID = approvalstatus, ClientID = Convert.ToInt32(rblScope.SelectedValue) ==(int) Scope.ClientSpecific ? (int?)Convert.ToInt32(ddlClientList.SelectedValue) : null }; //int pageSize = this.rgSurvey.PageSize; var list = oSurveyCategory.GetAllSurveyResult(pageSize, obj, rgSurvey.CurrentPageIndex, ref totalRecord, sortExpression, sortDirection); oSurveyCategory = null; return list; } protected void rgSurvey_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) { SurveyQuestionBL oReportingCategory = new SurveyQuestionBL(); // int record; GridDataItem parentItem = e.DetailTableView.ParentItem as GridDataItem; string surveyTemplateID = parentItem.GetDataKeyValue("SurveyTemplateID").ToString(); this.rgSurvey.DataSource = oReportingCategory.GetNestedSurveyById(Convert.ToInt32(surveyTemplateID)); //this.rgSurvey.AllowPaging = false; } protected void rgSurvey_PreRender(object sender, EventArgs e) { HideExpandColumnRecursive(rgSurvey.MasterTableView); } public void HideExpandColumnRecursive(GridTableView tableView) { GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView); foreach (GridNestedViewItem nestedViewItem in nestedViewItems) { foreach (GridTableView nestedView in nestedViewItem.NestedTableViews) { if (nestedView.Items.Count == 0) { TableCell cell = nestedView.ParentItem["ExpandColumn"]; cell.Controls[0].Visible = false; nestedViewItem.Visible = false; } if (nestedView.HasDetailTables) { HideExpandColumnRecursive(nestedView); } } } } protected void rgSurvey_SortCommand(object source, GridSortCommandEventArgs e) { // if (rblSearchType.SelectedValue == "1") //{ SetSortedColumnName("SURVEY", e.CommandArgument.ToString()); SetSortedDirection("SURVEY", e.NewSortOrder.ToString()); BindContentSurveyGrid(); } protected void rgSurvey_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) { Int32 SurveyId, dbResult; int LockUserID, Edit; SurveyQuestionBL oReportingCategory; if (e.CommandName == "editcontent") { oReportingCategory = new SurveyQuestionBL(); GridDataItem item = (GridDataItem)e.Item; SurveyId = Convert.ToInt32(item["SurveyTemplateID"].Text); LockUserID = Convert.ToInt32(item["LockUserID"].Text); if (LockUserID == 0 || LockUserID == base.UserID) { dbResult = oReportingCategory.InsertSurveyForLockUnlock(base.UserID, SurveyId); Edit = 1; } else { Edit = 2; } Response.Redirect("~/Survey/AddSurvey.aspx?SID=" + SurveyId + "&Edit=" + Edit, true); } else if (e.CommandName == "UnlockSurvey") { oReportingCategory = new SurveyQuestionBL(); GridDataItem item = (GridDataItem)e.Item; SurveyId = Convert.ToInt32(item["SurveyTemplateID"].Text); dbResult = oReportingCategory.InsertSurveyForLockUnlock(null, SurveyId); rgSurvey.Rebind(); } else if (e.CommandName == "ChangePageSize") { rgSurvey.PageSize = ((Telerik.Web.UI.GridPageSizeChangedEventArgs)(e)).NewPageSize; rgSurvey.Rebind(); } }