Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
97 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
74 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
137 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
163 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
90 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
97 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
83 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
152 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
160 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?