Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
239 views
Is there a way to upload an image into a RadUpload control programatically?

I am prefilling user data on a form, one of the fields is an RadUpload image control, and I would like to pre-populate this field with an image.

thanks.
Rahul Gupta
Top achievements
Rank 1
 answered on 08 Nov 2012
2 answers
115 views

I have an impelentation of the sharepoint radeditor in my shrepoint site.
This site has SSL implementation and redirects the page into https:// 

When firing dioalogs the error i get is : 

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager


but once i open de javascript debugger I get errors like this: 

  1. Unsafe JavaScript attempt to access frame with URL http://mysite/_wpresources/RadEditorSharePoint/6.1.6.0__1f131a624888eeed/Resources/Telerik.Web.UI.DialogHandler.aspx?DialogName=LinkManager&Skin=Default&Title=Hyperlink%20Manager&doid=25b5064f-a6b8-46af-9a6b-1129da699eea&dpptn=&dp=amEBLBhZTVkWbwEobRFnWGwRanMfbHsqZnAXByR%2FZUpZdBBeUQZIAx1hOk8ZYk9JdHBmPSVjYAIWbwUpbitNX2QRCVkcY2ctaRQXZicKX0VbSj51bBJIPh5lNU8Pd2pKXGFhcxdzY0YeYHoxVj8AdlcRfkMkBlEDaRQfQiRVXwBZZH9HeS5iNB1hOkMZAGoGW3FiCxhjBFkIfWopVQ57X3oCeUMQX1ERUHI1axVWcVhdZxBrYilUDiBgGGMiAm5gbgd%2BMxtxVgAhbUgzYih3aWB1UAIRXncJVy4PRxNWX1l1XS4EYQJEcCdxCEEndA1pbkxiKxZef2IhbnoJVQFdWmQ8VEUScXsFZRU1aiN%2FS1paZD5LYQJILyZwLkUNZ2JnbQVQKhdZBGIhb304VQ5vWlcsegUSYWcAVgY9QxVgZX9dWBAHYQJACgljOnESWmpYbgVTMxtyXX4mfnIZeRFNWGEAcgURYlF1UHMpdRdSdWpaay5FYhFydCZxFGIWX2JbdVpudRRyZ3MhbQEZYCtdUmABdQASYmccfhUpRhRgQ1FqdQMLenVIMh0EBEYiaUhbXHFYMiNYd10gf1cyZStzQFV0bUMLd0JxYRstAhxgeUVhZD53VBJ2NyYEJk8Wdn4DWXVMAxhjTU8ea0c2ewJBfm8RDV4iY3MoaRA9dR9vS0piYDFFeQNAHAp%2BEGIVWggK from frame with URL https://mysite/admin/Pages/SpecialOffersForm.aspx?ID=034a2b0e-1487-452e-95a7-28a8ba9d4247. The frame requesting access has a protocol of 'https', the frame being accessed has a protocol of 'http'. Protocols must match. ScriptResource.axd:125
    1. a.RadDialogOpener._applyParametersScriptResource.axd:125
    2. a.RadDialogOpener.openScriptResource.axd:87
    3. a.RadEditor.showDialogScriptResource.axd:6301
    4. Telerik.Web.UI.Editor.CommandList.DocumentManager.SetLinkProperties.LinkManagerScriptResource.axd:3842
    5. a.RadEditor.fireScriptResource.axd:6789
    6. a.RadEditor._onToolClickScriptResource.axd:6219
    7. (anonymous function)ScriptResource.axd:47
    8. (anonymous function)ScriptResource.axd:2399
    9. Telerik.Web.UI.Editor.DefaultToolAdapter._raiseEditorEventScriptResource.axd:3147
    10. Telerik.Web.UI.Editor.DefaultToolAdapter._onToolBarClickScriptResource.axd:3142
    11. (anonymous function)ScriptResource.axd:47
    12. (anonymous function)ScriptResource.axd:47
    13. Sys$UI$DomEvent$addHandler.browserHandlerScriptResource.axd:2948
The page at https://mysite/admin/Pages/SpecialOffersForm.aspx?ID=034a2b0e-1487-452e-95a7-28a8ba9d4247 displayed insecure content from http://mysite/_wpresources/RadEditorSharePoint/6.1.6.0__1f131a624888eeed/Resources/Telerik.Web.UI.DialogHandler.aspx?checkHandler=true.


Any help??
Daniel
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
241 views
I have a radlistbox and the items are being inserted programmatically, how do I expand the width of an item so multiple items won't show on a single line as they are showing as of now.

