Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
117 views
Hi Telerik,

I see all of my RadWindows sized improperly, but only when rendered under the Opera browser.

Browser Information:

Version
11.51
 
Build
1087
 
Platform
Win32
 
System
Windows 7
 
XHTML+Voice
Plug-in not loaded
 
Browser identification
 
Opera/9.80 (Windows NT 6.1; U; Edition United States Local; en) Presto/2.9.168 Version/11.51

Relevant code-behind:

<telerik:RadWindowManager ID="RadWindowManager1" Runat="Server" Skin="Web20" Modal="True" KeepInScreenBounds="True" EnableShadow="True" Behaviors="Close, Move" VisibleStatusbar="False" ReloadOnShow="True" ShowContentDuringLoad="False" Behavior="Close, Move" Title="Confirm Action" IconUrl="~/Content/Dashboard/Icons/radwindow_confirmdelete.png">
    <Windows>
        <telerik:RadWindow ID="UploadDashboardWindow" Runat="Server" NavigateUrl="~/Dashboard/Dialog/Windows/UploadDashboard.aspx" IconUrl="~/Content/Dashboard/Icons/drive-upload.png" OnClientClose="OnUploadDashboardClose" OnClientAutoSizeEnd="OnClientAutoSizeEnd" Title="Upload Dashboard" Height="100" ReloadOnShow="False" />
    </Windows>
</telerik:RadWindowManager>

<%@ Page Language="C#" EnableViewState="False" AutoEventWireup="True" CodeBehind="UploadDashboard.aspx.cs" Inherits="CableSolve.Web.Dashboard.Dialog.Windows.UploadDashboard" %>
 
<!DOCTYPE html>
 
<html lang="en">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <link rel="stylesheet" type="text/css" href="../../../Content/Dashboard/UploadDashboard.css" />
 
        <telerik:RadCodeBlock ID="RadCodeBlock1" Runat="Server" >
            <script type="text/javascript">
                var radUpload1ID = "<%= RadUpload1.ClientID %>";
            </script>
        </telerik:RadCodeBlock>
 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
            <CompositeScript>
                <Scripts>
                    <asp:ScriptReference Path="~/Scripts/Dashboard/UploadDashboard.js" />
                    <asp:ScriptReference Path="~/Scripts/jquery-1.4.1.min.js" />
                </Scripts>
            </CompositeScript>
        </telerik:RadScriptManager>
 
        <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" DecoratedControls="All" Skin="Web20" />
 
        <fieldset id="Upload Dashboard">
            <legend>Upload Dashboard</legend>
            <telerik:RadUpload ID="RadUpload1" Runat="server" AllowedFileExtensions=".xml" Skin="Web20" MaxFileInputsCount="1" ControlObjectsVisibility="None" Height="40px" Width="230px" BorderWidth="0px" >
            </telerik:RadUpload>
 
            <div class="BottomButton">
                <telerik:RadButton ID="RadButton1" Runat="server" Skin="Web20" Text="Upload" OnClick="RadButton1_Click" OnClientClicked="CloseAndSave" />
            </div>
        </fieldset>
 
    </form>
</body>
</html>

html, form, body
{
    font-size: 12px;
    font-family: "segoe ui",arial,sans-serif;
    overflow: hidden;
}
 
.LabelEnabled
{
    color: Black !important;
}
 
.LabelDisabled
{
    color: Gray !important;
}
 
.riTextBox
{
    color: Black !important;
}
 
.BottomButton
{
    margin-top: 35px;
    margin-left: 88px;
    margin-bottom: 5px;
}
 
.RadUpload .ruFileInput,
.RadUpload .ruFakeInput,
.RadUpload .ruBrowse
{
    cursor: pointer !important;
}

I have attached two images to this post. They are screenshots of Chrome vs Opera for the code mentioned above. The window that I am showing in the screenshots opens up smaller than anticipated in Opera. Other RadWindows I have open larger than anticipated. 

