Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
156 views
Hi,

I'm using the Trial version of Telerik for development of a web App and decided to buy it. I see in the details of the purchase there is the source code of the controls and I want to know to what extent I will be able to modify the Chart component.

What I need in my application is to generate a chart with interpolated values, and every time the chart is zoomed the data need to be re-interpolated. This is something I couldn't achieve with RadChart.

The question is, there is a way to achieve this functionality modifying the source code of the RadChart by myself or the way it's implemented don't allow this.

Thanks in advance,

Simón de Lizarza
Vladimir Milev
Telerik team
 answered on 28 Sep 2009
3 answers
164 views
Hi,

I'm using the asp.net radgrid in a project and I'm using the autogenerate columns feature. Now, I'd like to add a column to the autogenerated ones, and it needs to be the last column in the grid.

I can add a first column declaratively, but is there any way to add a last column?

Thanks.

Stefan
Martin
Telerik team
 answered on 28 Sep 2009
2 answers
194 views
Hello !
In our project I am considering using your Treeview component in several places. (for different purposes) as I like the functionality it provides. However there is one issue I need input/help on.

When using your Treeview in a Master/Content page context where the treeview component resides in the masterpage and navigates the user to different aspx pages (A very typical scenario IMO), you would loose the viewstate (because the page navigation is a GET not a POST) which would case the treeiview to loose its state each time I navigate in it. Obviously I want the treeview to keep its state between GET's (and not only postbacks which is easy enough).

Any suggestions for solving this case ? I have seen that Gaiaware treeview can persist state in cookies, is there any similar functionality on this treeview component to keep client state between GETS ?

I guess I could use page_load to find the node being loaded (finding the current node by comparing the navigation attribute of the page requested URL and then selecting it server side ?) but is this how it' supposed to be done.

Thanks, Johan
johan ekman
Top achievements
Rank 1
 answered on 28 Sep 2009
2 answers
149 views
Hi,

I'm using the editor with image\flash\media manager. Works great, but I dont know how to accomplish the following:

When a user uploads a file, I want to assign the uploaded file a unique name (like a guid) . This to prevent overwriting existsing files. (user WILL check "overwrite if file exists", without caring about others useing that file.)

eg. someone uploads logo.gif, I want it to be saved as 1234567890_logo.gif

any ideas? Other methodes that lead to the same result in overwite protection are also welcome.

Thx.
it-workz
Top achievements
Rank 1
 answered on 28 Sep 2009
6 answers
370 views
I have the following Rotator Markup:

<telerik:RadRotator ID="rotGallerySlide"   
                        runat="server"   
                        Height="400px" 
                        Width="500px"   
                        ItemHeight="400px" 
                        ItemWidth="500px" 
                        RotatorType="FromCode" 
                        OnClientItemShowing="slideShowingHandler_GPC" 
                         > 
            <ItemTemplate> 
                some templated controld  
            </ItemTemplate> 
</telerik:RadRotator> 

<

 

asp:Button ID="btnFirst" runat="server" Text=" << " OnClientClick="navigate_GPC('First'); return false;" style="margin:0px 5px;" /><asp:Button ID="btnBack" runat="server" Text=" < " OnClientClick="navigate_GPC('Back'); return false;" style="margin:0px 5px;" /><asp:Button ID="btnNext" runat="server" Text=" > " OnClientClick="navigate_GPC('Next'); return false;" style="margin:0px 5px;" /><asp:Button ID="btnLast" runat="server" Text=" >> " OnClientClick="navigate_GPC('Last'); return false;" style="margin:0px 5px;" />

 


and the following Javascript:

window.onload = function() {  
                 setTimeout(function() {  
                    var firstImg = document.getElementById("<%= btnFirst.ClientId %>");  
                    var backImg = document.getElementById("<%= btnBack.ClientId  %>");  
                    firstImg.disabled = true;  
                    backImg.disabled = true;  
                 }, 100);  
             }  
               
        function navigate_GPC(navType) {  
            var rotator = $find("<%= rotGallerySlide.ClientID %>");  
 
            switch (navType) {  
                case "First":  
                    break;  
 
                case "Back":  
                    rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right)  
                    break;  
 
                case "Next":  
                    rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left)  
                    break;  
 
                case "Last":  
                    break;  
 
            }  
              
        }  
 
        function slideShowingHandler_GPC(sender, args) {  
 
            var firstImg = document.getElementById("<%= btnFirst.ClientId  %>");  
            var backImg = document.getElementById("<%= btnBack.ClientId  %>");  
            var nextImg = document.getElementById("<%= btnNext.ClientId  %>");  
            var lastImg = document.getElementById("<%= btnLast.ClientId  %>");  
 
            firstImg.disabled = false;  
            backImg.disabled = false;  
            nextImg.disabled = false;  
            lastImg.disabled = false;  
           
            var count = sender.get_items().length;  
            var currentIndex = args.get_item().get_index() + 1;  
 
 
            

if

 

(!sender.isScrollingForward()) {

 

if (currentIndex == 0) {  
                firstImg.disabled = true;  
                backImg.disabled = true;  
            } }  
              
            if (currentIndex == count - 1) {  
                lastImg.disabled = true;  
                nextImg.disabled = true;  
            }  
 
        } 

