Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hello.  I'm wondering if I can set up the RadAsyncUpload control to allow the page to be validated for required fields before the user can select files for upload.

Currently it's set up so I'm using the OnClientFileSelected event to try to catch the validation.  It fails validation, but the Async upload is still performed.   I'd prefer to perform validation when the "SELECT" button is clicked, and prevent opening of the file dialog window altogether.

Is there a way to do this?  Thanks.
<telerik:RadAsyncUpload ID="RadUpload" ControlObjectsVisibility=None runat="server" OnClientFilesUploaded="OnClientFilesUploaded" OnClientFilesSelected="OnClientFilesSelected"
HideFileInput="true" Skin="Hay" MultipleFileSelection="Automatic" AllowedFileExtensions=".jpeg,.jpg,.png,.gif" />

function OnClientFilesSelected(sender)
{
if ( !Validate() ) return false;
}
Plamen
Telerik team
 answered on 08 Mar 2013
7 answers
314 views
I have a customer who wants me to build a reservation system.

The problem is that lessens can be from different lenght. 25 min, 40 min, 50 min 1h10 min for example (even worse he wants it to be multi client capable where they can set there own times)

To make it even more complicated some of the clients my want any lessons to follow streight to the next. Other might want a 5 or 10 minutes break after each lesson that was booked.

Imagine this
Golf Pro 1 gives 25min, 50min and 1h 30 min lessons and wants 5 minutes break after each booking.
Golf Pro 2 gives 25min, 40 min, and 1 hour lessons no breaks within.

I rember having done a reservation system with radsceduler a while back but the each had 30 minutes slots on the hour and half hours with no breaks in between.

Anyone sees an solution how I would programmicaly approach this problem (more of of a concept question) and if RadScheduler could handle the task. Or maybe Radsceduler only for showing booked times and show available times with an pop up or so.

Markus
Plamen
Telerik team
 answered on 08 Mar 2013
1 answer
75 views
I have a RadCalendar on a site I'm developing and need to set a number of days as special days (or at least I need to highlight days somehow).

I have created a style that I can apply to them, and it works perfectly if I set the border and background colours, but as soon as I try to apply a background image instead of the background colour (so the day has a gradient) it doesn't.

I've tried setting !important in my stylesheet but it's made no difference.

I have also tried applying the style using a CalendarDayTemplate like so without any joy...

<CalendarDayTemplates>
    <telerik:DayTemplate ID="BusyDayTemplate" runat="server">
        <Content>
            <div class="rcTemplate rcDayDate BusyDay">
                [DayOfMonth]
            </div>
        </Content>
    </telerik:DayTemplate>
</CalendarDayTemplates>


How can I use the default built in skin for the RadCalendar, but apply a background image to the special day?

Thanks.
Galin
Telerik team
 answered on 08 Mar 2013
2 answers
264 views
I need to be able to change the background colour of the cell for a given day and resource in timeline view to show days when a resource is not available (weekends etc, but could be any day)

Can this be done and if so, how?

Is there a "day render" event for the ASP.Net RadScheduler that I could use and then set some style on the cell?

Thanks
Karl
Top achievements
Rank 1
 answered on 08 Mar 2013
0 answers
99 views
Hi All,
 I am facing so much problem in Rad  Tab.Actually master page is not getting updated.so i used update panel.After adding Update Panel i got this type of error which is dedefined below. while click on any module which is used telerik rad tab,i am getting this below error in pop up window.
  
