| <CommandItemTemplate> |
| <div> |
| <table width="103%" border="0" cellpadding="0" cellspacing="0" style="margin-top: -2px; |
| margin-left: -4px; margin-bottom: -3px;"> |
| <tr> |
| <telerik:RadToolBar runat="server" ID="RTBTermination" Skin="Office2007" Width="100%" |
| OnClientButtonClicked="RTBTerminationclientButtonClicked" OnButtonClick="RTBTermination_ButtonClick"> |
| <Items> |
| <telerik:RadToolBarButton Text="Edit" Font-Size="9" ForeColor="#00156E" CommandName="Edit" |
| ImagePosition="Left" ImageUrl="images/penedit.png"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Close" Font-Size="9" ForeColor="#00156E" ImagePosition="Left" |
| ImageUrl="images/closeeeeeee.gif"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="" Font-Size="9" Width="800px" Enabled="false" ForeColor="#00156E"> |
| </telerik:RadToolBarButton> |
| </Items> |
| </telerik:RadToolBar> |
| </tr> |
| </table> |
| </div> |
| </CommandItemTemplate> |
| function rgvReport_RowSelect(sender, eventArgs) { |
| var rowindex = eventArgs.get_itemIndexHierarchical(); |
| document.getElementById("<%=txtrgvReportRowIndex.ClientID%>").value = eventArgs.get_itemIndexHierarchical(); |
| //alert(rowindex); |
| var TerGrid = $find("<%=rgvReport.ClientID %>"); |
| var gridRow = TerGrid.MasterTableView.get_dataItems()[rowindex]; |
| var TerStatus = gridRow.getDataKeyValue("TerminationStatus"); |
| //alert(TerStatus); |
| //alert(RTBButton); |
| } |
Hello,
I have 2 questions:
1) I have paging in my grid(Attached:CurrentPaging), and dont want the whole pager, i want only part of it (Attached:wantedPaging)
How do i do that?
2) at the paging, the prev,next,home and end buttons are arrows
How can i write text(Attached:PrevNextPaging)?
thanks,
yoni
Hello Telerik,
I have a hard time in getting this problem solved, if you guys can help me that would be really grateful, I have a situation where we are implementing DundasCharts which loads dynamically. we have a requirement that as the user right click on the chart he should have an option of changing the chart types (bar Charts, Pie charts, Line graph, so on..) so for this we thought of implementing the RadContextmenu. but we were unable to add context menu. if you can help me with this situation either providing me the snippet or the sample project which implements my scenario ( context menu for Dundas charts), that would be really helpful for me.
Thanks,
Gautham Gorla
| <script type="text/javascript"> | |
| //<![CDATA[ | |
| function schedulerFormCreated(scheduler, eventArgs) { | |
| var mode = eventArgs.get_mode(); | |
| if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || | |
| mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) { | |
| // Initialize the client-side object for the advanced form | |
| var schedulerElement = scheduler.get_element(); | |
| var formElement = eventArgs.get_formElement(); | |
| var isModal = scheduler.get_advancedFormSettings().modal; | |
| var advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal); | |
| advancedTemplate.initialize(); | |
| // Are we using Web Service data binding? | |
| if (!scheduler.get_webServiceSettings().get_isEmpty()) { | |
| // Populate the form with the appointment data | |
| var apt = eventArgs.get_appointment(); | |
| var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert; | |
| var editSeries = eventArgs.get_editingRecurringSeries(); | |
| advancedTemplate.populate(apt, isInsert, editSeries); | |
| } | |
| } | |
| } | |
| //]]> | |
| </script> |