I did some searching on the Telerik forums, and found this link from 2009. I am not sure if this discussion is still applicable current day, however. If so, does Telerik have any suggestions on best practice for handling this scenario?

Cheers,

Sean
Marin Bratanov
Telerik team
 answered on 08 Sep 2011
3 answers
169 views
Hi friends am using Localized TextBox in my Application. I wish to use rad tooltip for that.
But In My application all controls are Multi Language Support. So i cant provide display text directly to the controls. using some other resources only i can display it.
Meanwhile i need to add rad tooltip to that Localised TextBox.

Can u sent me a sample for that.

Thanks in Advance
Marin Bratanov
Telerik team
 answered on 08 Sep 2011
4 answers
347 views
Hello,

If need to create a 'delete column' programmatically due to authorization constraints ( I need to show or hide the column based on privilege) that prompts for delete but I would rather it say 'Delete client John Smith?' rather than 'Delete this client?' i.e. I would like to personalize it for each row.  This is what I have now:

 if (((UserProfile)Session["_userProfile"]).IsAuthorized("Client - Delete"))  
        {  
            _buttonColumn = new GridButtonColumn();  
            radGridClients.MasterTableView.Columns.Add(_buttonColumn);  
            _buttonColumn.ButtonType = GridButtonColumnType.ImageButton;  
            _buttonColumn.ConfirmDialogType = GridConfirmDialogType.Classic;  
            _buttonColumn.ConfirmText = "Delete this client?";  
            _buttonColumn.HeaderText = "Delete";  
            _buttonColumn.HeaderStyle.Width = 40;  
            _buttonColumn.CommandName = "Delete";  
            _buttonColumn.ImageUrl = "./images/delete.gif";  
        } 

When using a declarative template column I could do an "Eval" to get the cuurent row on the databaind using a template column like so:

            <telerik:GridTemplateColumn   
                UniqueName="TemplateDeleteColumn" 
                HeaderText="Delete" 
                HeaderStyle-Width="60" > 
                <ItemTemplate> 
                    <asp:ImageButton ID="DeleteButton" OnClick='<%# Eval("NameLast2First", "return confirm(\"Delete all record of the Client {0} from the database?\");" ) %>'  runat="server"  ImageUrl="./images/delete.gif" CommandName="Delete"  /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 

How would one create a dynamic ConfirmText when creating the column programatically?

Thanks
Jonathan
Michael
Top achievements
Rank 1
 answered on 08 Sep 2011
3 answers
301 views

i want disply radalert popup @ the center of the screen.
am calling radalert on page load.
How to do that?
  <telerik:RadWindowManager ID="rdWindowManager" runat="server" EnableEmbeddedSkins="false" Skin="rdWindowsAlert" >
                            </telerik:RadWindowManager>
                            <telerik:RadAjaxManager ID="rdAjaxmanager" runat="server" >
                                <AjaxSettings>
                                    <telerik:AjaxSetting>
                                        <UpdatedControls>
                                            <telerik:AjaxUpdatedControl ControlID="rdWindowManager" />
                                        </UpdatedControls>
                                    </telerik:AjaxSetting>
                                </AjaxSettings>
                            </telerik:RadAjaxManager>

RadAjaxManager rdAjaxmanager = (RadAjaxManager)this.Parent.FindControl("rdAjaxmanager");
rdAjaxmanager.ResponseScripts.Add("radalert('Data is not available', 350, 150,'Model');");

Marin Bratanov
Telerik team
 answered on 08 Sep 2011
1 answer
88 views
We have a slider with a colspan specification.  If we make the width="100%", it only makes it as wide as the first column.  If we do a width="400px", we run into problems with column widths as we don't know how wide the four columns will be. 

I expect the "100%" to make it as wide as the four columns.  How can we make it 100% or is a code fix needed as to me, it appears to be a bug in the control.  Here is the code snippet:

