Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views
I'm looking for a way to print the content of two panes in a same page, but without the splitbar. Is there a built in function to do this in the controls? If you have ideas.....
Sébastien
Top achievements
Rank 1
 answered on 28 Jun 2010
3 answers
171 views
On the RadDatePicker's calendar, the days are links which I want to change them to buttons (or just numbers without underline) so the calendar may look better.  Also, the navigation next and previous are links which I want to change to labers or just letters. Can somebody help?
Tsvetina
Telerik team
 answered on 28 Jun 2010
1 answer
124 views
Dear,
How to access the controls , example subject textbox and description textbox found in scheduler Advanced Form (by clicking options). I would like to open in edit mode only (not insert mode) and assign some text in description textbox and subject textbox and date set. How to do?

the below code is not working (null object returned your reply)

Your reply
protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e) 
{ 
if (e.Container.Mode == SchedulerFormMode.AdvancedEdit) 
{ 
  RadTextBox subtxt = (RadTextBox)e.Container.Controls[1].Controls[1].Controls[1].FindControl("SubjectText"); 
  subtxt.text = "Something"; 
} 
} 
Peter
Telerik team
 answered on 28 Jun 2010
4 answers
116 views
Hello,

Our users don't use the subject field of the appointment... I want to make it optional (no validation) or default it to untitled, because there is a bug with client-side binding and loading the advanced form.

I try to default it like:

//form is the advanced form
form._getSubjectTextBox().set_value("Untitled");

But nothing is working, how to default the subject so the error doesn't appear off of the start?  Or, how do I make it optional so the radtextbox doesn't display the error off of the start...

Thanks.
Kevin Price
Top achievements
Rank 1
 answered on 28 Jun 2010
1 answer
133 views
I am working on a page having Rad List View and RadDataPager. I am using Rad Ajax manager and Rad Ajax Loading Panel to display loading image when navigating between pages.
Everything is functioning well until I am setting the AllowSEOPaging="true" in the Data Pager. When I set AllowSEOPaging="true" and SEOPagingQueryPageKey="Page" the data pager display appearance is wrong and the loading image is not appearing.
Whenever there is a post back IsPostBack Value is always false and this is a weird thing.

 <form id="form1" runat="server">
    <div>
         <asp:ScriptManager ID="Teets" runat="server">
        </asp:ScriptManager>
       <%-- <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />--%>
        <telerik:RadAjaxManager ID="radAjaxManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0"
            EnableSkinTransparency="true" Transparency="50">
            <%--<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/ajax-loader.gif" AlternateText="loading" />--%>
            <table style="height: 100%; width: 900px" border="0">
                <tr>
                    <td width="900px" align="center" valign="middle">
                        <img src="Images/ajax-loader.gif" alt="" style="border: 0px;" />
                    </td>
                </tr>
            </table>
        </telerik:RadAjaxLoadingPanel>
        <asp:Panel ID="ListViewPanel1" runat="server">
            <telerik:RadListView ID="RadListView1" Width="100%" AllowPaging="true" runat="server"
                ItemPlaceholderID="ProductsHolder" OnPageIndexChanged="RadListView1_PageIndexChanged"
                DataKeyNames="id_product" OnNeedDataSource="RadListView1_NeedDataSource">
                <LayoutTemplate>
                    <fieldset style="width: 900px;" id="FieldSet1">
                        <legend>Products</legend>
                        <asp:Panel ID="ProductsHolder" runat="server" />
                        <table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
                            <tr>
                                <td>
                                    <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1" Skin="Outlook"
                                        PageSize="7" SEOPagingQueryPageKey="xyz" AllowSEOPaging="true">
                                        <Fields>
                                            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                            <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                            <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                            <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                                            <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                                TextBoxWidth="15" />
                                            <telerik:RadDataPagerTemplatePageField>
                                                <PagerTemplate>
                                                    <div style="float: right">
                                                        <b>Items
                                                            <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                            to
                                                            <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                            of
                                                            <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                            <br />
                                                        </b>
                                                    </div>
                                                </PagerTemplate>
                                            </telerik:RadDataPagerTemplatePageField>
                                        </Fields>
                                    </telerik:RadDataPager>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </LayoutTemplate>
                <ItemTemplate>
                    <div style="float: left;">
                        <table cellpadding="0" cellspacing="0" style="width: 230px; height: 100px">
                            <tr>
                                <td style="width: 20%;">
                                    Name:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# Eval("productName") %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Alias:
                                </td>
                                <td style="width: 80%; padding-left: 5px;">
                                    <%# Eval("productAlias")%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <hr />
                                </td>
                                <td>
                                    <hr />
                                </td>
                            </tr>
                        </table>
                    </div>
                </ItemTemplate>
            </telerik:RadListView>
        </asp:Panel>
    </div>
    </form>
