Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views

Hello to all

 i use web mail project in samples and demo projects on telerik web site (but i modify it)  ,  my question when i run the project its working fine but in master file there is no ajax manger only on content page , so when i try to put ajax manger on master and ajax manger proxy on content (as i read in help) error message come

 Splitter Items Collection must contain SplitterItem objects

but if i remove radajaxmanger message will go and web page will load without any issue ,so what is my mistake .

 

 

 

thanks

 

master sorec code

 

 

<%@ Master Language="VB" CodeFile="mainmaster.master.vb" Inherits="mainmaster" %>

 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
   
    



    <link rel="stylesheet" type="text/css" href="Styles/styles.css" />
    <link rel="stylesheet" type="text/css" href="Styles/stylesloc.css" />
</head>
<body>
<form id="form1" runat="server">

    <telerik:RadScriptManager runat="server" EnableCdn="true" ID="RadScriptManager1" />
    <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheet1" />
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1"
        DecoratedControls="All" Skin="Silk" />
       
       
       
       
       
       
       <%--
       
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>          
             
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rightPane" />
                   <telerik:AjaxUpdatedControl ControlID="contentPane" />
                </UpdatedControls>
            </telerik:AjaxSetting>                                    
            <telerik:AjaxSetting AjaxControlID="rightPane">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rightPane"   />
                    
                </UpdatedControls>
            </telerik:AjaxSetting>
                       
        
           <telerik:AjaxSetting AjaxControlID="RadButton1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rightPane"  />
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                    <telerik:AjaxUpdatedControl ControlID="RadButton1"   />
                    <telerik:AjaxUpdatedControl ControlID="contentPane" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            

              <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                </telerik:AjaxSetting>


             <telerik:AjaxSetting AjaxControlID="RadToolBar1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager33"  />
                   
                </UpdatedControls>
            </telerik:AjaxSetting>

        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
    </telerik:RadAjaxLoadingPanel>--%>

       
       
       
       
       
       
       â€‹ ​








    <telerik:RadSplitter runat="Server" ID="RadSplitter1"
        Width="100%" Height="100%" Orientation="Horizontal" VisibleDuringInit="false"
        BorderSize="0" BorderStyle="None" PanesBorderSize="0">
        <telerik:RadPane ID="topPane" runat="server" Height="74px">
            <div id="header">
                            
                <asp:Label ID="Label2" runat="server" Font-Size="X-Large"
                    Text="welcome"></asp:Label>
                 








                    <div class="date-r">
                <span>Select period from: </span>
                <telerik:RadDatePicker ID="StartDatePicker"  runat="server"    >
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"></Calendar>

<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"   LabelWidth="40%"
                        value="7/17/1996"></DateInput>

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                   
                </telerik:RadDatePicker>
              
                <span>to: </span>
                <telerik:RadDatePicker ID="EndDatePicker"   runat="server"     >
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"></Calendar>