<tr>
        <td>Off</td>
        <td colspan="4">
            <telerik:RadSlider ID="RunAssetRS" runat="server"  width="100%" OnClientValueChanged="RunAssetRS_OnValueChanged" OnClientLoad="RunAssetRS_OnValueChanged" ShowDecreaseHandle="false" ShowIncreaseHandle="false" ></telerik:RadSlider>
        </td>
        <td>990</td>
</tr>


Bozhidar
Telerik team
 answered on 08 Sep 2011
0 answers
88 views
How can i add programatically worksheets in the exported excel in an efficient way. Starting from specifying datasource and worksheet name for each worksheet , assuming that the datasource of type list<anything>.
nader
Top achievements
Rank 1
 asked on 08 Sep 2011
1 answer
154 views
Hi guys,

I have a Gridview wich is grouped by a column.

Design
<GroupByExpressions>
                    <telerik:GridGroupByExpression>
                     
                        <SelectFields>
                            <telerik:GridGroupByField   FieldAlias="TL" FieldName="TargetLanguageCode" FormatString="{0:D}"
                                HeaderValueSeparator=": " HeaderText="">
                                 
                                </telerik:GridGroupByField>
                                 <telerik:GridGroupByField   FieldAlias="Flag" FieldName="FlagIcon" FormatString="{0:D}"
                                HeaderValueSeparator=": " HeaderText="">
                                 
                                </telerik:GridGroupByField>
                                 
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="TargetLanguageID" SortOrder="Descending"></telerik:GridGroupByField>
                             <telerik:GridGroupByField FieldName="FlagIcon" ></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>

On the Grid ItemDataBound event I delete all the controls from the Group template and add a label and image
protected void gridGeneratePackages_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridGroupHeaderItem)
    {
        GridGroupHeaderItem item = e.Item as GridGroupHeaderItem;
        Image img = new Image();
        img.ImageUrl = ((DataRowView)e.Item.DataItem)[1].ToString();
        img.Width = 16;
        img.Height = 12;
 
        Label lbl = new Label();
        lbl.Text = ((DataRowView)e.Item.DataItem)[0].ToString(); ;
        lbl.Style.Add("margin-left", "3px");
        item.DataCell.Controls.Clear();
        item.DataCell.Controls.Add(img);
        item.DataCell.Controls.Add(lbl);
    }
}

This works perfectly when loaded, but when I click on a Grid Arrow to expand a Parent/Child, my added controls are removed and the ones in the design appears.

Any idea if there is a better solution ?

Thanks.





Mira
Telerik team
 answered on 08 Sep 2011
6 answers
295 views
After upgrading to the Q2 release today, I get the error below as soon as I hit the page with the RadEditors. It does not hit any break points. It happens in both Release and Debug mode.
 
I have multiple RadEditors on the page sharing a single toolbar using the ToolBarProviderID property. When I stop sharing the toolbar, I do not get the error. 

At one time, the Stack Trace referenced a method with a name like "Ribbon" something. I believe it has to do with the new ribbon functionality.

I do not get this error when I use the Q1 release.

Please let me know if there is a workaround for the problem.

--------

Value cannot be null.
Parameter name: child

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.ArgumentNullException: Value cannot be null.
Parameter name: child

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:

[ArgumentNullException: Value cannot be null.
Parameter name: child]
   System.Web.UI.ControlCollection.Add(Control child) +11023974
   Telerik.Web.UI.RadEditor.ControlPreRender() +225
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

Rumen
Telerik team
 answered on 08 Sep 2011
1 answer
272 views
can i set different page have different page size , 
such as page 1 , pagesize="3"
page 2 , pagesize ="1"
Tsvetina
Telerik team
 answered on 08 Sep 2011
3 answers
159 views
Hi, 

I'm using the same RadGrid control for several different datasources, and thus I'd like to have it add columns automatically as it is now. However I'm having a problem converting specified int columns into checkbox columns (the values are all 0 and 1). Is there any way to cast/change the column from a GridNumericColumn into a checkbox column, or do you have any advice on how to resolve the situation?
Morten
Top achievements
Rank 1
 answered on 08 Sep 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?