Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Hi,

Question:  How do you prevent a dock zone in horizontal orientation from wrapping the dock zones? 
Reason:    I need to keep all windows in 1 row and have a scroll bar allow the user to see the windows that go off the page.  This needs to maintain only 1 row of windows even when users resize their browser.

Why:
I am building a dashboard that allows users to add as many dock windows to a single horizontal dock zone as they wish.  We offer a setting in the interface that lets the user show N windows in the current screen. We set the window width based on the the current resolution divided by the number of windows the user wants to view in the screen.  All other windows (if any) go off the page to the right and user can view them with the horizontal scroll bar.

Ex) If the user has 5 windows and they choose to view 3 windows in the screen and our screen width is 1000px... We would make the window width = 1000 / 3 (roughly).  The other 2 windows would be off the page and the scroll bar is needed to view them.
 
Thank you in advance for your help!

Ryan
Pero
Telerik team
 answered on 08 Sep 2011
3 answers
175 views
Dear Telerik team!

Could you please advice if it is possible to set a minimum width for a radscheduler column?

I've got a scheduler with variable number of columns. So it would be preferable if having few columns the scheduler was as large as the whole page but having many ones it showed the horizontal scroll bar and make the colunm width, say, 250px...

Thank you very much!
Plamen
Telerik team
 answered on 08 Sep 2011
1 answer
390 views
HI, Can you please tell me , how to reload new captcha image from javascript when ever client side validation of other controls fails in the same page.
Pero
Telerik team
 answered on 08 Sep 2011
4 answers
73 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
152 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
282 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
268 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
70 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
66 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
109 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?