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

Hello there,

I try to access the function GetRadWindowManager() from my app.ts file.

I added the telerik definitions files and I cannot find a way to call "window.GetRadWindowManager()" or "window.top.GetRadWindowManager()" because the definition is not found...

How can I call that function without errors ?

Thanks for your help !

Brice.
Hamza
Top achievements
Rank 1
 answered on 27 Jun 2016
7 answers
187 views

Hi,

I have an error when I use RadNavigation in the CommandItemTemplate of a RadGrid. I'm using NodeTemplates to nest RadButtons and RadCheckboxes. It works perfectly in desktop mode, but as soon as I reduce the browser to collapse to mobile mode, the nested controls will fire their codebehind okay but then the RadNavigation hangs open and a second click reports a JSON error. I have a couple of days of brain-fade on this now so any help would be greatly appreciated before I start looking for a different approach. It would be a shame if there isn't a way to get this to work because I love the responsiveness of the RadNavigation control. Please see below:

 

My CommandItemTemplate:

</Columns>
<CommandItemTemplate>
<table style="width: 100%">
<tr>
<td style="padding-right: 20px; padding-left: 5px">
<span style="font-size: 16pt"><strong><asp:Label ID="Label2" runat="server" Text="<%$Resources:Resource, PagePackagingTitle %>"></asp:Label></strong></span>
</td>
<td style="width: 100%; text-align: right;">
<telerik:RadNavigation ID="RadNavigation2" runat="server" RenderMode="Auto" Skin="Bootstrap">
<Nodes>
<telerik:NavigationNode ID="NavigationNode10" runat="server">
<NodeTemplate>
<telerik:RadButton ID="RadButton1" runat="server" Text="Refresh" CommandName="RebindGrid" Skin="Bootstrap" Width="120px" Icon-PrimaryIconUrl="~/images/site/new2/Refresh.png"></telerik:RadButton>
</NodeTemplate>
</telerik:NavigationNode>
<telerik:NavigationNode ID="NavigationNode11" runat="server">
<NodeTemplate>
<telerik:RadCheckBox ID="RadCheckBox1" runat="server" BackColor="<%$ AppSettings:bcCurrent %>" Text="Current" Width="120px" Checked="True" OnCheckedChanged="RadCheckBox1_CheckedChanged">
</telerik:RadCheckBox>
</NodeTemplate>
</telerik:NavigationNode>
<telerik:NavigationNode ID="NavigationNode12" runat="server">
<NodeTemplate>
<telerik:RadCheckBox ID="RadCheckBox2" runat="server" BackColor="<%$ AppSettings:bcObsolete %>" Text="Obsolete" Width="120px" OnCheckedChanged="RadCheckBox2_CheckedChanged">
</telerik:RadCheckBox>
</NodeTemplate>
</telerik:NavigationNode>
<telerik:NavigationNode ID="NavigationNode13" runat="server">
<NodeTemplate>
<telerik:RadCheckBox ID="RadCheckBox3" runat="server" BackColor="<%$ AppSettings:bcPkgCancelled %>" Text="Cancelled" Width="120px" OnCheckedChanged="RadCheckBox3_CheckedChanged">
</telerik:RadCheckBox>
</NodeTemplate>
</telerik:NavigationNode>
</Nodes>
</telerik:RadNavigation>
</td>
</tr>
</table>
</CommandItemTemplate>
</MasterTableView>

 

My Error:

Invalid JSON primitive: .Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Invalid JSON primitive: .

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[ArgumentException: Invalid JSON primitive: .] System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() +578 System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +235 System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +79 System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +37 Telerik.Web.UI.RadButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +184 Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +16 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +758 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2570

 

Thanks,

Craig

Veselin Tsvetanov
Telerik team
 answered on 27 Jun 2016
1 answer
108 views

When we are looking at a schedule with a recurring event from 1am to 3am Sunday to Tuesday, the overflow icons showing only on Monday and Tuesday.  It doesn't show up on Sunday.  See attached image as example.

Is there a way to do this?

Peter Milchev
Telerik team
 answered on 27 Jun 2016
2 answers
408 views
Do you have an example of how to pass in an argument (for example an image name) from a javascript function to a radlightbox when it opens?  I want to do something like the below, where the onmouseover in the <img src opens the lightbox if I hard code the value in the <asp:Image.
I need to load different images on different img src tags so I thought passing the image name via the funcion was the cleanest way to do so. 

Is this the best way to do this:
http://www.telerik.com/forums/parameterized-lightbox-show()-functions---how-to-do-it

The disadvantage is that it looks like every image is loaded when the page is rendered, I was hoping it load the image dynamically.
Thanks for your help!



<script type="" >
function loadlb(imageName) {
        var rbx = $find('<%= rlbBox.ClientID %>');
        rbx.show();
}
</script>