currently items are being inserted to listbox in c# like :
rlbAssigned.Items.Add(new RadListBoxItem(rlbAvailable.Items[rlbAvailable.SelectedIndex].Text, rlbAvailable.Items[rlbAvailable.SelectedIndex].Value));

and the listbox is declared as:
<telerik:RadListBox ID="rlbAvailable" runat="server" Height="320px" Width="200px">                                         </telerik:RadListBox>
Farooq
Top achievements
Rank 1
 answered on 07 Nov 2012
2 answers
150 views
I am trying to give a custom color to the radmenu.
Radmenu is as below
<div class="qsf-demo-canvas" align="center">
        <telerik:RadMenu runat="server" ID="RadMenu1" EnableRoundedCorners
="true" OnItemClick="RadMenu1_ItemClick"
            EnableShadows="true" Width="100%">
            <Items>
  </Items>
        </telerik:RadMenu>

The stylesheet is as below:
.qsf-demo-canvas {
    width: 100%
     margin-top:100px;
    position:static;
}
 
.qsf-demo-canvas .RadMenu_Default .rmLink{
     color:White !important;
     background-color:#0099FF !important;
}
.qsf-demo-canvas .RadMenu_Default .rmRootGroup .MyItem {
    float: none;
    background-color:#0099FF !important;
     text-align:left;
}
I have 2 menu items in my radmenu.The color I give in the stylesheet applies only for the length of radmenu 
item,not till the full length of radmenu.
How can I have the custom color for the whole length of radmenu?
Soumya
Top achievements
Rank 1
 answered on 07 Nov 2012
2 answers
108 views
Is this behavoir a known bug, or is there something wrong with my implementation?

My implementation of RadComboBox locks like following:

<tc:RadComboBox ID="_radComboBox" runat="server"
                                Width="250px"
                                Height="250px"
                                CssClass="stringBox"
                                AutoPostBack="true"
                                MarkFirstMatch="true"
                                EnableLoadOnDemand="true"
                                HighlightTemplatedItems="true"
                                EnableVirtualScrolling="true"
                                ShowMoreResultsBox="true"
                                ShowWhileLoading="true"
                                LoadingMessage="Loading..."
                                ShowDropDownOnTextboxClick="true"
                                OnSelectedIndexChanged="OnSelectedIndexChanged"                              
                                OnItemDataBound="OnItemDataBound"
                                OnItemsRequested="OnItemsRequested"
                                OnLoad="OnComboBoxLoad">

I requestet the data in the MethodCall "OnItemsRequested".

If user clicks in the Textbox an empty ListBox is rendering and in background the "OnItemsRequested" method get called.
When this method returns values, they are shown as normal in the listbox.
Now, if the user should request more then the first items (per Default every call of OnItemsRequested returns 10 Items), the "Loading..." string is shown above the List. 
This is what i expected the listBox should do for the first call on DropDownTextboxClicked.

It is a problem, when the "OnItemsRequested" method needs some time for response.
For the user it looks like, there a no items in list.
 (Because of blank list)

Is there something wrong with my implementation, or is this a known bug of RadComboBox?

Im using Telerik.Web.UI.dll in Version 2012.1.215.40.
Nencho
Telerik team
 answered on 07 Nov 2012
1 answer
47 views
I'm using a Radgrid with custom filtering. It all works fine. I also want to use the inherent filtering that comes with the Radgrid. I use the NeedDataSource when getting the results for my custom search logic and code. However, when the "regular" grid filtering is used, the results are okay, but the total items are based off my back end custom code which is wrong. Hope that made sense.

For example....

Custom Filtering - A datatable is obtained containing the results in the NeedDataSource(). The Grids VirtualItemCount is set to the Datatable.rows.count. So now I have a grid with lets say 25 total records ( 15 rows per page).

