Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
227 views
Hi -
Is there a way to resolve the issue shown in the attached document.  The RadUpload input area is missing its top border.  I'm using the Web20 skin though I tried other skins and the same issue occurs.

Thanks.
Lynne
Top achievements
Rank 1
 answered on 22 Mar 2012
3 answers
103 views
I'm working with the ImageManager in the RadEditor and run across very simple problem -- uploading an image when the directory currently being viewed is empty causes a javascript error that breaks the ImageManager until the page is reloaded.  However, if the directory isn't empty, everything works fine.

Surely I am doing something wrong, but I've stripped almost everything out of my code and the issue persists.

Here is my markup:
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="ImageMgrTest._Default" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManagerProxy1" runat="server"/>
   <telerik:RadEditor ID="txtRegText" Width="100%" runat="server"
        DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"
        StripFormattingOnPaste="MSWord">
        </telerik:RadEditor>
</asp:Content>

And the code behind:
Public Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim uploadPath As String = "~/uploads"
 
        Me.txtRegText.ImageManager.UploadPaths = {uploadPath}
        Me.txtRegText.ImageManager.ViewPaths = {uploadPath}
        Me.txtRegText.ImageManager.DeletePaths = {uploadPath}
 
        Me.txtRegText.ImageManager.MaxUploadFileSize = 1024 * 1000
        Me.txtRegText.ImageManager.SearchPatterns = New String() {"*.jpg", "*.png", "*.gif", "*.jpeg", "*.bmp", "*.tiff"}
 
    End Sub
 
End Class

If the "/uploads" directory is empty when you go to add an image via the image manager, you get this javascript error after the image is uploaded:

93Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: MinimumValue should be smaller than maximumValue Parameter name: _minimumValue Actual value was 0. 

Anyone seen this before?
Rumen
Telerik team
 answered on 22 Mar 2012
6 answers
161 views
Is there a simple way to restrict resizing a radWindow smaller than a specified minimum size. I don't see a MinimumWidth or MinimumHeight attribute for it. I tried the onClientResize event, but it isn't called until AFTER the window has been resized, so it can't be used for this purpose. The problem is that while the minimum width is determined by the width of the window icon and titlebar controls, there appears to be no minimum height at all. I can resize a window down to apparently 1px tall!
Marin Bratanov
Telerik team
 answered on 22 Mar 2012
6 answers
264 views
Hi there-- two (well, three) questions!

1) Right now, LinkedIn is included in the RadSocialShare control as a Styled Button, which means you get the 16x16 icon with the appropriate link. Will it soon be possible to use it as a Standard Button with the attached bubble, like the RadFacebookButton, RadTwitterButton and RadGoogleButton? You can find LinkedIn's share button builder here: http://developer.linkedin.com/plugins/share-button .

2) I know it's not technically meant for sharing, but would it be possible to include an RSS button in with the rest of the social buttons?

And I guess a related question that ties these two together is: would it be possible to insert arbitrary buttons by pasting in HTML/JS code, say, via something like this?: <telerik:RadSocialButton SocialNetType="Custom" /> 

Thanks!
Bozhidar
Telerik team
 answered on 22 Mar 2012
1 answer
104 views
I handle my sorting and paging explicitly in my entity framework calls from a NeedDataSource handler.

I persist the settings in session, and when I return to a page with a radgrid, I get the previous sort order and page correctly displayed...but I don't see how to highlight the sort column and its header to indicate the sort and sort direction.

I expected I could do so in the ItemDataBound handlers, but it eludes me! (I attempted to use a SortExpression, hoping it would at least trip the column indications even though there is no sorting to be done by it...no luck there either)

Can anyone help?

Thanks!


Oops! Not MVC...but RadGrid for AJAX
Brooks
Top achievements
Rank 1
 answered on 22 Mar 2012
1 answer
212 views
I handle my sorting and paging explicitly in my entity framework calls from a NeedDataSource handler.

I persist the settings in session, and when I return to a page with a radgrid, I get the previous sort order and page correctly displayed...but I don't see how to highlight the sort column and its header to indicate the sort and sort direction.

I expected I could do so in the ItemDataBound handlers, but it eludes me! (I attempted to use a SortExpression, hoping it would at least trip the column indications even though there is no sorting to be done by it...no luck there either)

Can anyone help?

Thanks!
Brooks
Top achievements
Rank 1
 answered on 22 Mar 2012
1 answer
112 views
Hi,

I am trying to use some of the functionality in the jQuery mobile framework, but when I add a reference to that, I get a blank page, but no JS errors, just as described here for MVC:
http://www.telerik.com/community/forums/aspnet-mvc/general/telerik-mvc-jquery-mobile.aspx

