Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
425 views
Hello,

When the tab key is used to navigate through the controls on a web page that contains a RadEditor, when the RadEditor is reached the toolbar buttons are activated before the editor itself.  Is there a way to have the editor activated before the toolbar buttons?

Thanks,
Craig
Rumen
Telerik team
 answered on 16 Jul 2012
3 answers
181 views
Hi,

I have a combobox that need to have its items populated based on the results from a web service. I did try the below and could not get it working. Help appreciated.

<telerik:RadComboBox ID="radTestCombo" runat="server"  EnableLoadOnDemand="true"
     EnableItemCaching="true" WebServiceSettings-UseHttpGet="true" OnClientLoad="GetServers" Label="Servers">
</telerik:RadComboBox>

Below is the javascript i use to get the information from a web service.

function GetServers(sender, eventArgs) {
                combo = sender;
                combo.trackChanges();
                $.ajax({
                    url: "http://localhost/sampleservice/sample.svc/GetAll",
                    dataType: 'json',
                    type: "GET",
                    success: function (data) {
                        alert('success');
                        $.each(data, function (i, val) {
                            var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                            alert(comboItem);
                            comboItem.set_text(val.toString());
                            combo.get_items().add(comboItem);
                        });
                    }
                });
                combo.commitChanges();
                alert(combo.get_items().get_count());
            }

The alert with "success" message is never called but from fiddler i get a 200 Http status code. The WCF service method returns a list of string. Below is the raw response from fiddler:

HTTP/1.1 200 OK
Content-Length: 602
Content-Type: application/json; charset=utf-8
Date: Thu, 12 Jul 2012 15:34:46 GMT
 
["John","Smith","Charlie","DAVID","James","Bond"]

Additionally i did remove the dataType setting in the ajax call and resulted in the same. Also  i did add an error setting with an alert and have this popup on my screen even though Fiddler reported a 200 OK status with the data.
Jerry T.
Top achievements
Rank 1
 answered on 16 Jul 2012
1 answer
45 views
Hi all, 

I have a skinning problem with RadButton in IE, but not in FF and Chrome.
The RadButton right side picture is shifted for 20px and I cannot find out why. 
Can you give me a hint what to check.

I am using RadAjax version 2011.2.712.35 within DNN.
I would post the html code, but the zip. extension is not allowed ;(


Thank you, 
Kristijan

Kristijan
Top achievements
Rank 1
 answered on 16 Jul 2012
2 answers
692 views
Hi

I have a very large rad grid and when a user clicks edit on the grid I make a radwindow pop up from the code behind (the reason I do it from the code behind is because I need to do some serverside stuff to populate the radwindow).
This works fine, but when a button is clicked in the radwindow the page posts back, the window closes and the pages scrolls back to the top. I don't mind the window closing, but I need it to stay at the same scroll position.
I have tried to add the javascript on this page: http://www.telerik.com/support/kb/aspnet-ajax/window/persist-radwindow-s-scroll-position.aspx but it doesn't work.
I have wrapped the whole page in an ajax panel and I have just tried added an ajax panel in the rad window, none of which work.

The radgrid and radwindow are in a user control.
I'm not sure what else to try?
Can anyone help?

I have isolated this into a very basic page and here is my code:

Webusercontrol1:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs"
    Inherits="TestRadWindow.WebUserControl1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadScriptManager runat="server">
</telerik:RadScriptManager>
<script type="text/javascript">
    var body = document.body;
    var docElem = document.documentElement;
    var bodyScrollTop = 0;
    var bodyScrollLeft = 0;
    var docElemScrollTop = 0;
    var docElemScrollLeft = 0;
    function OnClientBeforeClose(sender, args) {
        bodyScrollTop = body.scrollTop;
        bodyScrollLeft = body.scrollLeft;
        docElemScrollTop = docElem.scrollTop;
        docElemScrollLeft = docElem.scrollLeft;
    }
    function OnClientClose() {
        setTimeout(function () {
            body.scrollTop = bodyScrollTop;
            body.scrollLeft = bodyScrollLeft;
            docElem.scrollTop = docElemScrollTop;
            docElem.scrollLeft = docElemScrollLeft;
        }, 30);
    }
    function OpenWnd() {
        $find("wnd").show();
    }
</script>
<telerik:RadAjaxPanel runat="server">
    <telerik:RadWindowManager runat="Server" ID="RadWindowManager1" EnableViewState="false">
        <Windows>
            <telerik:RadWindow runat="server" ID="winEdit" Width="300px" Height="450px" ReloadOnShow="true"
                ShowContentDuringLoad="false" Modal="True" Behaviors="Close, Move" VisibleTitlebar="true"
                VisibleStatusbar="false" AutoSize="True" KeepInScreenBounds="True" OnClientBeforeClose="OnClientBeforeClose"
                OnClientClose="OnClientClose">
                <ContentTemplate>
                    <asp:Button runat="server" ID="btnSave" Text="button" />
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadGrid runat="server" ID="grdTest" AutoGenerateColumns="False" EnableLinqExpressions="False"
        OnNeedDataSource="grdTest_NeedDataSource" Width="200px" CellSpacing="0" GridLines="None">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn runat="server" DataField="Id" />
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lnkEdit" OnClick="lnkEdit_Click" Text="Edit" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid></telerik:RadAjaxPanel>

My user control code behind:
protected void Page_Load(object sender, EventArgs e)
       {
 
       }
 
       protected void grdTest_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {
           List<TestBind> binding = new List<TestBind>();
          for(int i=0;i<=500; i++)
          {
              TestBind t = new TestBind();
              t.Id = i;
              binding.Add(t);
          }
 
           grdTest.DataSource = binding;
       }
 
       protected void lnkEdit_Click(object sender, EventArgs e)
       {
           string script = "function f(){var win=$find(\"" + winEdit.ClientID + "\"); " +
                         " win.show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
           winEdit.VisibleOnPageLoad = true;
           ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
       }
 
       class TestBind
       {
           public int Id { get; set; }
       }
   }

