Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
69 views
Hi.
im exporting my grid to pdf. At the end i want to add some text. How to add the text at the end of pdf file?
Shinu
Top achievements
Rank 2
 answered on 09 Dec 2013
1 answer
208 views
I need to create some icons for custom editor toolbar tools. What size do they need to have to display nicely with all default toolbar icons?
Vessy
Telerik team
 answered on 09 Dec 2013
2 answers
159 views
Dear Telerik,

I'm having the following probelm:

We have a telerik:RadGrid that uses grouping, filtering, sorting and paging. The filtering and page-size selection do not work when paging is enabled. The strange thing is: when I click on one of the column headers, the grid is sorted correctly AND filtering and page-size chainging suddenly works. As soon as I remove the AllowPaging="true" property of the RadGrid, filtering works on first load.

I noticed that there are JavaScript error messages displayed when the page loads and when you click any of the filters. These are only shown when paging is activated and you haven't sorted the grid yet.

The error messages are:

ReferenceError: WebForm_InitCallback is not defined (displayed when page is loaded)

and

TypeError: $find(...) is null (displayed every time you click on a filter icon)


What can cause there errors? Please help me. Thank you.
Michael
Top achievements
Rank 2
 answered on 09 Dec 2013
23 answers
488 views
Hi 

I have recently upgraded my browser to IE9 (version 9.0.8112.16421) , all of sudden AJAX Radlistbox stopped showing items on browser when I have headertemplate and height specified. But technically items are available when I access through client API.

Is there anyway to fix this ? in chrome its working fine
<telerik:RadListBox ID="RadListBox1" runat="server" Height ="400px"  Width="250px">
         <ButtonSettings TransferButtons="All"></ButtonSettings>
         <Items>
             <telerik:RadListBoxItem runat="server" ListBox="RadListBox1" Text="gssdf" Value="fg89fgf" />
             <telerik:RadListBoxItem runat="server" ListBox="RadListBox1" Text="565" Value="fg787fgf" />
             <telerik:RadListBoxItem runat="server" ListBox="RadListBox1" Text="gs676sdf" Value="f787gfgf" />
             <telerik:RadListBoxItem runat="server" ListBox="RadListBox1" Text="gs565sdf" Value="fg87fgf" />
         </Items>
         <HeaderTemplate >
              <input id="chkALLExpr" type="checkbox" onclick="ChkALLExpressions();" />
             Select ALL
         </HeaderTemplate>
        <%-- <FooterTemplate>
             <input id="cmdRemoveExpr" type="button" value="Delete" onclick="cmdDeleteExpression_Click();" />
             <input id="cmdNewExpression" type="button" value="New Expression" onclick="cmdNewExpression_Click();" />
         </FooterTemplate>--%>
     </telerik:RadListBox>


Thanks
Asankhan 
Bozhidar
Telerik team
 answered on 09 Dec 2013
1 answer
172 views
I have a RadTabStrip on a page with three tabs. Each tab has a user control inside it.
When the user is editing an existing record, the tabs should be enabled. But when the user is entering a new record, the tabs should be disabled. After the user enters a new record and clicks the save button and the new record has been added to the database, I want to enable the tabs.
Ideally, I would enable the tabs in the RadTabStrip Load event, but this event fires before the user control is loaded and the events which add the new record to the database.
I tried enabling the tabs in the Page LoadComplete event, but this seems to have no effect. I verified with the debugger that the tabs are enabled inside the LoadComplete event, but they aren't enabled when the page is rendered. Is there some other way to accomplish this?
protected void Page_LoadComplete(object sender, EventArgs e)
{
    bool enabled;
    if (SessionHandler.SelectedID == "Unknown")
    {
      // new record
        enabled = false;
    }
    else
    {
      // existing record
        enabled = true;
    }
    foreach (RadTab tab in RadTabStrip1.Tabs)
    {
        tab.Enabled = enabled;
    }
}
Tim
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 09 Dec 2013
1 answer
183 views
Hello,

I want to show the CommandItemTemplate in "Top" only. I am using the default commanditemtemplate of RadGrid. I have set CommandItemDisplay = "Top", then also the commanditemtemplate toolbar is showing in top and bottom.

Please look on to the following code:

<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" AllowAutomaticUpdates="True"

        AllowAutomaticInserts="False" AllowAutomaticDeletes="False" AllowFilteringByColumn="True"

        AllowSorting="True" PageSize="20" ShowFooter="True" AllowPaging="True" runat="server"

        GridLines="None" EnableLinqExpressions="false" EnableHeaderContextMenu="true" Height="780px"

        EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="True"

        OnPreRender="RadGrid1_PreRender"

        OnInsertCommand="RadGrid1_InsertCommand"

        OnUpdateCommand="RadGrid1_UpdateCommand"

        OnDeleteCommand="RadGrid1_DeleteCommand"  

        OnNeedDataSource="RadGrid1_NeedDataSource"

        OnItemCommand="RadGrid1_ItemCommand"

        OnItemCreated="RadGrid1_ItemCreated"

        OnItemEvent="RadGrid1_ItemEvent"

        OnExportCellFormatting = "RadGrid1_ExportCellFormatting">

  

        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>

        <GroupingSettings CaseSensitive="false"></GroupingSettings>

        <ExportSettings IgnorePaging="false" ExportOnlyData="true" OpenInNewWindow="true">

            <Pdf PageWidth="1000px" />           

        </ExportSettings>

         

        <MasterTableView DataKeyNames=" ID" AutoGenerateColumns="false" IsFilterItemExpanded="false"

            EditMode="Batch" CommandItemDisplay="Top" AllowFilteringByColumn="True"

            ShowFooter="false" TableLayout="Auto" ShowHeadersWhenNoRecords="true" Width="112%"

            CommandItemSettings-SaveChangesText="Save" CommandItemSettings-CancelChangesText="Cancel"

            CommandItemSettings-AddNewRecordText="Add">

             

            <%--Buttons Settings of Export and Add New--%>

            <CommandItemSettings ShowAddNewRecordButton="true" ShowExportToWordButton="true"

                ShowExportToExcelButton="true" ShowExportToCsvButton="false" ShowExportToPdfButton="true" />

             

            <%--Type of Edit - Show EditMode of one Cell at a time or Row at a time--%>

            <BatchEditingSettings EditType="Cell" />

             

            <%--Sort Expression Settings--%>

            <SortExpressions>

                <telerik:GridSortExpression FieldName="Product_Name" />

            </SortExpressions>

            <Columns>
                 ......
               
</Columns>
        </MasterTableView>        
        <HeaderStyle Height="40px" />
        
        <%-- Functionality Settings  --%>
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Resizing AllowColumnResize="True" AllowRowResize="false" ClipCellContentOnResize="true"
                AllowResizeToFit="true" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" />
            <Scrolling AllowScroll="true" UseStaticHeaders="True" SaveScrollPosition="true"/>
            <Selecting AllowRowSelect="true" />
            <ClientEvents  />
        </ClientSettings>
    </telerik:RadGrid>



I want to show commanditemtemplate in "Top" only.

Please suggest me, what i am missing here.

Princy
Top achievements
Rank 2
 answered on 09 Dec 2013
3 answers
207 views
Is there a way to scale a Rad Rotator image proportionally without stretching it? I basically want an image to take up the entirety of the rotator's box with no white-space on the X or Y axis, but I don't want the image to be distorted. It works now when I tell the image/item to have 100% width, but if any image is REALLY wide, I have whitespace on the top and bottom of the fixed-size rotator. The same applies if I size an image/item with 100% height... I just want the whole screen -filled- regardless of the dimensions of the image, but no stretching.

This is for a full-screen rotator that displays images on a TV, where the administrator simply drags images into a folder.
Slav
Telerik team
 answered on 09 Dec 2013
2 answers
373 views
Hi,

I am trying to hide the notification when a user clicks anywhere on it - when the title bar is off. 
I can use JQuery and have tried :

Setting OnClientClicked="test"

function test() {
                alert("hahaha");
            }

Next tried 

$('#' + "<%=radNotification.ClientID%>").click(function () {
                             alert("ho ho ho");
 
                         });

    Next tried OnClientShown=OnClientShown
function OnClientShown(sender, args) {
                         $(sender).click(function () {
                             alert("ho ho ho");
                         });
                     }

Then tried Class = "NotificationTest"

   $('.NotificationTest').click(function () {
                            alert("ho ho ho");
                        });  
 
and even
 
$('.RadNotification .RadNotification_Default .SLANotification .rnNoTitleBar').click(function () {
                            alert("ho ho ho");
                        });

But none of this is working. Please help.
Thanks
Saranya
Top achievements
Rank 1
 answered on 09 Dec 2013
2 answers
875 views
Hello, Telerik Team 

I was using telerik:RadGrid control and grid ItemTemplate bind radbutton with toggletype set to checkbox and buttontype as standard button,
 this is bind properly well and displayed data is good, but when I am check if at least  one selected checkbox in grid on click on save data, I was only client side checking and using JavaScript currently I find your telerik forum code but they are not working ,Please help to me