According to jQuery documentation and example, regular jqeury framework and mobile ARE supposed to be used together:
http://jquerymobile.com/demos/1.0.1/docs/about/getting-started.html

but looks like RadControls don't like both of them at the same time...

Please help!

Thankssss
Kate
Telerik team
 answered on 22 Mar 2012
3 answers
95 views
hi,
        how to give title to RadDockZone not for RadDock.
        please help.
thanks in advance
Jesmon Joseph
Stuart Hemming
Top achievements
Rank 2
 answered on 22 Mar 2012
2 answers
84 views
Hi there
I am experiencing the following problems when I try to rebuild this example in a application : window example
First: the edit button on the right-next collum of the grid isnt working
Second: Whenever I insert or update a record the Insert/Edit window remains open and the grid isn not refreshed. 

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="DefaultCS.aspx.cs" Inherits="TelerikRadDemo.Home" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    <br />
    <telerik:RadMenu ID="RadMenu1" runat="server"
    OnItemClick="RadMenu1_ItemClick" Style="top: 19px;
        left: 0px" Skin="Metro">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Open">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Cars">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Manufactures">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Customers">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="Help">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Visit Golem webpage">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="About us">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
    <br />
    <br />
    <telerik:RadToolBar ID="RadToolBar1" Runat="server" Skin="Metro" >
        <Items>
            <telerik:RadToolBarButton runat="server" Text="Add" onclick="return ShowInsertForm();">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Text="Delete">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Text="Edit">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Text="Next">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Target="_previous" Text="Previous">
            </telerik:RadToolBarButton>
        </Items>
    </telerik:RadToolBar>
    <br />
    <div>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function ShowEditForm(id, rowIndex) {
                    var grid = $find("<%= RadGrid1.ID %>");
 
                    var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                    grid.get_masterTableView().selectItem(rowControl, true);
 
                    window.radopen("EditFormCS.aspx?ID=" + id, "UserListDialog");
                    return false;
                }
 
                function ShowInsertForm() {
                    window.radopen("EditFormCS.aspx", "UserListDialog");
                    return false;
                }
                function refreshGrid(arg) {
                    if (!arg) {
                        $find("<%= RadAjaxManager1.ID %>").ajaxRequest("Rebind");
                    }
                    else {
                        $find("<%= RadAjaxManager1.ID %>").ajaxRequest("RebindAndNavigate");
                    }
                }
                function RowDblClick(sender, eventArgs) {
                    window.radopen("EditFormCS.aspx?ID=" + eventArgs.getDataKeyValue("ID"), "UserListDialog");
                }
 
//                var selected = {};
//                function RadGrid1_RowSelected(sender, args) {
//                    var ID = args.getDataKeyValue("ID");
//                    if (!selected[ID]) {
//                        selected[ID] = true;
//                    }
//                }
//                function RadGrid1_RowDeselected(sender, args) {
//                    var ID = args.getDataKeyValue("ID");
//                    if (selected[ID]) {
//                        selected[ID] = null;
//                    }
//                }
//                function RadGrid1_RowCreated(sender, args) {
//                    var ID = args.getDataKeyValue("ID");
//                    if (selected[ID]) {
//                        args.get_gridDataItem().set_selected(true);
//                    }
//                }
//                function GridCreated(sender, eventArgs) {
//                    var masterTable = sender.get_masterTableView();
//                    //check whether all items on the active page are selected    
//                    if (masterTable.get_selectedItems().length == masterTable.get_pageSize()) {
//                        /*find the checkbox in the header of the GridClientSelectColumn and set checked state for it - will work with AllowMultiRowSelection = true only!*/
//                        var gridHeader = masterTable.get_element().getElementsByTagName("TH")[0];
//                        for (var i = 0; i < gridHeader.childNodes.length; i++) {
//                            if (gridHeader.childNodes[i].id.indexOf("columnSelectCheckBox") > -1) {
//                                gridHeader.childNodes[i].checked = "true";
//                            }
//                        }
//                    }
//                }
            </script>
        </telerik:RadCodeBlock>
        <telerik:RadGrid OnItemCreated="RadGrid1_ItemCreated" ID="RadGrid1" runat="server"
            AllowPaging="True" Width="97%" DataSourceID="SqlDataSource1" Skin="Metro"
            AllowMultiRowSelection="true">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID"
                Width="100%" CommandItemDisplay="Top" PageSize="5">
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="True"
                        SortExpression="ID" UniqueName="ID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Manufacture" HeaderText="Manufacture" SortExpression="Manufacture"
                        UniqueName="Manufacture">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                        UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Year" HeaderText="Year" SortExpression="Year"
                        UniqueName="Year">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Price" HeaderText="Price" ReadOnly="True"
                        SortExpression="Price" UniqueName="Price">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Information" HeaderText="Information" ReadOnly="True"
                        SortExpression="Information" UniqueName="Information">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <CommandItemTemplate>
                    <a href="#" onclick="return ShowInsertForm();">Add New Record</a>
                </CommandItemTemplate>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            EnableShadow="true" Skin="Metro">
            <Windows>
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="320px"
                    Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" />
            </Windows>
        </telerik:RadWindowManager>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikCars %>"
            SelectCommand="SELECT [ID], [Manufacture], [Name], [Year], [Price], [Information] FROM [Cars]">
        </asp:SqlDataSource>
        <br />
    </div>