Non Custom Filtering - The user enters their search text via the Grids filtering textbox, clicks on the button. The NeedDataSource event is fired. The same original custom filtering is supplied to the backend. A datatable is returned just like before with the same results. And the Grids VirtualItemCount is again set to the total number of records like before. However, the Non Custom Filtering is applied ( I have no idea where..it's a mystery to me) and the correct results are displayed. For example purposes, lets say only three records are displayed based from what the user entered in the Grids filtering search textbox. But the total records are still being applied from the Datatable. So it's wrong.

I hope that made sense.  Bottom line, how in the world do you use both those types of filtering together?
Jeff
Top achievements
Rank 1
Veteran
 answered on 07 Nov 2012
1 answer
47 views
Hi All,

In my application, I want to load huge data into the telerik rad grid. In that is it possible to load grid page by page. Means only on page index changed that page data should load in grid. And one more thing is I want to hit database only once. Thanks in advance.

Regards,
Akki
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Nov 2012
2 answers
145 views
I am having issues setting the event handler for the itemcreated and itemdatabound events.  I get a compile error of  'trvAssignedTo_ItemCreated' is not a member of the project.  But the onNeedDataSource works fine.

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <telerik:RadTreeList ID="trvAssignedTo" runat="server" ParentDataKeyNames="ParentID" DataKeyNames="CampusID" OnItemCreated="trvAssignedTo_ItemCreated" OnItemDataBound="trvAssignedTo_ItemDataBound" onNeedDataSource="trvAssignedTo_NeedDataSource" AutoGenerateColumns="false" NoRecordsText="Not Subscribed to Groups">
            <Columns>
                <telerik:TreeListBoundColumn DataField="CampusName" UniqueName="Campus" HeaderText="Campus" />
                <telerik:TreeListBoundColumn DataField="Department" UniqueName="Department" HeaderText="Department" />
                <telerik:TreeListBoundColumn DataField="Description" UniqueName="Group" HeaderText="Group" />
            </Columns>
        </telerik:RadTreeList>
    </div>
    </form>
</body>
 
    Private Sub trvAssignedTo_ItemCreated(sender As Object, e As TreeListItemCreatedEventArgs)
        If TypeOf e.Item Is TreeListHeaderItem Then
            If csSession.sessionCompanyType = "L" Then
                Dim item As TreeListHeaderItem = TryCast(e.Item, TreeListHeaderItem)
                item("Campus").Text = "League"
                item("Department").Text = "Division"
                item("Group").Text = "Team"
            End If
        End If
    End Sub
    Private Sub trvAssignedTo_ItemDataBound(sender As Object, e As TreeListItemDataBoundEventArgs)
        If TypeOf e.Item Is TreeListDataItem Then
            Dim item As TreeListDataItem = TryCast(e.Item, TreeListDataItem)
            If Not DataBinder.Eval(item.DataItem, "ParentID") Is System.DBNull.Value Then
                item("Campus").Font.Italic = True
            End If
        End If
    End Sub
    Protected Sub trvAssignedTo_NeedDataSource(ByVal source As Object, ByVal e As TreeListNeedDataSourceEventArgs)
        Dim dt As DataTable = csSubscribers.getSubscriberGroups(2)
        trvAssignedTo.DataSource = dt
    End Sub
Tina
Top achievements
Rank 2
 answered on 07 Nov 2012
7 answers
95 views
Actually nothing on the Grid works.  It pulls the data from the datasource but nothing else.
I posted this in General Discussion, but I probably should have put it here first.  I didn't see this area before.

RadGrid won't go into Edit mode -

I just installed RadControls for ASP.NET AJAX on my Windows XP 32bit development PC with VS 2010.

I opened a newly created website which had only a single GridView already on it and I selected Convert to Telerik web site from the Telerik menu that is now in VS.

The first thing I noticed was that the GridView no longer worked. Clicking on Select or Edit no longer do anything. So I dragged a RadGrid to the form, left all the default settings and selected the same DataSource the original GridView is using. Now with the original GridView and the new RadGrid on the page, both grids display the same rows of data as one would expect.

I enabled AllowAutomaticDeletes, AllowAutomaticInserts, and AllowAutomaticUpdates and set AutoGenerateEditColumn to True.

The original GridView still does not work. Click "Select" and the row is not selected. Click "Edit" and it does not go into Edit mode.
The new RadGrid also does not work. There is an "Edit" link. Clicking it does nothing. The page flickers like there was a postback or something, but the row does not go into edit mode.

I started with the standard ToolkitScriptManager and then changed it to the RadScriptManager. Neither worked.

What am I missing?
Pam
Top achievements
Rank 2
 answered on 07 Nov 2012
9 answers
152 views
Hello!

In the RadGrid, I use image columns a lot, but there seems to be a problem when combining with OnRowClick.
When clicking on the image, no row click happens!

Simplified sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1" %>
 
<!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>
    <script runat="server">
        Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim dt As New System.Data.DataTable()
            dt.Columns.Add("Col1", GetType(String))
            dt.Rows.Add({"Row1"})
            aaa.DataSource = dt
            aaa.DataBind()
        End Sub
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ccc" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadGrid ID="aaa" runat="server">
            <ClientSettings>
                <ClientEvents OnRowClick="function(){alert('Clicked');}" />
            </ClientSettings>
            <MasterTableView>
                <Columns>
                    <telerik:GridImageColumn ImageUrl="go.gif">
                    </telerik:GridImageColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>


Regards
Rikard
Farooq
Top achievements
Rank 1
 answered on 07 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?