Thanks
Jyosana
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/PMMain.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ArchonixXJailProgramManagement.ProgramManagement.WebForm1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentPlaceHolder" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Width="100%">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript">
 
            function ValidateCheckBox(sender, eventArgs) {
                var TargetBaseControl = document.getElementById('<%= grdScheduler.ClientID%>');
                var TargetChildControl = "btnToggle";
                var Inputs = TargetBaseControl.getElementsByTagName("input");
                var postback = false;
                for (var n = 0; n < Inputs.length; ++n) {
                    if (Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl, 0) >= 0) {
                        if (Inputs[n].checked) {
                            postback = true;
                            break;
                        }
                    }
                }
                sender.set_autoPostBack(postback);
                if (!postback) {
                    alert('Please select atleast one checkbox record!');
                }
            }
        </script>
    </telerik:RadCodeBlock>
     <telerik:RadAjaxPanel ID="radSSNSearch" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <div class="program_container">          
            <fieldset>
                <legend>Scheduler Class </legend>
                <table id="Table2" align="center" runat="server" cellspacing="0" cellpadding="4"
                    style="width: 98%; height: 100%; vertical-align: top">
                    <tr>
                        <td colspan="2">
                            <telerik:RadGrid ID="grdScheduler" runat="server" AllowPaging="True" AllowSorting="True"
                                AutoGenerateColumns="False" AllowAutomaticDeletes="false" AllowAutomaticUpdates="false"
                                OnNeedDataSource="grdScheduler_NeedDataSource" OnItemDataBound="grdScheduler_ItemDataBound">
                                <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                <MasterTableView Width="100%" CommandItemDisplay="None" ClientDataKeyNames="SchedulePK">
                                    <CommandItemSettings ShowAddNewRecordButton="false" />
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Enroll">
                                            <ItemTemplate>
                                                <telerik:RadButton ID="btnToggle" runat="server" Width="17px" ToggleType="CheckBox"
                                                    Checked='<%# Convert.ToBoolean(Eval("Enroll")) %>' ButtonType="StandardButton"
                                                    CommandArgument='<%# Eval("ScheduleClassPK") %>' AutoPostBack="false">
                                                    <ToggleStates>
                                                        <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckboxChecked" />
                                                        <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckbox" />
                                                    </ToggleStates>
                                                </telerik:RadButton>                                            
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>                                      
                                        <telerik:GridBoundColumn HeaderText="Class Name" SortExpression="ClassName" UniqueName="ClassName"
                                            DataField="ClassName">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Description" SortExpression="Description" UniqueName="Description"
                                            DataField="Description">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Location" SortExpression="LocationCode" UniqueName="LocationCode"
                                            DataField="LocationCode">
                                        </telerik:GridBoundColumn>                                    
                                    </Columns>
                                    <ItemStyle HorizontalAlign="Left" />
                                    <AlternatingItemStyle HorizontalAlign="Left" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <telerik:RadButton ID="btnSave" runat="server" OnClick="btnSave_Click" AutoPostBack="false" OnClientClicked="ValidateCheckBox"
                                Text="Save">
                            </telerik:RadButton>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </div>      
    </telerik:RadAjaxPanel>
</asp:Content>
Jyosana
Top achievements
Rank 1
 answered on 09 Dec 2013
5 answers
313 views
Hi,

I'm trying to do the following:

<telerik:RadDatePicker ID="DatePicker" runat="server" width="100px">
    <DateInput ID="DatePickerInput" runat="server">
    </DateInput>
</telerik:RadDatePicker>
 
<script type="text/javascript">
function ValidateDate(sender, args)
{
    var datePicker = $find("<%= DatePicker.ClientID %>");
    args.IsValid = datePicker.get_dateInput._invalid;
}
</script>
 
<asp:CustomValidator ID="DatePickerInput" runat="server"
    Display="Dynamic" ControlToValidate="DateIsValid"
    EnableClientScript="true" ClientValidationFunction="ValidateDate" ErrorMessage="Invalid Date" />

Whenever I set the RadDatePicker as the ControlToValidate, it seems that the validator only gets fired on the RadDatePicker's client-events, and not the RadDateInput's client-events. E.g. typing "hello" in the input and losing focus won't fire the validator, but selecting a date from the calendar will.
However the example above does not work.
I've thought of some alternative ways, but this one seemed so pretty.

Can is set the RadDatePicker's DateInput as the "control to validate"?
Laurens
Top achievements
Rank 1
 answered on 09 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?