<script type="text/javascript"> function MyClientShowing(sender, args) { document.title = "show " + new Date(); args.get_loadingElement().style.border = "2px solid red"; args.set_cancelNativeDisplay(true); $telerik.$(args.get_loadingElement()).show("slow"); } function MyClientHiding(sender, args) { document.title = "hide " + new Date(); args.get_loadingElement().style.border = "2px solid blue"; args.set_cancelNativeDisplay(true); $telerik.$(args.get_loadingElement()).hide("slow"); } </script> </telerik:RadCodeBlock> <style type="text/css"> .hiddencol { display:none; } .viscol { display:block; } </style> <asp:Panel ID="pnl_CartContent" runat="server" cssclass="collapsePanel" Height="100%"> <table width="264"> ... </table> </asp:Panel> <ACTK:AlwaysVisibleControlExtender ID="avce_Cart" runat="server" TargetControlID="pnl_CartContent" VerticalSide="Top" VerticalOffset="225" HorizontalSide="Left" HorizontalOffset="650" ScrollEffectDuration=".1" /> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" OnClientShowing="MyClientShowing" OnClientHiding="MyClientHiding" /> <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btn_Search"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="pnl_SearchHeaderMain" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Panel id="pnl_SearchHeaderMain" runat="server"> <div>...</div> </asp:Panel><telerik:RadGrid ID="rgProjects" runat="server" CommandItemDisplay="Top" GridLines="None" AllowCustomPaging="True" AllowPaging="true" PagerStyle-AlwaysVisible="true" PageSize="10" CellSpacing="0" AllowFilteringByColumn="True" EnableLinqExpressions="false" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="dsProjects" onitemcommand="rgProjects_ItemCommand" > <MasterTableView EditMode="InPlace" CommandItemDisplay="None" OverrideDataSourceControlSorting="true" PagerStyle-AlwaysVisible="true"> <NoRecordsTemplate> <asp:Label ID="lbNoUsers" runat="server" Text="There are currently no Project records in the system."></asp:Label> </NoRecordsTemplate> <Columns> <telerik:GridHyperLinkColumn DataNavigateUrlFields="ProjectKey" DataNavigateUrlFormatString="~/ProjectCreation/CreateProject.aspx?NK=3&P={0}" DataTextFormatString="Project {0}" DataTextField="ProjectKey" FilterControlAltText="Filter column column" HeaderText="Project" UniqueName="ProjectKey" SortExpression="PROJECT_KEY"> </telerik:GridHyperLinkColumn> <telerik:GridTemplateColumn FilterControlAltText="Filter PrimaryClientNumber column" HeaderText="Primary Client Number" UniqueName="PrimaryClientNumber" SortExpression="PRIMARY_CLIENT.CLIENT_NUMBER"> <ItemTemplate> <MlCts:SecuredLabel ID="lbPrimaryClientNumber" runat="server" BindingObjectTextPropertyName="ClientNumber" BindingPath=".PrimaryClient"></MlCts:SecuredLabel> </ItemTemplate> </telerik:GridTemplateColumn> ..removed for brevity <telerik:GridTemplateColumn FilterControlAltText="Filter SecondaryMatterName column" HeaderText="Secondary Matter Name" UniqueName="SecondaryMatterName" SortExpression="SECONDARY_MATTERMATTER_NAME"> <ItemTemplate> <MlCts:SecuredLabel ID="lbSecondaryMatterName" runat="server" BindingObjectTextPropertyName="MatterDescription" BindingPath=".SecondaryMatter"></MlCts:SecuredLabel> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings EditColumn-ButtonType="ImageButton" EditColumn-Display="false" EditColumn-Visible="true" EditFormType="AutoGenerated"> <EditColumn ButtonType="ImageButton" Display="False"> </EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid><asp:ObjectDataSource ID="dsProjects" EnablePaging="true" MaximumRowsParameterName="PageSize" SelectCountMethod="SelectCount" StartRowIndexParameterName="CurrentRowIndex" TypeName="PTDSA.DataSources.ProjectDatasource" SortParameterName="SortParam"runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="Select" onselecting="dsProjects_Selecting"> <SelectParameters> <asp:Parameter Name="FilterOperation" Type="String" /> <asp:Parameter Name="FilterValue" Type="Object" /> </SelectParameters> </asp:ObjectDataSource> object _filtervalue = null; string _filterpredicate = null; string _operation = null; protected void dsProjects_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { e.Arguments.MaximumRows = rgProjects.MasterTableView.PageSize; if (_filtervalue != null) { if (_operation == "NoFilter") { _filtervalue = null; _filterpredicate = null; } e.Arguments.StartRowIndex = 0; e.InputParameters["FilterOperation"] = _filterpredicate; e.InputParameters["FilterValue"] = _filtervalue; } } protected void rgProjects_ItemCommand(object sender, GridCommandEventArgs e) { if (e.Item != null) { if (e.Item.ItemType == GridItemType.FilteringItem) { Pair filterPair = e.CommandArgument as Pair; if (filterPair != null) { GridColumn currentCol = e.Item.OwnerTableView.GetColumn(filterPair.Second.ToString()); if (currentCol != null) { _filtervalue = Convert.ChangeType(currentCol.CurrentFilterValue, currentCol.DataType); //This is my custom linq predicate creation _filterpredicate = e.GetDynamicLinqFilter(currentCol.SortExpression, false); _operation = filterPair.First.ToString(); } } } } } [DataObject(true)] public class ProjectDatasource { public Project[] Select( string FilterOperation, object FilterValue, string SortParam, int PageSize, int CurrentRowIndex ) { using (...Custom Data Provider) { string sortBy = String.IsNullOrWhiteSpace(SortParam) ? "PROJECT_KEY" : SortParam; sortBy = Utilities.getSortParamName(sortBy); bool isAscending = Utilities.getIsAscending(sortBy); Project[] returnItems = dataProvider.GetProjectsBySearchParams(PageSize, CurrentRowIndex, sortBy, isAscending, FilterOperation, FilterValue ); return returnItems; } } public int SelectCount( string FilterOperation, object FilterValue) { using (..Custom Data Provder) { return dataProvider.GetProjectsBySearchParamsCount( FilterOperation, FilterValue ); } } }<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" %><telerik:RadAjaxPanel ID="pnlChangePassword" runat="server" DefaultButton="btnChange" LoadingPanelID="ralMain"> <div class="box" style="width: 445px;"> <fieldset> <asp:Label ID="lblOldPassword" AssociatedControlID="txbOldPassword" runat="server" Text="<%$ Resources: Common, OldPassword_label %>" /> <asp:TextBox ID="txbOldPassword" TextMode="Password" runat="server" MaxLength="100" /> </fieldset> <fieldset> <asp:Label ID="lblPassword" AssociatedControlID="txbPassword" runat="server" Text="<%$ Resources: Common, NewPassword_label %>" /> <asp:TextBox ID="txbPassword" TextMode="Password" runat="server" MaxLength="100" /> </fieldset> <fieldset> <asp:Label ID="lblConfirmPassword" AssociatedControlID="txbConfirmPassword" runat="server" Text="<%$ Resources: Common, NewPasswordConfirm_label %>" /> <asp:TextBox ID="txbConfirmPassword" TextMode="Password" runat="server" MaxLength="100" /> </fieldset> </div> <div> <asp:Button ID="btnChange" runat="server" CssClass="button" Text="<%$ Resources: Common, ChangePassword_button %>" OnClick="HandlerButtonOnClick" /> </div></telerik:RadAjaxPanel> <script type="text/javascript"> //<![CDATA[ function CloseWin() { $find('<%= changePasswordWindow.ClientID %>').close(); } function OpenWin() { $find('<%= changePasswordWindow.ClientID %>').show(); } //]]></script><telerik:RadWindow ID="changePasswordWindow" Title="<%$ Resources: Common, ChangeYourPassword_title %>" runat="server" Modal="true" Behavior="Close" EnableShadow="true" Width="530px" Height="300px" VisibleStatusbar="false"> <ContentTemplate> <div style="margin: 10px;"> <ref:ChangePassword ID="changePassword" runat="server" /> </div> <asp:LinkButton ID="btnBack" runat="server" Text="<%$ Resources: Common, Close_label %>" CausesValidation="false" OnClientClick="CloseWin();return false;" /> </ContentTemplate></telerik:RadWindow><asp:Button ID="btnChange" runat="server" CssClass="button" Text="<%$ Resources: Common, ChangePassword_button %>" CausesValidation="false" OnClientClick="OpenWin();return false;" />