<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy"  LabelWidth="40%"
                        value="7/17/1997"></DateInput>

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                  
                </telerik:RadDatePicker>
                &nbsp;

                   <telerik:RadButton ID="RadButton1" runat="server" Text="Search">
                </telerik:RadButton>
                 
            </div>



 








                <div class="skin-chooser">
                 
                    <label for="ctl00_SkinChooser_Input" class="skinLabel">Skin:</label>
            <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" Skin="Office2010Blue"
                        PersistenceKey="Skin" PersistenceMode="Session" >
            </telerik:RadSkinManager>
                </div>
            </div>












            <div class="menu">
                <telerik:RadToolBar ID="RadToolBar1" runat="server">
               <Items>

            
                <telerik:RadToolBarButton Text="Home"    ImageUrl="Images/s.png"
                    NavigateUrl="default.aspx" Target="_parent" Width="150px"  />

                <telerik:RadToolBarButton Text="MySettings"    
                    ImageUrl="Images/s.png" Width="150px"  
                        />

                          <telerik:RadToolBarButton Text="System Status"    
                    ImageUrl="Images/s.png" Width="150px"
                        />

                    <%-- <telerik:RadToolBarButton Text="About This Demo" CssClass="AboutToolButton" ImageUrl="Images/s.png" />--%>
                <telerik:RadToolBarButton Text="About"  
                   NavigateUrl="http://www.​gggg.com/#!about/cgvz" Target="_blank"  
                    ImageUrl="Images/s.png" Width="150px"   />
            
            </Items>
                </telerik:RadToolBar>
            </div>
        </telerik:RadPane>










        <telerik:RadPane runat="server" ID="contentPane" Scrolling="none">
            <telerik:RadSplitter runat="server" ID="RadSplitter2" BorderStyle="None" PanesBorderSize="0">
                <telerik:RadPane runat="Server" ID="leftPane" Width="240px" MinWidth="240" MaxWidth="600"
                    Scrolling="None">
                    <telerik:RadSplitter runat="server" ID="RadSplitter3" BorderStyle="None" PanesBorderSize="0"
                        Height="100%" Orientation="Horizontal">
                        <telerik:RadPane runat="server" ID="topLeftPane"     >
                            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

                            
 
                                 
  <telerik:RadTreeView runat="server" ID="RadTreeView1"    >
    <NodeTemplate>
     
        <div class="node-album">
                                  
            <span class="band">
            <%# Eval("header")%>
            <br />
            &nbsp;  <asp:Image ID="Image2" runat="server"    ImageUrl= '<%#  get_image_online_or_offline( Eval("db_name")).ToString()  %>'      ToolTip='<%#  get_online_or_offline( Eval("db_name")).ToString()  %>' />
            </span>
            <asp:Label ID="totalsales" runat="server" class="album" Text='<%# string.Format("{0:0,0}",  GetSalestotal( Eval("db_name").ToString())) %>'></asp:Label>
             <asp:Label ID="percent" runat="server" class="percent" Text='<%# GetSalesPercentage( Eval("db_name") ) + "%" %>'></asp:Label>
        </div>
                                 

                                 
                        
                          
                          


                    

                                  

                    </NodeTemplate>

           
        </telerik:RadTreeView>




                              




                            </asp:ContentPlaceHolder>
                        </telerik:RadPane>
                        <telerik:RadSplitBar runat="server" ID="RadSplitBar3" CollapseMode="Backward" />
                        <telerik:RadPane runat="server" ID="bottomLeftPane" Height="120px">
                          
                            <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%"
                                Height="100%" >
                                <Items>
                                    <telerik:RadPanelItem Text="Statistics"     />
    <telerik:RadPanelItem Text="Transactions"     />
       <telerik:RadPanelItem Text="Reports"     />
          <telerik:RadPanelItem Text="P.O"     />
          <telerik:RadPanelItem Text="Tables"     />
             <telerik:RadPanelItem Text="Call Center"     />



                                </Items>
                            </telerik:RadPanelBar>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
                <telerik:RadSplitBar runat="server" ID="RadSplitBar1" CollapseMode="Forward" />
                <telerik:RadPane runat="Server" ID="rightPane" CssClass="right-pane">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                    </asp:ContentPlaceHolder>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
    </telerik:RadSplitter>
    <telerik:RadWindowManager ID="RadWindowManager33" runat="server"
        EnableShadow="True" EnableViewState="False" ShowContentDuringLoad="False"
        Skin="Office2010Blue" VisibleStatusbar="False">
        <Windows>
            <telerik:RadWindow ID="RadWindow0" runat="server"
                Behavior="Resize, Close, Move, Reload" Behaviors="Resize, Close, Move, Reload"
                EnableShadow="True" Height="650px" Modal="True"
                NavigateUrl="~/Views/​g_f.aspx" ShowContentDuringLoad="False"
                Skin="Office2010Blue" style="display:none;" VisibleStatusbar="False"
                Width="600px">
            </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow1" runat="server" AutoSize="True"
                Behavior="Resize, Close, Move, Reload" Behaviors="Resize, Close, Move, Reload"
                EnableShadow="True" Height="450px" Modal="True"
                NavigateUrl="~/Views/reports_​g.aspx" ShowContentDuringLoad="False"
                Skin="Office2010Blue" style="display:none;" VisibleStatusbar="False"
                Width="450px">
            </telerik:RadWindow>
            <telerik:RadWindow ID="RadWindow3" runat="server" AutoSize="True"
                Behavior="Resize, Close, Move, Reload" Behaviors="Resize, Close, Move, Reload"
                EnableShadow="True" Modal="True" NavigateUrl="~/Views/g_stauts_f.aspx"
                ShowContentDuringLoad="true" Skin="Office2010Blue" style="display:none;"
                VisibleStatusbar="False" Width="450px">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <asp:PlaceHolder runat="server" ID="AnalyticsPlaceholder">
        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-111455-1']);
            _gaq.push(['_setDomainName', '.telerik.com']);
            _gaq.push(['_addIgnoredRef', 'telerik.com']);
            _gaq.push(['_trackPageview']);

            (function () {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>
    </asp:PlaceHolder>
</form>
</body>
</html>​

 

Marin Bratanov
Telerik team
 answered on 02 Sep 2015
3 answers
285 views

There appears to be a problem with the ResizeToFit functionality not working in Chrome (Version 44.0.2403.157 m).

Specifically, it appears that date fields are causing a problem.

The RadGrid renders fine in both IE (version 11) and Firefox (version 37).

<telerik:RadGrid ID="gridFinder" runat="server" Skin="Windows7" GroupingSettings-CaseSensitive="false" AllowSorting="True" AllowFilteringByColumn="True"
    CellSpacing="0" GridLines="both" GroupingEnabled="False" ShowGroupPanel="True" ShowHeader="True" EnableLinqExpressions="false" FilterMenu-OnClientShown="menuShowing">
    <ClientSettings>
        <Scrolling AllowScroll="false" UseStaticHeaders="true" />
        <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="false" AllowResizeToFit="true" />
        <ClientEvents OnFilterMenuShowing="filterMenuShowing" />
    </ClientSettings>
    <MasterTableView PageSize="20" CommandItemDisplay="Top">
        <CommandItemSettings ShowAddNewRecordButton="false" />
        <Columns>
            <telerik:GridButtonColumn ButtonType="ImageButton" HeaderText="Select" CommandName="Select" UniqueName="SelectRecord" ImageUrl="~/images/icons/accept.png" ItemStyle-Width="18px" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Javascript to invoke the resizeToFit...

function ResizeColumns() {
    var grid = $find("[gridFinder]");
    if (grid != null) {
        var columns = grid.get_masterTableView().get_columns();
        for (var i = 0; i < columns.length; i++) {
            columns[i].resizeToFit(false, true);
        }
    }
}
 
Sys.Application.add_load(ResizeColumns);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ResizeColumns)

FYI, the RadGrid in question resides in a user control in case that makes a difference. 

Any ideas how to fix this?

 

 Dennis

Dennis
Top achievements
Rank 2
 answered on 01 Sep 2015
7 answers
691 views
Hi,

I am using a RadMap and using a datasource to set my marker locations and all works fine the map displays and the marker on the map displays at the right positions. Now i want to create a ClientEvent that uses the OnMarkerClick event that will just return the DataTitleField from that marker in string format is there a way to do this

Thanks
Ian
Marin Bratanov
Telerik team
 answered on 01 Sep 2015
1 answer
145 views

I'm testing with the new release and I noticed that the text in the pane tab isn't correctly displayed in Microsoft Edge. In some pane tabs the text is upside down instead of vertical. 

You can even see it in your own examples, e.g. http://demos.telerik.com/aspnet-ajax/splitter/examples/sp_firstlook/defaultcs.aspx

Joana
Telerik team
 answered on 01 Sep 2015
3 answers
127 views
Greetings,

I am trying to download the .zip files for the SharePoint 2010 and 2013 webparts from http://www.telerik.com/products/sharepoint/download.aspx and the download links seem to be broken/not working. The .msi downloads are also not working. Please advise how I can download these demos.

Kind regards,

Craig
Slav
Telerik team
 answered on 01 Sep 2015
3 answers
295 views

Is there a way to handle the Marker on Click on a server side event?

I would like to change the contents of other controls on the page using the data obtained from the Marker location.

Thank you,

Nick

Marin Bratanov
Telerik team
 answered on 01 Sep 2015
1 answer
121 views

Hi,

i was wondering if anyone knew how to use this SocialShare as a authentication means.

Right now i am using my own facebook and Linkedin Oath to sign a user into our account.

What i would like to do is:

1. if the user select to use socialshare, then logs into one of these social platforms....verify that they indeed were successful at login in.

2. get the username and email and then use it to also log them into my account/ or create a new account with the information.

 

right now i do this with facebook and linkedin as stated above. Facebook request that the user allow our app, which is fine in the process.

 

if i can do this above...that would be great and allow me to support more platforms than just facebook/linkedin.

 

thoughts?

 

RS

 

 

Rumen
Telerik team
 answered on 01 Sep 2015
3 answers
287 views

Using version 2015.2.623.45, RadGrid posts back when selecting the same row...

<ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" EnablePostBackOnRowClick="True">
     <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
     <Scrolling AllowScroll="True" UseStaticHeaders="True" />
     <Resizing AllowColumnResize="True" AllowResizeToFit="True" EnableRealTimeResize="True" />
</ClientSettings>

Is there a ClientSettings-Selecting property that can be set or a javascript snippet to disallow postback when the selected row is selected again?

We'd like to avoid using the ClientSelectColumn.

Thanks!

cookies please
Top achievements
Rank 1
 answered on 01 Sep 2015
1 answer
185 views

All

I've been messing with a couple of problems far too long and I desperately need some help.

I have a RadGrid, EditMode=Batch, with 1:M DetailsTable

I have 2 major problems

1. Checkbox ​and edit mode. I know you can't select a checkbox. I have this kind of working using a GridTemplateColumn instead of a GridCheckboxColumn. It works fine in Chrome using code below, but in IE and FF, it still requires 2 clicks.

2. I need to add a CheckAll Button or Checkbox in the footer of each DetailsTable/GridTableView Flag column that will force all checkboxes in that single DetailsTable to checked, even if they are already checked. All samples work with MasterTable only and I can't figure out how to have it iterate in javascript through the particular DetailsTable.

PLEASE, any help or direction would be most appreciated.

            <telerik:RadGrid ID="RadGrid1" runat="server" CssClass="transparentRadGrid" AllowPaging="False"
                AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="False" AllowAutomaticDeletes="True"
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="sdsGrid1"
                Width="99%" ShowGroupPanel="False" AllowFilteringByColumn="False" AutoGenerateHierarchy="True"
                ShowHeader="false" EnableLinqExpressions="false" >
                <SortingSettings EnableSkinSortStyles="False" />
                <MasterTableView Name="MasterTableView" CommandItemDisplay="None" DataSourceID="sdsGrid1"
                    DataKeyNames="SubSystemID" AllowSorting="True" Width="100%" EditMode="InPlace"
                    HierarchyDefaultExpanded="true" NoMasterRecordsText="No SubSystems have been created. Create a SubSystem by clicking the green + button above." >
                    <DetailTables>
                        <telerik:GridTableView AllowAutomaticInserts="false" Name="DetailTableView" TableLayout="Fixed" CommandItemDisplay="None"
                            ShowHeader="true" ShowFooter="true" HierarchyLoadMode="ServerBind" EnableHierarchyExpandAll="true"
                            EditMode="Batch" DataKeyNames="SystemRowID" DataSourceID="sdsGrid3" Width="100%"
                            runat="server" NoDetailRecordsText="No Parts in this SubSystem." >
                            <CommandItemStyle HorizontalAlign="Right" />
                            <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" RefreshText="" AddNewRecordText=""
                                CancelChangesText="" SaveChangesText="" />
                            <BatchEditingSettings EditType="Row" />
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="SubSystemID" MasterKeyField="SubSystemID" />
                            </ParentTableRelation>
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="SystemRowID" HeaderText="ID" DataField="SystemRowID"
                                    DataType="System.Int32" ReadOnly="True" SortExpression="SystemRowID" Visible="false" />
 
....(other fields)...
                                <telerik:GridTemplateColumn HeaderText="Flag" SortExpression="Flag" UniqueName="Flag">
                                    <ItemTemplate>
                                        <asp:CheckBox id="cbFlag" runat="server" checked='<%# Bind("Flag") %>' onclick="changeEditor(this);" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:CheckBox ID="cbFlag" runat="server" Checked='<%# Bind("Flag") %>' />
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <input type="checkbox" runat="server" value="check" ID="checkbox" onclick="checkAll();"  />
                                    </FooterTemplate>
                                    <HeaderStyle Width="40px" HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <FooterStyle />
                        </telerik:GridTableView>
                    </DetailTables>
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="SubSystemID" HeaderText="ID" DataField="SubSystemID"
                            DataType="System.Int32" ReadOnly="True" SortExpression="SubSystemID" Display="False" />
 
                        <telerik:GridTemplateColumn HeaderText="SubSystem Name" SortExpression="SubSystemName"
                            UniqueName="SubSystemName">
                            <ItemTemplate>
                                <asp:Label ID="SubSystemName" runat="server" Text='<%# Eval("SubSystemName").ToUpper %>' />
                            </ItemTemplate>
                            <InsertItemTemplate>
                                SubSystem Name: 
                                <telerik:RadTextBox ID="SubSystemName" runat="server" Text='<%# Bind("SubSystemName") %>'
                                    Width="200px" MaxLength="100" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="SubSystemName"
                                    ErrorMessage="SubSystem Name is required." Text="*" />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                SubSystem Name: 
                                <telerik:RadTextBox ID="SubSystemName" runat="server" Text='<%# Bind("SubSystemName") %>'
                                    Width="200px" MaxLength="100" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="SubSystemName"
                                    ErrorMessage="SubSystem Name is required." Text="*" />
                            </EditItemTemplate>
                            <ItemStyle Font-Bold="true" Font-Size="Larger" Width="400px" />
                        </telerik:GridTemplateColumn>
 
                        <telerik:GridTemplateColumn HeaderText="Phase" SortExpression="Phase" UniqueName="Phase">
                            <ItemTemplate>
                                <asp:Label ID="Phase" runat="server" Text='<%# Eval("Phase") %>' />
                            </ItemTemplate>
                            <InsertItemTemplate>
                                Phase: 
                                <telerik:RadDropDownList ID="Phase" runat="server" AppendDataBoundItems="true" DataSourceID="sdsProjectPhases"
                                    DataTextField="Phase" DataValueField="PhaseID" SelectedValue='<%# Bind("PhaseID") %>'
                                    Skin='<%# Session("UserSkin") %>' />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                Phase: 
                                <telerik:RadDropDownList ID="Phase" runat="server" AppendDataBoundItems="true" DataSourceID="sdsProjectPhases"
                                    DataTextField="Phase" DataValueField="PhaseID" SelectedValue='<%# Bind("PhaseID") %>'
                                    Skin='<%# Session("UserSkin") %>' />
                            </EditItemTemplate>
                            <ItemStyle Font-Size="Larger" />
                        </telerik:GridTemplateColumn>
 
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
                            Exportable="false">
                            <ItemStyle Width="40px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" ButtonType="ImageButton"
                            ConfirmText="Are you sure you want to delete this record?" Exportable="false">
                            <ItemStyle Width="23px" />
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowKeyboardNavigation="True" AllowDragToGroup="false" EnableRowHoverStyle="true"
                    AllowColumnsReorder="False" ReorderColumnsOnClient="false">
                    <%--<ClientEvents OnKeyPress="keyPress" />--%>
                </ClientSettings>
            </telerik:RadGrid>
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function checkAll() {
                var grid = $find("<%=RadGrid1.ClientID%>");
                var detailTables = grid.get_detailTables(0);
                setSelectedToAllDataItems(detailTables[1].get_dataItems(), true);
                //var items = grid.get_masterTableView().get_dataItems();
                //for (var i = 0; i < detailTables.length; i++) {
                    //alert(i);
                    //var cb = detailTables.get_dataItems()[i].findElement("cbFlag");
                    //cb.checked = !cb.checked;
                    //checkBox2.checked obj.checked;
                    //setSelectedToAllDataItems(detailTables[i].get_dataItems(), true);
                    //grid.get_batchEditingManager().openRowForEdit(sender.parentElement.parentElement.parentElement);
                //}
            }
            function setSelectedToAllDataItems(dataItems, selected) {
                for (var i = 0; i < dataItems.length; i++) {
                    alert(i);
                    //dataitems[i].get_cell("cbDisplay"), true);
                    //dataItems[i].set_selected(selected);
 
                    var cb = dataItems[1].get_cell("Flag");
                    var checkBox2 = detailTables.get_dataItems()[i].findElement("cbFlag");
                    checkBox2.checked = obj.checked;
                }
            }
 
            function changeEditor(sender, args) {
                var grid = $find("<%=RadGrid1.ClientID%>");
                var batchManager = grid.get_batchEditingManager();
                //grid.get_batchEditingManager().openRowForEdit(sender.parentElement.parentElement);
                grid.get_batchEditingManager().openRowForEdit(sender.parentElement.parentElement.parentElement);
                sender.checked = !sender.checked;
            }
 
            function refreshGrid() {
                var masterTable = $find("<%=radGrid1.clientId%>").get_masterTableView();
                masterTable.rebind();
            }
            function saveGridChanges(sender, args) {
                var grid = $find("<%=RadGrid1.ClientID%>");
                var batchManager = grid.get_batchEditingManager();
                batchManager.saveAllChanges();
                //__doPostBack("btnSaveAll", "");
            }
            function cancelGridChanges() {
                var masterTable = $find("<%=radGrid1.clientId%>").get_masterTableView();
                masterTable.rebind();
            }
        </script>
    </telerik:RadCodeBlock>

Viktor Tachev
Telerik team
 answered on 01 Sep 2015
1 answer
145 views

Hi,

I am using 2015.1.401.40 of your ASP.NET controls for AJAX.

One of my PivotGridColumnField's is a smalldatetime field from SQL Server.

In the PivotGrid column header labels I want the dates to be formatted as MMM-yy,  like Aug-15.

I can accomplish that for the detail columns (the non-aggregate columns) by setting the DataFormatString="{0:MMM-yy}"

But that doesn't affect the label of the column total header.  That header label reads:  "08/01/2015 00:00:00 Total"

Again, my goal is to have it read:  Aug-15 Total

How can I accomplish this?  I can't believe there isn't a property to control it...

I've seen a couple of suggestions where people were told they should change the header text in the CellDataBound Event, but the problem is that in this event I don't seem to have access to the date value.  I have only seen that I can read the current header text which again is a string of a date and the word "Total".

I don't want to strip the word "Total" out of that string and then then convert the date that remains to a string in the date format I want.  We do localization here so I would imagine that if my culture was something other than English, the word "Total" would be translated into another language.

If there isn't a neat and clean way to do this, it seems like a big oversight (missing functionality) on the part of the pivotgrid.

Thanks,

Brent

Angel Petrov
Telerik team
 answered on 01 Sep 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?