Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
118 views
I have tried to follow the demo of radgrid export to excel,but there are some problems.

1.I click the export button,the page refresh and show the table only,no dialogue of  open/save/save as,  to export the file like demo.Please help me,thank you. 

2. ShowExportToExcelButton="true",but the button doesn't display. Can RadToolBarButton cause this? I used RadToolBarButton for ExportToExcel at first.

Shinu
Top achievements
Rank 2
 answered on 27 May 2014
11 answers
208 views
Hi,

When I use my date format on my RadGrid dd-MMM-yy i have on English 17-Apr-14 it's perfect when i export on Excel, he recognizes my date. But when i'm on French i have 17-Avr.-14 and Excel don't regcognized this date.

I want have 17-Avr-14 for have a good export.

Have you got a solution ?

Regards,
Alexandre
Alexandre
Top achievements
Rank 1
 answered on 27 May 2014
17 answers
1.3K+ views
Hello,

I'm experiencing an issue with a page dynamically loading a RadPageView for a RadMultiPage control associated with a RadTabStrip.  The issue is when clicking on a tab the AjaxLoadingPanel displays, when the async is complete the RadPageView is not displayed.  The content remains on the original tab loaded.  I have followed Teleriks example for "Dynamically Load RadPageView".  My code is below.  This code works greate in development, test webserver with medium trust-level, and fails to work in production (GoDaddy shared hosting with medium trust-level).

Also, as a side note.  The RadPageView's are being loaded with RadGrid user controls.  The production paging for a RadGrid causes a page postback, when should load the next page using Ajax.  Again, works great in development and test, but not production.

If the code is changed to allow all tab PageView's to be created in the LoadTabs routine, then all works well except for the RadGrid paging issue.  However, I would like to utilize the dynamic RadPageView load to reduce page load times.

Please review and provide a solution.

Thanks,
Devin D


Form Code
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="button">
        <a class="m2" href="#" onclick="showServicesMenu(event)">services</a>
    </div>
    <div class="block">
        <DTS:CloseButton ID="PageClose" runat="server" SiteContext="www" PageName="Services.aspx" />
        <h1 class="padding1 heading1">Our Services</h1>
        <hr class="hrPageHeading" />
        <p class="padding2 normalText">Please select a tab to view an IT service area details.  Use the arrows to navigate between tabs and service details.</p>
        <div class="padding4">
            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
                   <AjaxSettings>
                       <telerik:AjaxSetting AjaxControlID="rtsServices">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="rtsServices" />
                               <telerik:AjaxUpdatedControl ControlID="rmpServices" LoadingPanelID="LoadingPanel1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                       <telerik:AjaxSetting AjaxControlID="rmpServices">
                           <UpdatedControls>
                               <telerik:AjaxUpdatedControl ControlID="rmpServices" LoadingPanelID="LoadingPanel1" />
                           </UpdatedControls>
                       </telerik:AjaxSetting>
                   </AjaxSettings>
               </telerik:RadAjaxManager>
               <script type="text/javascript">
  
                   function onTabSelecting(sender, args) {
                       if (args.get_tab().get_pageViewID()) {
                           args.get_tab().set_postBack(false);
                       }
                   }
                      
                </script>
            <telerik:RadTabStrip AutoPostBack="false" OnClientTabSelecting="onTabSelecting" ID="rtsServices" SelectedIndex="0" runat="server" MultiPageID="rmpServices" CssClass="tabStrip" Skin="Black" OnTabClick="rtsServices_TabClick" Orientation="HorizontalTop" ScrollChildren="true" ScrollButtonsPosition="Middle" PerTabScrolling="true">
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="rmpServices" runat="server" SelectedIndex="0" OnPageViewCreated="rmpServices_PageViewCreated" ScrollBars="Auto" CssClass="mpItems">
            </telerik:RadMultiPage>
            <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">
            </telerik:RadAjaxLoadingPanel>
        </div>
        <div class="servicesContact">
            <DTS:Contact runat="server" ID="Contact1" />
        </div>
    </div>
</asp:Content>
     

Code Behind
protected void Page_Load(object sender, EventArgs e)
        {
  
            if (!Page.IsPostBack)
            {
                LoadTabs();
                //if (Request.QueryString["s"] != null)
                //{
                    //this.AddPageView(rtsServices.FindTabByText(Request.QueryString["s"].ToString()));
                    //rtsServices.Tabs.FindTabByText(Request.QueryString["s"].ToString()).Selected = true;
                    //rmpServices.SelectedIndex = rtsServices.Tabs.FindTabByText(Request.QueryString["s"].ToString()).Index;
                //}
            }
        }
  
        private void LoadTabs()
        {
            Int32 i = 1;
  
            if (Request.QueryString["s"] == null)
            {
                SqlDataReader reader = service.GetServices();
                while (reader.Read())
                {
                    AddTab(reader["Descr"].ToString());
                    if (i == 1)
                    {
                        AddPageView(rtsServices.FindTabByText(reader["Descr"].ToString()));
                    }
                    i++;
                }
            }
            else
            {
                AddTab(Request.QueryString["s"]);
                AddPageView(rtsServices.FindTabByText(Request.QueryString["s"].ToString()));
            }
        }
  
        private void AddTab(string tabName)
        {
            RadTab tab = new RadTab();
            tab.Text = tabName;
            //tab.SelectedCssClass = "tabStripSelectedCssClass";
            //tab.HoveredCssClass = "tabStripHoveredCssClass";
            rtsServices.Tabs.Add(tab);
        }
  
        protected void rmpServices_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            string userControlName = e.PageView.ID + "ServiceItems.ascx";
  
            Control userControl = Page.LoadControl("/Controls/" + userControlName);
            userControl.ID = e.PageView.ID + "_userControl";
  
            e.PageView.Controls.Add(userControl);
        }
  
        private void AddPageView(RadTab tab)
        {
            RadPageView pageView = new RadPageView();
            pageView.ID = tab.Text;
            rmpServices.PageViews.Add(pageView);
            tab.PageViewID = pageView.ID;
        }
  
        protected void rtsServices_TabClick(object sender, RadTabStripEventArgs e)
        {
            AddPageView(e.Tab);
            e.Tab.PageView.Selected = true;
            //rmpServices.SelectedIndex = rtsServices.SelectedIndex;
        }