</asp:Content>


<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditFormCS.aspx.cs" Inherits="TelerikRadDemo.EditFormCS" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <script type="text/javascript">
            function CloseAndRebind(args)
            {
                GetRadWindow().BrowserWindow.refreshGrid(args);
                GetRadWindow().close();
                 
            }
 
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
 
                return oWindow;
            }
 
            function CancelEdit() {
                GetRadWindow().close();
            }
        </script>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Metro" DecoratedControls="All" />
        <br />
        <br />
        <asp:DetailsView ID="DetailsView1" DataKeyNames="ID" runat="server" AutoGenerateRows="False"
            DataSourceID="SqlDataSource1" Height="50px" Width="125px" OnItemCommand="DetailsView1_ItemCommand"
            BorderWidth="0" CellPadding="0" CellSpacing="7" GridLines="None" OnItemUpdating="DetailsView1_ItemUpdating">
            <Fields>
                <asp:BoundField DataField="Manufacture" HeaderText="Car manufacture" SortExpression="Manufacture" />
                <asp:BoundField DataField="Name" HeaderText="Car" SortExpression="Name" />
                <asp:BoundField DataField="Year" HeaderText="Year of deploymnet" SortExpression="Year" />
                <asp:BoundField DataField="Price" HeaderText="Current Price" SortExpression="Price" />
                <asp:BoundField DataField="Information" HeaderText="Information" SortExpression="Information" />
                <asp:CommandField ShowEditButton="True" ButtonType="Button" />
                <asp:CommandField ShowInsertButton="True" ButtonType="Button" />
            </Fields>
        </asp:DetailsView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikCars %>"
            InsertCommand="INSERT INTO [Cars] ([Manufacture], [Name], [Year], [Price], [Information]) VALUES (@Manufacture, @Name, @Year, @Price, @Information)"
            SelectCommand="SELECT [ID], [Manufacture], [Name], [Year], [Price], [Information] FROM [Cars] WHERE ([ID] = @ID)"
            UpdateCommand="UPDATE [Cars] SET [Manufacture] = @Manufacture, [Name] = @Name, [Year] = @Year, [Price] = @Price, [Information] = @Information WHERE [ID] = @ID">
            <InsertParameters>
                <asp:Parameter Name="Manufacture" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Name" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Year" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Price" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Information" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Manufacture" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Name" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Year" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Price" Type="String" DefaultValue="" ConvertEmptyStringToNull="false" />
                <asp:Parameter Name="Information" Type="String" />
                <asp:Parameter Name="ID" Type="Int32" />
            </UpdateParameters>
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
</asp:Content>


Can you help me solving this problems?
Andrey
Top achievements
Rank 1
 answered on 22 Mar 2012
2 answers
92 views
So I'm successfully binding my resources to the AdvancedForm template, but there is a scenario that I haven't been able to find a solid answer for.

For one of the RadComboBox-es, I want to take the selected value, post it back, and rebind the resource dropdown below it. An example is a client has particular services assigned to them, so when the client selection changes, I need just the services they have available to be rebound.

I'm actually to the point that I have the combo box posting back and rebinding accordingly, but now for some reason, the combo box that posts back (also a resource, the Client resource) is no longer attached to the appointment. So when I insert the appointment, the 2 other resources I have are in the collection on the Appointment, but not the Client resource.

My major hang up is that the ResourceControl is used on the AdvancedForm control and I'm not really quite sure how to get directly to the ResourceControl and its child controls without doing a bunch of FindControl (which is what I'm doing now)

The strange thing is that on the SelectedIndexChanged handler that's firing, if I look at the Appointment property that I have on the code-behind class, all 3 resources are there and assigned successfully. After that event is completed and move to an insert/update, for some reason the Client resource gets dropped off the appointment.
David
Top achievements
Rank 1
 answered on 22 Mar 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?