Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
175 views
Hi Telerik,

I am messing around with some proof of concept stuff and I was wondering if it possible to treat a RadWindow as a RadDock such that it is dockable, or store the RadWindow inside of the RadDock in such a way that a Silverlight control would be able to run inside of the RadWindow.

Ideally, the RadWindow would not be visible, only the content inside of it is visible. Really, what I want is a TargetURL for a RadDock.

Is something along these lines possible? I've got the window open with our silverlight running inside of it, but it's not pinned to the dock.

Sean
Marin Bratanov
Telerik team
 answered on 23 Aug 2011
1 answer
120 views
I'm trying to setup paging for RadGrid and it works fine in some scenarios but there are 3 issues with it:

@  Load the page initially, go to the second page, then go back to the first page; the data is not updated so shows the second page data!

@ Load the page initially, change the page size from 10 to 50. expect: the page should immediately be reloaded with the new page size. actual: no change. generally something wrong with the first page!

@ pdf icon disappears when clicking any page number apart from the first. It appears again when the first page number is clicked but the data has the above issue.

Maybe it's not configured properly (it's generated using my RadGridBuilder class). I have set the below properties:

            this.RadGrid.AllowPaging = this.AllowPaging;
            this.RadGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;

private void RadGridNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            this.RadGrid.DataSource = this.DataSource;
        }

My Build method is responsible to buld the RadGrid basically:

 public RadGrid Build()
        {
            this.DataSource = GetDataSource();

            SetImmediateProperties();

            SetMasterTableView();

            ConfigureExportSettings();

            this.RadGrid.Rebind();

            return this.RadGrid;
        }

Why do I have the above issues and how to resolve them?

After further investigation, it's clarified that PageIndexChanged event is never raised when the page number 1 is clicked. Not sure why?

Very much appreciated.
Iana Tsolova
Telerik team
 answered on 23 Aug 2011
3 answers
90 views
I need to add user names and their appointments in the timeline view so in order to achieve that I am adding ResourceTypes to the scheduler in the following manner:

<asp:SqlDataSource ID="sqlMain" runat="server"></asp:SqlDataSource>
<asp:SqlDataSource ID="sqlUsers" runat="server"></asp:SqlDataSource>
<telerik:RadScheduler ID="radSchedule1" runat="server" Height="100%"
MinutesPerRow="15" Skin="Web20" StartInsertingInAdvancedForm="True"
AdvancedForm-Modal="True" AdvancedForm-Width="400px" TimelineView-GroupBy="Users" TimelineView-GroupingDirection="Vertical"  FirstDayOfWeek="Monday" SelectedView="WeekView" Localization-HeaderWeek="Work Week">
<ResourceTypes>
    <telerik:ResourceType KeyField="UserId" Name="Users" TextField="Name" ForeignKeyField="UserId" DataSourceID="sqlUsers" />
</ResourceTypes>
<AdvancedInsertTemplate>
  ......
</AdvancedInsertTemplate>
<AdvancedEditTemplate>
  ......
</AdvancedEditTemplate>
</telerik:RadScheduler>

As soon as I add the <ResourceTypes> part the scheduler navigation stops working (Day, Week, Month, Timeline and others). Would could be causing this behavior? Thanks
Plamen
Telerik team
 answered on 23 Aug 2011
3 answers
72 views
Hello,

I have a telerik grid that contains japonese text in its columns contents.
It's ok, but when the user try to use the default functionallity to export the content to pdf format, the japonese characters are showed as "#" characters.

How can I fix this?

Regards
Princy
Top achievements
Rank 2
 answered on 23 Aug 2011
0 answers
135 views
Hello,

I have a problem in focusing on the radwindow control.
I'm trying to show to focus on radwindow control using a content page (Not master page) where no body tag exists. So how can I focus on radwindow control? Is there any way to access the masterpage body tag in order to use the onload attribute?

Very Important: The hierarchy is:     BaseMasterPage (Has the body tag) => DefaultMasterPage => ForgottenPassword Page, In other words, I have to access the body tag of the Master of Master Page .

Here is my content page:
<%@ Page Title="" Language="C#" MasterPageFile="~/RL/MasterPages/DefaultMasterPage.master" AutoEventWireup="true" CodeFile="ForgottenPassword.aspx.cs" Inherits="GuidesNS.RL_Pages_ForgottenPassword" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   <script type="text/javascript">
       function FocusOnRadWindow() {
           window.setTimeout(function () {
               GetRadWindow().GetContentFrame().contentWindow.focus();
           }, 100);
       }
   </script>