First off, the back and First buttons are disabled when the page loads because the user will be on the first "slide". Then I handle the button OnClientClick and, depending on the parameter passed to the handler, I navigate through the Rotator.

Is there a way for me to wire up the "First" and "Last" buttons? I have looked high and low on the telerik site for a way to set the currentIndex of the rotator, but to no avail.

Question 2) I have encountered some strange behavior. I use the rotator ItemShowingHandler to determine the current item index. If it is the first item, I want to disable the "Back" and "First" buttons. If it is the last item, I want to disable the "Next" and "Last" buttons. My code seems to work fine, however what happens is the following. After the page loads, If I click on the "Next" button, everything works as expected. The rotator moves to the second slide, and the "Back" and "First" buttons are enabled. However, if I proceed to click on "Back", a postback occurs. I don't see how this is possible in my code, since I set return false; in the button onClientClick attribute. I notice that if I don't set the button disabled property in the Window on load event, then the postback doesn't occur. The postback occurs whether I set the disabled property in window onload or in code behind in the page load event. Is there something about  disabling a button during page load that screws up the OnClientClick Event? Is there another point in which I can disable the buttons to avoid this prior to the page being shown?
Fiko
Telerik team
 answered on 28 Sep 2009
2 answers
69 views

Hi!

I've noticed that when I have an ajaxified ASP.Net TextBox next to some characters, the Textbox will insert a space before the adjacent characters. Right after the first ajaxified postback, the space disappears. This makes my UI to move a space to the side when the user provokes the first partial postback.

Code example here:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Button1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="txtRecord" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
    <asp:Button ID="Button1" runat="server" Text="Button" /> 
    <asp:TextBox ID="txtRecord" runat="server" Width="22px" Text="0" />| 
    <%-- !!! Atention to the vertical bar right after the textbox! !!!--%> 

How can I make the space introduced by the rendered div panel of the ajaxification disappear?


Regards,

Rodrigo S.
Pavlina
Telerik team
 answered on 28 Sep 2009
1 answer
107 views
HI,

I save blank date using date plicker. When i retrive date from using  '<% Bind("DateP")%>' it show  1900,01,01. I want stop that. If date blank i want show blank space. How can i do that?  Before save its show blank dates. But when i save some data with blank dates its show that date

lakmal
Martin
Telerik team
 answered on 28 Sep 2009
2 answers
123 views
I have a page with a grid I want to export to Excel (client side) via a button.

I got it working easily on a test page.
Drop a grid, populate it with data
add a button as follows
    <asp:Button ID="btnExportExcelClient" runat="server" Text="btnExportExcelClient" 
      OnClientClick="javascript:ExportToExcel();return false;" /> 
and the javascript below
        function ExportToExcel() {  
          var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView();  
          masterTable.exportToExcel();  
        }  
 

So far so good.

My "real life" page is a bit more complex...

The page is a kind of "generic report" page. I pass it a report number on the URL and it shows the various prompts and parameters related to this report.
Once the parameters entered, the user presses a button and I fire a sql server stored procedure that returns one or more "recordsets". Each recordset is shown as a grid with a couple of buttons under the grid allowing (I hope!) to export that particular grid in excel, word or CSV.
I don't do anything fancy with the grid. I had "myGrid.EnabledViewState = false" but I even removed that.
I have not setup any ExportSettings because I think this is required by the Server Side export only.

Since i can have more than one grid on the page, I pass it's clientId to the javascript call, which looks like
      function ExportToExcel(radGridId) {  
        var masterTable = $find(radGridId).get_masterTableView();  
        var result = masterTable.exportToExcel();  
        alert (result);  
      } 

The alert shows me that masterTable.exportToExcel() returns False.

Any idea what I might be doing wrong?

Many Thanks

Eric


Eric
Top achievements
Rank 1
 answered on 28 Sep 2009
2 answers
266 views
We are testing the Captcha control on one of our pages. It sometimes appears as a grey box, but hitting refresh sometimes clears this up.

Could this occur since we are running it currently in an unlicensed format? We are looking to evaluate & test the product before purchase.

My code looks like so:

<telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="The text you entered does not appear to match." CaptchaTextBoxLabel="" ImageStorageLocation="Cache"></telerik:RadCaptcha>
Pero
Telerik team
 answered on 28 Sep 2009
6 answers
175 views
Hello

I have my page set up very simply. All of the controls on the page except the top menu and page title are inside an asp.net panel.
All of the controls in the panel that perform a postback are set up via the ajax manager to trigger an ajax postback where the target control is the panel itself. The page is set up to use a default loading panel which is used by every control that can trigger a postback.

One of the controls inside the panel is 'not working.' This is a third party control. When you click a control to trigger postback, the loading panel is displayed and all of the controls inside the panel 'disappear' except this third party control. When the postback is finished, the page is displayed and all of the other controls are visible except now the third party control has gone.

The third party control is from aspmap. It consists of a map object which displays a map and a toolbar object which zooms and pans the map. The map control works perfectly. It is the zoombar control that isn't working

Any help is much appreciated
Pavlina
Telerik team
 answered on 28 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?