Slav
Telerik team
 answered on 27 May 2014
9 answers
90 views
Hi All , 

I have just found one problem with RadTreeView and I'm not sure that there will be workaround for this or not.

I tested it in all main browsers with BOTH Mac and PC .  I found that in Chrome , tree node will never go to edit mode when you click on it second time if you have checkbox in front of them .

here is my code example .

Please give me some advice how to fix this issue.  Thank you you guys in advance. 
<telerik:RadTreeView ID="RadTreeView2" Runat="server" CheckBoxes="true" AllowNodeEditing="True" >
 <Nodes>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode1">
                </telerik:RadTreeNode>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode2">
                </telerik:RadTreeNode>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode3">
                </telerik:RadTreeNode>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode4">
                    <Nodes>
                        <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 1">
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 2">
                        </telerik:RadTreeNode>
                        <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 3">
                          </telerik:RadTreeNode>
                    </Nodes>
                </telerik:RadTreeNode>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode5">
                </telerik:RadTreeNode>
                <telerik:RadTreeNode runat="server" Text="Root RadTreeNode6">
                </telerik:RadTreeNode>
            </Nodes>
</telerik:RadTreeView>
Magdalena
Telerik team
 answered on 27 May 2014
1 answer
287 views
Hi Team.
We have a scenario where we want to conditionaly hide the detail tables. Below is our structure and we need to hide the childHeader and childRow. 
.aspx
<telerik:RadGrid>
 <MasterTableView >
    <DetailTables>
      <telerik:GridTableView name="Parent">
      </telerik:GridTableView >
    </DetailTables>
<DetailTables>
      <telerik:GridTableView  name="ChildHeader">
         <DetailTables>
            <telerik:GridTableView  name="ChildRow">
           </telerik:GridTableView >
        </DetailTables>
    <telerik:GridTableView >
</DetailTables>
</MasterTableView>
</telerik:RadGrid>


.cs

 protected void radgrid_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
    {
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
        switch (e.DetailTableView.Name)
        {
            case "ParentRow":
                {
                    //code for parentrow detail table here
                }
            case "ChildHeader":
                {
                   //code for ChildHeader detail table here
                    break;
                }
            case "ChildRow":
                {
                    //code for ChildRow detail table here
                    break;
                }
        }
Now, DetailTableDataBind method iterates on each detailTable, Is it possible to remove the detailtable so that it does not even render and code in DetailTableDataBind method for childHeader and childRow does not execute. Right now its erroring when it goes in these case statements.
So the requirement is to hide these detail tables conditionally and not execute the code for child header and chidRow in above case statement
Kostadin
Telerik team
 answered on 27 May 2014
1 answer
111 views
Hey all,

I have a time picker control that allows me to pick a time from a set of business hours. Normally, those hours run from around 9AM until (at the latest) 10PM. Since the times appear within the same day, there is no problem. Occasionally, however, our business hours go until around 3AM. 

I can set the min/max times well enough. The control renders the time blocks (every 30 minutes) appropriately, but I cannot select or enter any time past midnight (Even though the times are rendered in the control). I can validate that the selected time falls between the established min/max date-time during the OnSelecting event but it still throws an error and prevents the time from being selected.

How do i get around this? This is a pretty significant business need for us, and i would hate to have to render the control based upon what the current time is, especially since our business folks may have to go back and enter data retroactively.

Help?

Sean Williams
Software Developer
Seaworld Parks & Entertainment
Angel Petrov
Telerik team
 answered on 27 May 2014
2 answers
55 views
i have a radgrid with detailtable that contains columns with checkbox,
main grid contains only one column for grouping.
i use DetailTableDataBind to bind nestedgrid,

what i want is to put a global checkbox inside main grid to check all boxes inside all detail tables at once , for each column inside nestedtable 

how to achieve that ?



Radoslav
Telerik team
 answered on 27 May 2014
1 answer
266 views
I have a RadGrid in batch model (EditMode = "Batch") in <CommandItemTemplate> have a button (SAVE) that calls a javascript function that will call the get_batchEditingManager () method saveChanges (mastertableview);., and server side I I'm Telerik.Web.UI.GridBatchEditingEventArgs function well, the code is working correctly, however, if the server side function of an error, the postback happens and I lose the information that was added on the client. 
How do I not lose this information on the client side if my GridBatchEditingEventArgs server side of an error?

Eyup
Telerik team
 answered on 27 May 2014
5 answers
183 views
Hi

I've a RadTreeview inside a Radcombobox, and it can be quite long. Is it possible to retain the scroll position when a new value is required. Currently the user is taken to the top of the tree, the current selected node is highlighted, but I'd like to start scrolling from the current selected node.

Andy
Shinu
Top achievements
Rank 2
 answered on 27 May 2014
6 answers
163 views
Hi everyone,
I have a problem. I want to use scroll zoom in RadHtmlChart (with line or scatter line series) but I not to want extra control as this link
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/datanavigation/defaultcs.aspx ,

How to use only scroll in radHtmlChart with Line series?
ahmet
Top achievements
Rank 1
 answered on 27 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?