<telerik:RadSlidingPane ID="RadSlidingPane2" Runat="server" IconUrl="~/Content/Dashboard/Icons/chart.png" TabView="ImageOnly" BackColor="#ECF4FD" MinWidth="160" Scrolling="Y" Title="Custom Widgets" Width="160px" EnableDock="False"> <telerik:RadListBox ID="lstBxCustom" runat="server" EnableDragAndDrop="True" onclientdragging="OnClientDragging" OnClientDropping="OnClientDropping" Skin="Web20" Sort="Ascending" Width="100%" /></telerik:RadSlidingPane>I am not getting updated pageindex when navigating from page to page. it shows previous page number, not current one which is clicked.Following is configuration of grid on aspx. <telerik:RadGrid ID="SearchResultsGrid" runat="server" EnableViewState="True" Height="100%" AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true" AllowSorting="True" AllowMultiRowSelection="True" GridLines="None" Skin="Telerik" OnItemCommand="SearchResultsGrid_ItemCommand" OnNeedDataSource="SearchResultsGrid_NeedDataSource" PageSize="50" Width="721" > <MasterTableView EnableNoRecordsTemplate="true" TableLayout="Fixed" DataKeyNames="AssignmentId">Master.SearchResults is radGrid
protected void SearchResultsGridNeedDataSource(object source, GridNeedDataSourceEventArgs e) { try { LoadSearchResults(); } catch (Exception ex) { HandleException(Master.ErrorMessagePanel, AssignmentErrorMessages.FIND_ASSIGNMENTS, string.Empty, MessageStatus.Error, ex); } }private void LoadSearchResults(bool dataBind = false) { if (rdoObjectType.SelectedItem == null) { return; } if (string.IsNullOrEmpty(selNames.SelectedValue)) { return; } int objectId = int.Parse(rdoObjectType.SelectedItem.Value); int nameId = int.Parse(selNames.SelectedValue); List<SelectListDto> clientNames = (List<SelectListDto>)GetClientNames(objectId, selNames.Text); int objectTypeId = int.Parse(clientNames.Single(c => c.Value == int.Parse(selNames.SelectedValue)).ExtraField); int statusId = int.Parse(rdoStatus.SelectedValue); AssignmentSearchResultDto assignments = FindAssignment(objectTypeId, objectId, nameId, statusId); Master.SearchResults.VirtualItemCount = assignments.TotalItems; Master.SearchResults.AllowCustomPaging = true; Master.SearchResults.DataSource = assignments.Assignments; Master.SearchResults.PageIndexChanged += RadGrid1_PageIndexChanged; }private AssignmentSearchResultDto FindAssignment(int objectTypeId, int objectId, int personId, int status) { int startRowIndex = Master.SearchResults.CurrentPageIndex * Master.SearchResults.PageSize; int maximumRows = Master.SearchResults.PageSize; AssignmentSearchResultDto assignments; using (Assignment assignment = new Assignment()) { assignments = assignment.FindAssignment(objectTypeId, objectId, personId, status, agencyId, startRowIndex, maximumRows); } return assignments; }
<
telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"
GridLines="None" Skin="Web20" Style="margin-right: 0px" Width="673px" Height="260px"
OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnItemDataBound="grdCurrentandPrior_ItemDataBound">
<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True">
<Excel Format="HTML" />
</ExportSettings>
<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false"/>
<Columns>
<telerik:GridTemplateColumn HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Jurisdictions" UniqueName="JurisdictionCount" SortExpression="JurisdictionCount">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />
<ItemTemplate >
<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn">
<HeaderTemplate>
<table id="Table1" cellspacing="1" cellpadding="1" width="200px" border="1">
<tr>
<td colspan="2" align="center">
<b>Open Items by Age</b>
</td>
</tr>
<tr>
<td align="center" width="50%">
<b>Prior</b>
</td>
<td align="center" width="50%">
<b>Current</b>
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table id="Table2" cellspacing="1" cellpadding="1" width="260px" border="1">
<tr>
<td width="50%">
<asp:Label ID="lblPriorCount" runat="server" Text='<%# Eval("OpenItemsCountPrior") %>'></asp:Label>
</td>
<td width="50%">
<asp:Label ID="lblCurrentCount" runat="server" Text='<%# Eval("OpenItemsCountELD") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("TotalRemainingItems") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="% Complete" UniqueName="clmPctComplete">
<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" />
<ItemTemplate>
<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("TotalRemainingItems") %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" ForeColor="Black" />
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"
Visible="False">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<HeaderStyle BorderStyle="Solid" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
//TODO: Make this obsolete. Somehow. Probably through thinking!public void SetAttributes(){ Logger.InfoFormat("Setting Attributes for {0}: ", ID); Attributes["RefreshEnabled"] = RefreshEnabled.ToString(); Logger.InfoFormat("RefreshEnabled: {0}: ", RefreshEnabled); Attributes["RefreshInterval"] = RefreshInterval.ToString(); Logger.InfoFormat("RefreshInterval: {0}: ", RefreshInterval); Attributes["ChartType"] = ChartType.ToString(); Logger.InfoFormat("ChartType: {0}: ", ChartType); Attributes["ReportType"] = ReportType.ToString(); Logger.InfoFormat("ReportType: {0}: ", ReportType); Attributes["TimeRestrictionEnabled"] = TimeRestrictionEnabled.ToString(); Logger.InfoFormat("TimeRestrictionEnabled: {0}: ", TimeRestrictionEnabled); Attributes["TimeStart"] = TimeStart.ToString(); Logger.InfoFormat("TimeStart: {0}: ", TimeStart); Attributes["TimeEnd"] = TimeEnd.ToString(); Logger.InfoFormat("TimeEnd: {0}: ", TimeEnd); Attributes["DataPointsEnabled"] = DataPointsEnabled.ToString(); Logger.InfoFormat("DataPointsEnabled: {0}: ", DataPointsEnabled); Attributes["ReportID"] = Chart.ReportID.ToString(); Logger.InfoFormat("ReportID: {0}: ", Chart.ReportID.ToString());}//Opens a historical report settings window -- passing the known settings to it//so that the window will show the proper data to the user.function OnHistoricalLocalSettingsShow(sender, eventArgs) { var historicalAttributes = {}; var radDockElement = radDock.get_element(); historicalAttributes["RefreshEnabled"] = radDockElement.getAttribute("RefreshEnabled"); historicalAttributes["RefreshInterval"] = radDockElement.getAttribute("RefreshInterval"); historicalAttributes["ChartType"] = radDockElement.getAttribute("ChartType"); historicalAttributes["TimeRestrictionEnabled"] = radDockElement.getAttribute("TimeRestrictionEnabled"); historicalAttributes["TimeStart"] = radDockElement.getAttribute("TimeStart"); historicalAttributes["TimeEnd"] = radDockElement.getAttribute("TimeEnd"); historicalAttributes["DataPointsEnabled"] = radDockElement.getAttribute("DataPointsEnabled"); sender.argument = historicalAttributes;}function ShowEditForm(id, rowIndex) { var grid = $find("<%= RadGrid1.ClientID %>"); var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); grid.get_masterTableView().selectItem(rowControl, true); var oBrowserWnd = GetRadWindow().BrowserWindow; oBrowserWnd.radopen("BandMemberEditForm.aspx?ID=" + id, "BandMemberDialog"); return false; }function refreshGrid(arg) { //debugger; alert("refresh grid"); if (!arg) { $find("<%= Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind"); } else { $find("<%= Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate"); } }function CloseAndRebind(args) { alert("close and rebind"); GetRadWindow().Close(); //debugger; //var oWindow = GetRadWindow(); GetRadWindow().BrowserWindow.refreshGrid(args); }I'm using RadHtmlField from Telerik.SharePoint.FieldEditor in my SharePoint site and make use of the Document Manager. When I've uploaded documents and then wish to select one, the list is not sorted. Should I add something to my ConfigFile.xml? It currently looks like this:
<configuration>
<property name="AllowThumbGeneration">True</property>
<property name="ConvertToXhtml">True</property>
<property name="EnableDocking">False</property>
<property name="ShowHtmlMode">False</property>
<property name="ShowPreviewMode">False</property>
<property name="StripAbsoluteAnchorPaths">true</property>
<property name="StripAbsoluteImagesPaths">true</property>
<property name="ToolbarMode">ShowOnFocus</property>
<property name="ToolsWidth">100px</property>
<property name="DocumentsPaths">
<item>/Documents</item>
</property>
<property name="MaxDocumentSize">
<item>20971520</item>
</property>
<property name="ImagesPaths">
<item>PublishingImages</item>
<item>/SiteCollectionImages</item>
</property>
</configuration>