Please help me to fix this issue.


Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element. 

              This is code--
 <body scroll="no">
    <form id="thisMainform" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

  <%--  Added UpdatePanel to refresh the page  for opening proper Help Docs--%>
    <asp:UpdatePanel ID ="Updatecontrols" runat="server" >
    <ContentTemplate>
    <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"
        bgcolor="#ffffff">
        <tbody>
            <tr>
                <td align="center" valign="middle" class="headerbg" height="14%">
                    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="left" valign="middle" class="logo" style="padding-left: 10px">
                                <img runat="server" src="~/images/Client_Logo.png" />
                            </td>
                            <td align="right" valign="top">
                                <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td align="right" valign="top">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td colspan="7" align="right" style="padding-right: 10px;" height="45">
                                                        <img runat="server" src="~/images/adaptive_logo.gif" width="246" height="37" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="75%" align="left" valign="top">
                                                        <asp:Label ID="lblUserName" runat="server" Text="Label"></asp:Label>
                                                    </td>
                                                    <td width="24" align="left" valign="middle">
                                                        <img runat="server" src="~/images/Home_icon.gif" width="14" height="14" hspace="5" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkBtnHome" runat="server" Text="Home" PostBackUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx"
                                                            CausesValidation="false" />
                                                    </td>
                                                    <td width="25" align="left" valign="top">
                                                        <img runat="server" src="~/images/Help_icon.gif" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnHelp" runat="server" Text="Help" CausesValidation="false" />
                                                    </td>
 
                                                      <td width="25" align="left" valign="top">
                                                        <img id="ImgVLink" runat="server" src="~/images/video.png" width="16" height="20" />
                                                    </td>
                                                    <td width="70" align="left" valign="middle">
                                                  
                                                        <asp:LinkButton ID="lnkBtnVLink"  runat="server" Text="Video"  CausesValidation="false" /> 
                                                       <%--  OnClick="ShowVLink()"--%> 
                                                    </td>



                                                    <td width="25" align="left" valign="top">
                                                        <img id="imgLogout" runat="server" src="~/images/Loigout_icon.gif" width="18" height="20" />
                                                    </td>
                                                    <td width="133" align="left" valign="middle">
                                                        <asp:LinkButton ID="lnkbtnLogout" runat="server" OnClick="lnkbtnLogout_Click" Text="Logout"
                                                            CausesValidation="false" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td height="6" colspan="2" align="left" valign="top" bgcolor="#4DA5CF">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top" height="77%">
                    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <telerik:radtabstrip runat="server" id="RadTabMain" width="100%" skin="Office2007"
                                    selectedindex="0">
                                    <Tabs>
                                        <telerik:RadTab runat="server" Text="Adaptive Portfolio System" Value="portfolio"
                                            NavigateUrl="~/AdaptivePortfolio/AdaptivePortfoliloMain.aspx" />
                                        <telerik:RadTab runat="server" Text="Adaptive Management System" Value="Management"
                                            NavigateUrl="~/AdaptiveManagement/bin-release/AMSHome.aspx" />
                                    </Tabs>
                                </telerik:radtabstrip>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" height="100%">
                                <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server">
                                </asp:ContentPlaceHolder>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
</tbody>
    </table>
   
   </ContentTemplate>
 </asp:UpdatePanel>
Kamal
Top achievements
Rank 1
 asked on 08 Mar 2013
3 answers
154 views
Hi,

I want to make a similar kind of graphs as per attached image.  I couldn't find the solution of  three things 

1-  How to display the month labels on top 
2- Highlighting the specific XAxies column as gray.
3- Making XAxies column clickable so that user can edit monthly data.
Marin Bratanov
Telerik team
 answered on 08 Mar 2013
1 answer
68 views
I am using a radgrid with headercontextmenu with it. I have also added custom menu and I have done that in OnPrerender event of page(as suggested on telerik website). Now, when I leave the page idle for some time and then I try to sort the grid or perform any action on page, the count of the headercontextmenu items is being set to zero, which I found while debugging.

Does anyone have any idea why the items count is being set to zero?

Thanks,
Neerajan
Eyup
Telerik team
 answered on 08 Mar 2013
1 answer
94 views
Hello,

I am exporting grid to excel:
gdv.ExportSettings.ExportOnlyData = true;
gdv.MasterTableView.ExportToExcel(); 

the export is successful, but i am using Jquery to block user interface and displaying a loader ( Implemented in Master page)
but after saving the exported file, the UI is not unblocked.
What i should do ?
Daniel
Telerik team
 answered on 08 Mar 2013
1 answer
185 views
HELP!
I added a Telerik RadGrid to my aspx page and then configured my datasource. I tested in debug mode and I get this error:

The base class includes the field 'RadGrid1', but its type (Telerik.Web.UI.RadGrid) is not compatible with the type of control (Telerik.Web.UI.RadGrid).

I can't figure what is wrong??? My web.config has telerik Version=2012.3.1205.35 added and Version=2012.3.1205.40
I tried to add the version 4.0 assembly to my GAC but I got an error. Is this the problem or is there more to this?
What can I do to fix this and get it running?

