Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
93 views
Hello,

I have a few questions about the autosize property of radwindow control:
1) How can set an auto height for radwindow control in case the minimum height which is allowed is 300px?
2) How can set an auto height for radwindow control in case the maximum height which is allowed is 300px?
3) How can set an auto width for radwindow control in case the minimum width which is allowed is 300px?
4) How can set an auto width for radwindow control in case the maximum width which is allowed is 300px?

Please, I need your help,
It is very appreciated to send me a sample code which demonstrates the above issue.

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 23 Aug 2011
1 answer
59 views
We've had users complaining of a sequence of events in our application that was somehow causing Internet Explorer to not just throw a javascript error, but to actually crash completely.  I've narrowed it down to the following recreatable situation.

1) Need 2 pages.  The First page just includes an IFRAME whose source is the second page

2) The Second page has the Rad Editor with content that contains an image. 

3) The Second page contains a button that posts back.

4) Run the First page.  The IFrame loads up the Second page.

5) Right Click on the image in the editor and select "Properties".  After the properties window loads, hit the "Cancel Button"

6) Click the button to initiate a post back.

7) After it comes back, push it a second time.  The browser will crash.  Happens in both IE 8 and IE 9.

Heres my sample pages I used to create this:

Main.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!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>
    Iframe is Below<br />
    <iframe id="main" frameborder="0" width="800px" height = "500px" src="frame.aspx">
    </iframe>
    </div>
    </form>
</body>
</html>

Frame.aspx
%@ Page Language="VB" AutoEventWireup="false" CodeFile="frame.aspx.vb" Inherits="frame" %>
 
<!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">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <div>
    <asp:Button ID="postit" Text="Cause Postback" runat=server />
    <telerik:RadEditor ID="RadEditor1" Runat="server">
    <Content>Test<br />
        <img alt="" src="/RadControlsWebSite1/e3cat.jpg" /></Content>
        <ImageManager ViewPaths="~/"
                                UploadPaths="~/"
                                DeletePaths="~/">
                            </ImageManager>
    </telerik:RadEditor>
    </div>
    
    </form>
</body>
</html>
Dobromir
Telerik team
 answered on 23 Aug 2011
1 answer
73 views
My user's are restricted to using IE7, and the RadMaskedTextBox is behaving very weird in this browser.  When focused on the control, the insertion point moves to the end of the masked characters when a button is pressed.  For example, if my mask is "(###) ### - ###", and the insertion point is at the beginning and I press "1", then the text displayed in the box becomes "(1##) ### - ###" and the insertion point moves to the very end and no more text is able to be typed in.  Now if I move the insertion point with the mouse cursor to the proper place after the "1", then I can type the next character but only to get booted back to the end of the mask all over again.

Here is my markup:
<telerik:RadMaskedTextBox ID="rmt_Phone_Number" runat="server"
      Mask="(###) ### - ####" PromptChar="#" HideOnBlur="true">                           
</telerik:RadMaskedTextBox>
Shinu
Top achievements
Rank 2
 answered on 23 Aug 2011
1 answer
134 views
hi,
I have this rad grid:
                                                                <telerik:RadGrid ID="RadGrid1"
                        AllowSorting="True"
                        AllowPaging="True" PageSize="5" runat="server" GridLines="None" Width="95%"
                        OnItemCommand="RadGrid1_ItemCommand"
                        OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Sunset">
                        <ExportSettings HideStructureColumns="true" />
                             <MasterTableView Width="100%" CommandItemDisplay="Top"   >


                             <Columns>
                                <telerik:GridBoundColumn DataField="SerialNum" />
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  />
                                <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" />
                                <telerik:GridBoundColumn DataField="Phone1" HeaderText="Phone-1-"  />
                                <telerik:GridBoundColumn DataField="Email" HeaderText="Email" />
                                <telerik:GridBoundColumn DataField="Phone2" HeaderText="Phone-2-" />
                                <telerik:GridBoundColumn DataField="ActiveState" HeaderText="Active State" />
                                <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" />
                                <telerik:GridTemplateColumn>
                                    <ItemTemplate>
                                            <asp:LinkButton ID="lnkbdeactive" runat="server" CommandArgument='<%# eval("User_ID") %>'
                                                CommandName="Deactive" CssClass='<%# ShowIfNotActive(Eval("Active"), "lnkbdeactive") %>'>De-activate</asp:LinkButton>
                                            <asp:LinkButton ID="lnkbactive" runat="server" CommandArgument='<%# eval("User_ID") %>'
                                                CommandName="Active" CssClass='<%# ShowIfNotActive(Eval("Active"), "lnkbactive") %>'>Activate</asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                             </Columns>


                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false"
                                    ShowExportToCsvButton="true" ExportToCsvText='<%= "CSV_" & ExportSubFileName %>'    />
                            </MasterTableView>
                        </telerik:RadGrid>