My webform:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestRadWindow.WebForm1" %>
 
<%@ Register src="WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <uc1:WebUserControl1 ID="WebUserControl11" runat="server" />
     
    </div>
    </form>
</body>
</html>


Any help  would be appreciated as I have spent hours on this now.

Bex
Steve
Top achievements
Rank 1
 answered on 16 Jul 2012
1 answer
131 views
Hi Telerik team,

We have an issue with image manager in the editor. When we refresh page or save image, it throws error message.

Details :

1. we use Web Farm
2. telerik product version : 2012.1.411.40
3. the issue is not browser specific
4. random happens but not always
5. error message ( please see the attachment )
    "System.NullReferenceException: Object reference not set to an instance of an object.
     at Telerik.Web.UI.ImageEditor.ImageEditorCacheHandler.SendImage"


Please help us out.

Thanks,

Lan
Rumen
Telerik team
 answered on 16 Jul 2012
1 answer
209 views
Hi,

Is there a way to show the date picker control as a quarter picker?  I have requirements to allow the user to pick a date by quarter.

Thanks,
Princy
Top achievements
Rank 2
 answered on 16 Jul 2012
3 answers
262 views
hi
i used the below code to show rad window
<telerik:RadWindowManager EnableShadow="false" VisibleTitlebar="false" VisibleStatusbar="false"
        Behaviors="Close, Move" ID="RadWindowManager" DestroyOnClose="true" KeepInScreenBounds="true"
        EnableAriaSupport="false" RestrictionZoneID="RestrictionZone" runat="server"
        Width="300" MinHeight="200">
        <Shortcuts>
            <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc" />
        </Shortcuts>
        <Windows>
            <telerik:RadWindow ID="RadWindow1" BorderColor="Gray" BorderWidth="20px" VisibleOnPageLoad="true"
                Modal="true" runat="server">
                <ContentTemplate>
                    <p>
                        <telerik:RadTextBox ID="RadTextBox1" runat="server">
                        </telerik:RadTextBox>
                    </p>
                    <p>
                        <telerik:RadTextBox ID="RadTextBox2" runat="server">
                        </telerik:RadTextBox>
                    </p>
                     
                    <div style="height: 200px">
                    </div>
                    <p>
                        <telerik:RadTextBox ID="RadTextBox3" runat="server">
                        </telerik:RadTextBox>
                    </p>
                    <p>
                        <asp:Button ID="Button1" runat="server" Text="Button" />
                    </p>
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>



I need to add vertical space between the control, so i added <div style="height: 200px"> , then the window's height is not automatically increasing rather scroll bar is showing. how to add vertical space and automatically adjust height without showing scroll bar?
any help?
also how to set the border color for rad window?

i am using telerik  version : 2012.1.215
thanks in advance

Jiju
Shinu
Top achievements
Rank 2
 answered on 16 Jul 2012
3 answers
179 views
I am having an issue with set_cancel firing

 

 

<telerik:RadDatePicker runat="server" ID="DateNeededDP">
<
ClientEvents OnDateSelected="DateSelected" />
</
telerik:RadDatePicker


<telerik:RadDatePicker runat="server" ID="EffDateDP" >
<
ClientEvents OnDateSelected="DateSelected" />
</
telerik:RadDatePicker>

 

<telerik:RadDatePicker runat="server" ID="EndDateDP">
<
ClientEvents OnDateSelected="DateSelected" />
</
telerik:RadDatePicker>

 

 

function DateSelected(sender, eventArgs) {

    formdirty();

    var node = sender.get_id().substr(sender.get_id().indexOf("_MainContent_") + 13);

    if (node == "EndDateDP") {

        var datePicker = $find("<%= EffDateDP.ClientID %>");

        var effdate = datePicker.get_selectedDate();

        var enddate = sender.get_selectedDate();

        if (enddate <= effdate) { 
                    eventArgs.set_cancel(true);

                    alert("End Date must be greater than Effective Date");

                }

        }

         if (node == "EffDateDP") {

        var datePicker = $find("<%= EndDateDP.ClientID %>");

        var enddate = datePicker.get_selectedDate();

        var effdate = sender.get_selectedDate();

        if (enddate <= effdate) { 
                    eventArgs.set_cancel(true);

                    alert("Effective Date must be less than End Date");

                }

        }

    if (node == "DateNeededDP") { 
        var Neededdate = sender.get_selectedDate();

        var today = new Date();

        if (Neededdate < today) {

                    eventArgs.set_cancel(true);

                    alert("Needed Date must be greater than Today");

                }

        }

}


The alerts fire correctly but it is not canceling the selected date.  And help would be great.

Princy
Top achievements
Rank 2
 answered on 16 Jul 2012
1 answer
98 views
Can anyone please help me convert my grid to a radgrid.

Finally got it to work by using the telerik documentation page...
Princy
Top achievements
Rank 2
 answered on 16 Jul 2012
2 answers
190 views
HI all,

 I have a radgrid and binary image. when i select a radgrid row by using Up/Down arrows the image need to be populate with respective of that particular row. which event i can use for achieve my goal.


Regards,

Prassin
Prassin
Top achievements
Rank 1
 answered on 16 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?