Rosen
Telerik team
 answered on 28 Jun 2010
1 answer
113 views
Hello
I'm having a problem with checking filesize in RadUpload in my mvc project. I have made the changes to get radupload working with mvc http://www.telerik.com/help/aspnet-ajax/mvc-using-upload.html  and tried this solution http://www.telerik.com/help/aspnet/upload/clientsidefilesizecheck.html but the method never gets called.

javascript function
    function checkUploadedFilesSize(progressArea, args) { 
        //progressArea.confirmed is a custom variable, 
        // you can use another if you want to 
        alert('hei'); 
        if (!progressArea.confirmed && 
       args.get_progressData().RadUpload.RequestSize > 1) { 
            if (confirm("The total size of the selected files" + 
                 " is more than the limit." + 
                 " Do you want to cancel the upload?")) { 
                progressArea.cancelRequest(); 
            } 
            else { 
                progressArea.confirmed = "confirmed"; 
            } 
        } 
    } 

radupload
<telerik:RadUpload ID="imageUploader" runat="server" AllowedFileExtensions=".jpg,.jpeg,.gif,.png" 
    Language="nb-NO" Localization-Add="Legg til" Localization-Clear="Fjern" Localization-Delete="Fjern" 
    Localization-Remove="Fjern" Localization-Select="Velg" ViewStateMode="Inherit" Culture="nb-NO" CssClass="userImageUpload" Skin="Vista" 
    EnableFileInputSkinning="false"> 
</telerik:RadUpload> 
<telerik:RadProgressArea runat="server" ID="RadProgressArea1"  OnClientProgressUpdating="checkUploadedFilesSize"/> 
<telerik:RadProgressManager runat="server" ID="RadProgressManager1"  AjaxUrl="~/Telerik.RadUploadProgressHandler.axd" /> 

Also I don't know if this has anything to do with it but looking in firebug the first call when uploading a file always fails, and the last call seems to be waiting for a response forever. Uploading files still work okay though.

Anybody knows what might be the problem?





Genady Sergeev
Telerik team
 answered on 28 Jun 2010
3 answers
167 views
My project setup is as follows:

Master - content - code generated tab strip - code generated page view - user control page

The master page contains an Ajax manager with an Ajax proxy inside of the user control page

Inside my user control I have a button to open a rad Window defined in the master page, and a rad Grid.  Within the window is a rad upload, and for the post back event I have added functionality to do an insert into my database.

What I would like to do is refresh the grid after I have inserted into my DB.

I have been working with this example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

The problem I am having is that I am unable to use code based on the OnAjaxRequest event in the master page because my grid is located in the child control, and the proxy manager can't handle this event, so I'm unable to use the code in the child page.

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
    { 
        if (e.Argument == "Rebind") 
        { 
            RadGrid1.MasterTableView.SortExpressions.Clear(); 
            RadGrid1.MasterTableView.GroupByExpressions.Clear(); 
            RadGrid1.Rebind(); 
        } 
        else if (e.Argument == "RebindAndNavigate") 
        { 
            RadGrid1.MasterTableView.SortExpressions.Clear(); 
            RadGrid1.MasterTableView.GroupByExpressions.Clear(); 
            RadGrid1RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1; 
            RadGrid1.Rebind(); 
        } 
    } 