<telerik:RadLightBox Modal="true" RenderMode="Auto" ClientIDMode="Static" ID="rlbBox" runat="server" ShowCloseButton="true">
        <ClientSettings><AnimationSettings></AnimationSettings></ClientSettings>
        <Items>
            <telerik:RadLightBoxItem>
                <ItemTemplate>
<asp:Image runat="server" ImageUrl="<image_from_loadlb>"/> 
                </ItemTemplate>
            </telerik:RadLightBoxItem>                 
        </Items>
</telerik:RadLightBox>


<img src=<some image> onmouseover="loadlb('imageToLoad'.jpg')" >
mack
Top achievements
Rank 1
 answered on 27 Jun 2016
3 answers
221 views

I have the following two RadListBoxes defined to allow switching items between them. All was well until I defined OnInserted and OnDelted, which fail to fire.

I  need to take action when anything is added to or removed from the right list box. This is they only way I'm aware of doing it, but like I said the events don't fire.

Here's the associated code:

<telerik:RadListBox runat="server" ID="rlbxAvailableRoles" Height="210" Width="230" AllowTransfer="true" TransferToID="rlbxSelectedRoles"
    ButtonSettings-AreaWidth="35px" AllowTransferOnDoubleClick="true" ButtonSettings-ShowTransferAll="false">
    <HeaderTemplate>
        <h3>Available Roles</h3>
    </HeaderTemplate>
</telerik:RadListBox>
<telerik:RadListBox runat="server" ID="rlbxSelectedRoles" Height="210" Width="190" EmptyMessage="Select at least one role"
    OnInserted="rlbxSelectedRoles_Inserted" OnDeleted="rlbxSelectedRoles_Deleted">
    <HeaderTemplate>
        <h3>Selected Roles</h3>
    </HeaderTemplate>
</telerik:RadListBox>

protected void rlbxSelectedRoles_Inserted(object sender, RadListBoxEventArgs e)
{
    LoadPrimaryRoleDropdown();
}
 
protected void rlbxSelectedRoles_Deleted(object sender, RadListBoxEventArgs e)
{
    LoadPrimaryRoleDropdown();
}

 

 

Any help would be appreciated

Ivan Danchev
Telerik team
 answered on 27 Jun 2016
3 answers
823 views
Hi,
I would like to edit a gridhyperlinkcolumn's navigateurl in my code behind. I have tried:
RadGrid grid = (RadGrid)sender;
GridColumn column = grid.Columns.FindByUniqueName("ViewBus");
(column as GridHyperLinkColumn).NavigateUrl = "www.google.ca";


in both the PreRender and DataBound events. Any suggestions?
Eyup
Telerik team
 answered on 27 Jun 2016
1 answer
126 views

Hi, 

I have Activity object which has childActivity which is a dynamic data type.

DataSource to grid is list of Activity.

How can assign few columns of grid with values of child object.

I was trying like below code.

 col.UniqueName = item.Name;

col.HeaderText = item.DisplayName;
(col as GridDateTimeColumn).DataField =  Activity.childActivity.Name;

 

Viktor Tachev
Telerik team
 answered on 27 Jun 2016
1 answer
157 views

Here is my code:

 

function RadGrid1_Command(sender, args) {
               var commandName = args.get_commandName();
               if (commandName == "RebindGrid")
               {                  
                   var editedrow = args.get_itemIndexHierarchical();

                   //var itemIndex = args.get_commandArgument();

                   var master = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
 
                   $.ajax({
                       type: "POST",
                       url: "Default.aspx/...",
                       data: "{year: 1}",
                       contentType: "application/json; charset=utf-8",
                       dataType: "json",
                       success: function (data) {
                           var response = data.d;
                           alert(response.message);
                       }
                   });
               }               
           }

I can't get the row index from get_itemIndexHierarchical() (JS error function does not exist). Also get_commandArgument() is blank if  I try that.

 

Can anyone help?

Viktor Tachev
Telerik team
 answered on 27 Jun 2016
9 answers
1.0K+ views
I upload a document and click a button, I want to get the file name under temporary folder for the uploaded document.How can I get it?
Plamen
Telerik team
 answered on 27 Jun 2016
9 answers
644 views
Hello!

i try to use the Colorpicker inside a FormView and want to bind property SelectedColor to SqlDataSource using the following code:
<telerik:RadColorPicker ID="colpickschedule_color" runat="server" Preset="Standard"
 ShowIcon="True" SelectedColor='<%# Bind("color") %>'>
</telerik:RadColorPicker>
when opening the form it says "specified cast is not valid".. this happanes when field in database contains some hex-color as string (#cacaca) and for DbNull-Values...

also tried something with ColorTranslator, but this only works for displaying data, null values throws some other errors..

can someone please explain how to do this? thank you!
achim
Peter
Top achievements
Rank 1
 answered on 25 Jun 2016
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?