</asp:Content>
  
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <!-- Page Controls -->
</asp:Content>

In case i'm using a aspx page which is not a content page of master page, then I can access the onload attribute of the "body" tag directly:

<body onload="FocusOnRadWindow()">
  <form  id="form1" runat="server">
    <div>
  
    </div>
  </form>
</body>


Please, I need your help,
It is very appreciated to send me the modified code.

Regards,
Bader
Bader
Top achievements
Rank 1
 asked on 23 Aug 2011
1 answer
160 views
The current findItemByText client-side function looks for items with exact text match. Is it possible to use it (or another function) more like a "StartsWith" function?
Ivana
Telerik team
 answered on 23 Aug 2011
1 answer
89 views
Hi, I've got a problem with deleting items in Grid. The issue is only on ie 8 build 6001, others browser work fine. The scenario is: 
1. Click on delete icon on grid row, then the modal popup shows
2. The default generated buttons (Ok and Cancel) doesn't work (there is no postback).

Here's the aspx source code:
<telerik:RadGrid ID="rgEmployees" OnSortCommand="rgEmployees_SortCommand" OnPageIndexChanged="rgEmployees_PageIndexChanged"
            OnPageSizeChanged="rgEmployees_PageSizeChanged" AllowSorting="True" PageSize="15"
            OnItemCommand="rgEmployees_ItemCommand" AllowPaging="True" AllowMultiRowSelection="True"
            AllowFilteringByColumn="True" OnNeedDataSource="rgEmployees_OnNeddDataSource"
            OnUpdateCommand="rgEmployees_UpdateCommand" OnDeleteCommand="rgEmployees_DeleteCommand"
            ShowStatusBar="true" runat="server" GridLines="None">
            <GroupingSettings CaseSensitive="false" />
            <ClientSettings EnablePostBackOnRowClick="true">
            </ClientSettings>
            <MasterTableView DataKeyNames="E_Id" AutoGenerateColumns="false">
                <Columns>
                    <%--  <telerik:GridBoundColumn DataField="E_Id" HeaderText="Identyfikator" UniqueName="E_Id" FilterControlWidth="50px">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="E_Name" HeaderText="ImiÄ™" UniqueName="E_Name"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Surname" HeaderText="Nazwisko" UniqueName="E_Surname"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Address" HeaderText="Adres" UniqueName="E_Address"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_City" HeaderText="Miasto" UniqueName="E_City"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Function" HeaderText="Funkcja" UniqueName="E_Function"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_LandlinePhone" HeaderText="Tel. stacjonarny"
                        UniqueName="E_LandlinePhone" FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_MobilePhone" HeaderText="Tel. komórkowy" UniqueName="E_MobilePhone"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="E_Email" HeaderText="E-mail" UniqueName="E_Email"
                        FilterControlWidth="100px">
                    </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                        ItemStyle-Width="15" />
                    <telerik:GridButtonColumn ConfirmText="Usunąć pracownika?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Usuwanie" Text="UsuÅ„" ButtonType="ImageButton" CommandName="Delete"
                        ConfirmDialogHeight="150px" ConfirmDialogWidth="260px" ItemStyle-Width="15" />
                </Columns>
                <EditItemStyle ForeColor="Gray" />
                <EditFormSettings>
                    <FormTableItemStyle Wrap="False" Width="100%"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2" CssClass="module"
                        Height="30" BackColor="White" Width="60" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <FormStyle Width="100%"></FormStyle>
                    <EditColumn ButtonType="ImageButton" UpdateText="Uaktualnij wiersz" UniqueName="EditCommandColumn1"
                        CancelText="Anuluj edycjÄ™">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
        </telerik:RadGrid>

And here's the delete event code:

protected void rgEmployees_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            LogManager.GetCurrentClassLogger().Info("Usuwam pracownika");
  
            var gridDataItem = e.Item as GridDataItem;
            if (gridDataItem == null)
            {
                LogManager.GetCurrentClassLogger().Info("gridDataItem jest null");
                return;
            }
  
            var id = Convert.ToInt32(gridDataItem.GetDataKeyValue("E_Id").ToString());
  
            _db.DeleteEmployee(id);
            LogManager.GetCurrentClassLogger().Info("UsunÄ…Å‚em pracownika o id = " + id.ToString());
        }

Thank you in advance!
Michal
Top achievements
Rank 1
 answered on 23 Aug 2011
0 answers
94 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
63 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
80 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?