Thanks for any help


Ryan
Top achievements
Rank 1
 answered on 28 Jun 2010
1 answer
119 views
Hello all,

I require to customize the RadGrid just like the lay out in the attached image , is that possible ? more over i require all the the normal operation that is default to the RadGrid ( Filter , Column selection , Sort ... )
thanks
-Prince.



Pavlina
Telerik team
 answered on 28 Jun 2010
1 answer
73 views
I am using the code posted on this forum for adding a custom print button to the RadWindow title bar.  The code seems to work, but I get an error on the page that seems to be related to issuing the "insertBefore" command.  The code is provided in this post below. 

The error message is:

    Message: Sys.ArgumentUndefinedException: Value cannot be undefined.
    Parameter name: handler
    Line: 2472
    Char: 16
    Code: 0

<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
    <script type="text/javascript">
        var radWnd;
        
        function <%=ClientID%>_OpenPrintWindow(url){
            radWnd = radopen(url, null);
            radWnd.set_title('Print Contract Form');
            radWnd.set_modal(true);
            radWnd.setSize(750,500);
            radWnd.center();
            radWnd.set_visibleStatusbar(false);
            radWnd.add_show(OnClientShow());
            radWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move +
                                 Telerik.Web.UI.WindowBehaviors.Close +
                                 Telerik.Web.UI.WindowBehaviors.Resize);
        }
        function OnClientShow()
        {
            var TitleBar = radWnd.GetTitlebar();
            var parent = TitleBar.parentNode;
            var oUL = parent.getElementsByTagName('UL')[0];
            if (!(oUL.firstChild.id == "customprintbuttonID")) // Check if the element is already added
            {
                // If not - create and add the custom button
                oUL.style.width = "192px";
                var oLI = document.createElement("LI");
                oLI.id = "customprintbuttonID"
                var aPrintBtn = document.createElement("A");
                oLI.appendChild(aPrintBtn);
                aPrintBtn.className = "customprintbutton";
                aPrintBtn.href = "javascript:void(0)";
                aPrintBtn.title = "Print Content";
                aPrintBtn.onmousedown = printWin;
                oUL.insertBefore(oLI, oUL.firstChild);
            }
        }

        function printWin(e)
        {
            var content = radWnd.GetContentFrame().contentWindow;
            var printDocument = content.document;
            if (document.all)
            {
                printDocument.execCommand("Print");
            }
            else
            {
                content.print();
            }
            //Cancel event!
            if (!e) e = window.event;

            return $telerik.cancelRawEvent(e);
        }
     </script>        
</telerik:RadScriptBlock>

Georgi Tunev
Telerik team
 answered on 28 Jun 2010
3 answers
293 views
I have a radgrid that is built dynamically based on fields a user drops into a panel on my page. Each time a user adds a new field to the radgrid a datalist above the grid is rebound and lists all of the fields that are currently in the grid. I don't want the users to be able to sort the radgrid columns by clicking headers, instead each field in the datalist has three corresponding linkbuttons: Sort Ascending, Sort Descending and Clear Sort.

For Example:
Invoice Date
Sort Ascending | Sort Descending | Clear Sort
Invoice Number
Sort Ascending | Sort Descending | Clear Sort

The logic all works fine, except that when a user clicks the "Clear Sort" button for any column the sorted class (.rgSorted) for that column is never removed. So even though the column is no longer sorted, it is still styled like it still is. I thought by simply removing that column from the GridSortExpressionCollection this would also remove the class, but that is obviously not the case.

How can I get rid of the class .rgSorted when a GridSortExpression is removed from the GridSortExpressionCollection?


Veli
Telerik team
 answered on 28 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?