now the problem when I am filling data using OnNeedDataSource
I got the grid rendered two times, I can see the grid like this:


Princy
Top achievements
Rank 2
 answered on 23 Aug 2011
1 answer
147 views
Hi,

I have a GridNumericColumn whose Header text has to be dynamic. However, when I add the dynamic code block as the header text

HeaderText='<%# GetFYString(DateTime.Now, true) %> <br/> <%#GetFYSpan(true)%>'

I get a message: Databinding expressions are only supported on objects that have a DataBinding event. Telerik.Web.UI.GridNumericColumn does not have a DataBinding event.

Does this mean I will have to use  template column to get my header right? Or am I missing something?

Thanks

Princy
Top achievements
Rank 2
 answered on 23 Aug 2011
2 answers
209 views
hi,

setting empty message of a text box onClientSelectedIndexChanged by jQuery??

$(

 

'#txtSearchCriteria').attr('emptymessage' , 'hello')

says property or method not found

thanks

Amit
Top achievements
Rank 1
 answered on 23 Aug 2011
7 answers
202 views
Hi. Is it possible to expand a hierarchical grid via a hyperlink column? I noticed you can create a GridExpandColumn but I need a DataField or value instead of the expand arrow, hopefully a hyperlink of some sort. Also, if this is possible, how do I hide the default expand column for just that grid and not any other? Thanks.

Daniel
Doug
Top achievements
Rank 1
 answered on 23 Aug 2011
2 answers
121 views
Hey Guys,
Got a small problem with my radGrid.
I'm using a pdf production component to produce pdf output from a byte stream.
I launch this method from a standard button click and the pdf is streamed to the browser.
However, when I attempt this from a Button column in my radGrid, the call errors with:

"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this
are when the response is modified by calls to Response.Write(), response filters, HttpModules or server trace is enabled"

Which makes sense because I'm intercepting the response and setting content-type, adding headers and BinaryWriting the data.

So as this works just fine outside of the RadGrid, is there something I can do to make the request happy with with calling it from within? I really need to bind things from the current row to make the call.

Many thanks
Mark.

Simon
Top achievements
Rank 1
 answered on 23 Aug 2011
2 answers
111 views
I had an ASP.NET AJAX solution with a somewhat recent version of Telerik installed (earlier this year). I just upgraded to the latest version and now when I run the project none of my web forms render. I can't even catch a break point and the page load event. I get just an empty web page if any Telerik controls are present. web forms without Telerik controls work fine. If I create a new project everything works fine. I tried doing the upgrade on my project and that had no effect. My web.config doesn't specify any specific version and I tried creating a new web.config and that had no effect.

Any ideas what the problem may be?
Steve
Top achievements
Rank 1
 answered on 22 Aug 2011
2 answers
131 views
Hello, I have a ajaxloadingpanel setup for an ajaxpanel. Whenever it loads it does not stop. I put a break point at the end of my code behind and verify that it reaches it. I haven't seen this one before. Anyone know what could be happening?

Thanks,
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DataMigration.ascx.cs"
    Inherits="PDS.DataMigration1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<style type="text/css">
    .style8
    {
        color: #FFFFFF;
    }
</style>
<script type="text/javascript">
    //    function onItemChecked(sender, e) 
    //    {
    //        var item = e.get_item();
    //        var items = sender.get_items();
    //        var checked = item.get_checked();
    //        var firstItem = sender.getItem(0);
    //        if (item.get_text() == "Select All") 
    //        {
    //            items.forEach(function (itm) { itm.set_checked(checked); });
    //        }
    //        else 
    //        {
    //            if (sender.get_checkedItems().length == items.get_count() - 1) 
    //            {
    //                firstItem.set_checked(!firstItem.get_checked());
    //            }
    //        }
    //    }
  
  
   
  