Here is my Default.aspx page
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="FilterGrid._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
     
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
        DataSourceID="SqlDataSource" GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="Client"
            FilterControlAltText="Filter Client column" HeaderText="Client"
            SortExpression="Client_Name" UniqueName="Client">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Emp"
            FilterControlAltText="Filter Emp column" HeaderText="Emp"
            SortExpression="Emp" UniqueName="Emp">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClientNum"
            FilterControlAltText="Filter ClientNum column" HeaderText="ClientNum"
            SortExpression="ClientNum" UniqueName="ClientNum">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource"
    ConnectionString="<%$ ConnectionStrings:Matter_SearchConnectionString %>"
    SelectCommand="SELECT [Client], [Emp], [ClientNum] FROM [Table] ORDER BY [Client]"
    runat="server" ></asp:SqlDataSource>
</asp:Content>


Thanks.
Maria Ilieva
Telerik team
 answered on 08 Mar 2013
3 answers
170 views
Hi, I am new to telerik.

I am trying to implement basic filtering on a RadGrid control. the control has a LinqDataSource, as you will see from the snippet below. I can filter data with the "Donated" column which is of type Boolean and it works and the grid gets properly refreshed. however whenever i filter with any other column, be it Date or String it doesn't. I am following the example http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx and the only difference i can see is the DataSource type, the example uses SQL while i am using Linq.

can anyone point me in the right direction please.
thank you
<telerik:RadGrid ID="PublicationsGrid" runat="server" GridLines="None"
        DataSourceID="PublicationsSource" AllowFilteringByColumn="True"
        AllowSorting="True" PageSize="12" ShowFooter="True" AllowPaging="False"
        AutoGenerateColumns="False" ShowStatusBar="true" EnableLinqExpressions="true">
        <ClientSettings EnableRowHoverStyle="True">
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
        </ClientSettings>
        <MasterTableView DataSourceID="PublicationsSource" AllowFilteringByColumn="true">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Isbn" FilterControlAltText="Filter Isbn column"
                    HeaderText="Isbn" SortExpression="Isbn" UniqueName="Isbn" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column"
                    HeaderText="Title" DataType="System.String" SortExpression="Title" UniqueName="Title" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PublicationDate" DataFormatString="{0:dd/MM/yyyy}"
                    DataType="System.DateTime" FilterControlAltText="Filter PublicationDate column"
                    HeaderText="Date of publication" SortExpression="PublicationDate" UniqueName="PublicationDate" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Pages" DataType="System.Int32" FilterControlAltText="Filter Pages column"
                    HeaderText="Pages" SortExpression="Pages" UniqueName="Pages" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Donated" DataType="System.Boolean" FilterControlAltText="Filter Donated column"
                    HeaderText="Donated" SortExpression="Donated" UniqueName="Donated" AutoPostBackOnFilter="true">
                </telerik:GridCheckBoxColumn>
                <telerik:GridBoundColumn DataField="Cost" DataType="System.Double" FilterControlAltText="Filter Cost column"
                    HeaderText="Cost" SortExpression="Cost" UniqueName="Cost" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="FullPrice" DataType="System.Double" FilterControlAltText="Filter FullPrice column"
                    HeaderText="Full Price" SortExpression="FullPrice" UniqueName="FullPrice" AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DiscountPrice" DataType="System.Double" FilterControlAltText="Filter DiscountPrice column"
                    HeaderText="Discount Price" SortExpression="DiscountPrice" UniqueName="DiscountPrice"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CurrentStockLevel" DataType="System.Int32" FilterControlAltText="Filter CurrentStockLevel column"
                    HeaderText="Current Stock Level" SortExpression="CurrentStockLevel" UniqueName="CurrentStockLevel"
                    AllowFiltering="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Language" FilterControlAltText="Filter Language column"
                    HeaderText="Language" SortExpression="Language" UniqueName="Language" AutoPostBackOnFilter="true">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="True">
        </FilterMenu>
    </telerik:RadGrid>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PublicationsGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PublicationsGrid"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <asp:LinqDataSource ID="PublicationsSource" runat="server" ContextTypeName="App.Business.StockPubContainer"
        EntityTypeName="App.Business.Publication"
        TableName="Publication">
    </asp:LinqDataSource>
Pavlina
Telerik team
 answered on 08 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?