</script>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel2" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<div style="text-align: center; width: 100%">
    <div style="text-align: left">
        <div style="text-align: center; width: 500px; margin-top: 40px">
            <%--<asp:Panel ID="Panel1" runat="server" Width="450px" Height="450px" BackColor="#62768A">--%>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="445px" BackColor="#62768A">
                <span class="style8">
                    <label>
                        Select Dealership</label></span>
                <br />
                <telerik:RadComboBox runat="server" ID="rcb_Dealerships" Width="200px" AutoPostBack="true"
                    EnableEmbeddedSkins="false" OnDataBinding="rcb_Dealerships_DataBinding" OnSelectedIndexChanged="rcb_Dealerships_SelectedIndexChanged">
                </telerik:RadComboBox>
                <br />
                <br />
                <span class="style8">
                    <label style="text-align: left">
                        Select Accounts</label></span>
                <br />
                <telerik:RadListBox ID="rlb_Accounts" runat="server" Width="400px" Height="300px"
                    CheckBoxes="true" EnableEmbeddedSkins="false" BackColor="#E1EAF2" BorderColor="#E1EAF2"
                    Style="text-align: left" AutoPostBack="True" SelectionMode="Multiple">
                </telerik:RadListBox>
                <br />
                <br />
                <telerik:RadButton ID="rb_Migrate" runat="server" Width="150px" Text="Migrate Accounts"
                    Skin="WebBlue" BackColor="#33393E" ForeColor="Black" OnClick="rb_Migrate_Click">
                </telerik:RadButton>
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="false">
                </telerik:RadWindowManager>
                <br />
            </telerik:RadAjaxPanel>
            <%--</asp:Panel>--%>
        </div>
    </div>
    <div style="width: 100%; margin-top: 40px; text-align: left">
        <div style="text-align: left; width: 1000px; margin-left: 25px">
            <asp:Panel Width="100%" Height="575px" runat="server" BackColor="#62768A" Style="text-align: center"
                ID="GridPanel">
                <div style="text-align: left; margin-left: 25px">
                    <telerik:RadButton ID="UpdateMigrationData" runat="server" Text="Update Migration Data"
                        Skin="WebBlue" OnClick="UpdateMigrationData_Click">
                    </telerik:RadButton>
                                       
                    <label id="PanelLabel" style="font-size: larger; color: White">
                        Please Categorize All New Products Before Migrating Users</label>
                </div>
                <div style="text-align: center; height: 450px; width: 90%">
                    <div style="text-align: center; width: 100%; margin-top: 50%">
                        <div style="text-align: left; width: 100%; background-color: #62768A; margin-top: -48%">
                            <telerik:RadGrid ID="RadGrid1" runat="server" Skin="WebBlue" DataSourceID="SessionDataSource1"
                                AllowPaging="true" AutoGenerateColumns="true" GridLines="Horizontal" PageSize="15"
                                AllowAutomaticUpdates="true" Visible="true" OnDataBound="RadGrid1_DataBound">
                                <MasterTableView AutoGenerateColumns="false" TableLayout="Fixed" Width="100%" EditMode="InPlace"
                                    DataKeyNames="UID">
                                    <SortExpressions>
                                        <telerik:GridSortExpression FieldName="productname" SortOrder="Descending" />
                                    </SortExpressions>
                                    <PagerStyle Visible="true" />
                                    <Columns>
                                        <telerik:GridTemplateColumn ColumnEditorID="DDEditor" HeaderText="pds#categoryNAME"
                                            Display="true" HeaderStyle-Width="140px" HeaderStyle-HorizontalAlign="Center">
                                            <ItemTemplate>
                                                <asp:Panel ID="Panel1" runat="server">
                                                    <telerik:RadButton ID="RadButton1" runat="server" Text="Save" AutoPostBack="true"
                                                        Skin="WebBlue" OnClick="RadButton1_Click">
                                                    </telerik:RadButton>
                                                       
                                                    <telerik:RadComboBox runat="server" ID="GridTemplateListbox" EnableEmbeddedSkins="false">
                                                        <Items>
                                                            <telerik:RadComboBoxItem Text="Service Contract" Value="1" />
                                                            <telerik:RadComboBoxItem Text="GAP" Value="2" />
                                                            <telerik:RadComboBoxItem Text="ETCH" Value="3" />
                                                            <telerik:RadComboBoxItem Text="Sealants" Value="4" />
                                                            <telerik:RadComboBoxItem Text="Tire and Wheel" Value="5" />
                                                            <telerik:RadComboBoxItem Text="Disability" Value="6" />
                                                            <telerik:RadComboBoxItem Text="Credit Life" Value="7" />
                                                            <telerik:RadComboBoxItem Text="Safe Lease" Value="8" />
                                                            <telerik:RadComboBoxItem Text="Crystal Fusion" Value="9" />
                                                            <telerik:RadComboBoxItem Text="Key" Value="10" />
                                                            <telerik:RadComboBoxItem Text="Finance" Value="11" />
                                                            <telerik:RadComboBoxItem Text="UPP" Value="12" />
                                                            <telerik:RadComboBoxItem Text="Maintenance" Value="13" />
                                                            <telerik:RadComboBoxItem Text="Retail Vehicle Sales" Value="14" />
                                                            <telerik:RadComboBoxItem Text="Total Vehicle Sales" Value="15" />
                                                            <telerik:RadComboBoxItem Text="Miscellaneous" Value="16" />
                                                            <telerik:RadComboBoxItem Text="Dent Repair" Value="17" />
                                                            <telerik:RadComboBoxItem Text="Liners" Value="18" />
                                                            <telerik:RadComboBoxItem Text="Electronic Theft Recovery" Value="19" />
                                                            <telerik:RadComboBoxItem Text="Window Tint" Value="20" />
                                                            <telerik:RadComboBoxItem Text="Tri Pac" Value="21" />
                                                            <telerik:RadComboBoxItem Text="Handsfree" Value="22" />
                                                            <telerik:RadComboBoxItem Text="ID Theft" Value="23" />
                                                            <telerik:RadComboBoxItem Text="Inactive" Value="24" />
                                                            <telerik:RadComboBoxItem Text="DigiShield" Value="26" />
                                                            <telerik:RadComboBoxItem Text="Anti-Theft" Value="27" />
                                                            <telerik:RadComboBoxItem Text="VIP" Value="28" />
                                                            <telerik:RadComboBoxItem Text="VSC Refund" Value="29" />
                                                            <telerik:RadComboBoxItem Text="Chip" Value="30" />
                                                            <telerik:RadComboBoxItem Text="Equity Protection" Value="31" />
                                                            <telerik:RadComboBoxItem Text="Accessories" Value="32" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                                </asp:Panel>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn DataField="UID" HeaderText="UID" SortExpression="UID" UniqueName="UID"
                                            Display="true" ReadOnly="true">
                                            <HeaderStyle Width="30px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="productname" HeaderText="productname" SortExpression="productname"
                                            UniqueName="productname" ReadOnly="true">
                                            <HeaderStyle Width="150px" />
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="description" HeaderText="description" SortExpression="description"
                                            UniqueName="description" ReadOnly="true">
                                            <HeaderStyle Width="200px" />
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <telerik:GridDropDownListColumnEditor ID="DDEditor" runat="server" DropDownStyle-Width="100px">
                            </telerik:GridDropDownListColumnEditor>
                            <input id="categoryIDparameter" runat="server" visible="false" />
                            <input id="categoryNAMEparameter" runat="server" visible="false" />
                            <input id="UIDparameter" runat="server" visible="false" />
                            <asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conn_pipiusers %>"
                                ProviderName="System.Data.SqlClient" SelectCommand="SELECT UID, userID, pds#categoryID, pds#categoryNAME, productname, description FROM [MENU_PRODUCTS_Coley_Translate] WHERE pds#categoryID = '99'"
                                OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [MENU_PRODUCTS_Coley_Translate] SET [pds#categoryID] = @pds#categoryID, [pds#categoryNAME] = @pds#categoryNAME WHERE [UID] = @UID">
                                <UpdateParameters>
                                    <asp:Parameter Name="pds#categoryID" Type="Int32" />
                                    <asp:Parameter Name="pds#categoryNAME" Type="String" />
                                    <asp:Parameter Name="UID" Type="Int32" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <%--<asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conn_pipiusers %>"
                                ProviderName="System.Data.SqlClient" SelectCommand="SELECT UID, userID, pds#categoryID, pds#categoryNAME, productname, description FROM [MENU_PRODUCTS_Coley_Translate] WHERE pds#categoryID = '99'"
                                OldValuesParameterFormatString="original_{0}" 
                UpdateCommand="UPDATE [MENU_PRODUCTS_Coley_Translate] SET [pds#categoryID] = @pds#categoryID, [pds#categoryNAME] = @pds#categoryNAME WHERE [UID] = @UID" 
                onload="SessionDataSource1_Load">
                                <UpdateParameters>
                                    <asp:Parameter Name="pds#categoryID" Type="Int32" />
                                    <asp:Parameter Name="pds#categoryNAME" Type="String" />
                                    <asp:Parameter Name="UID" Type="Int32" />
                                </UpdateParameters>
                            </asp:SqlDataSource>--%>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue"
                AnimationDuration="250" EnableSkinTransparency="false" Transparency="25">
            </telerik:RadAjaxLoadingPanel>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="WebBlue"
                EnableSkinTransparency="false" Transparency="25">
            </telerik:RadAjaxLoadingPanel>
            <cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="GridPanel"
                Radius="9">
            </cc1:RoundedCornersExtender>
            <cc1:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="RadAjaxPanel1"
                Radius="9">
            </cc1:RoundedCornersExtender>
        </div>
    </div>
</div>
James
Top achievements
Rank 1
 answered on 22 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?