Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views


I have a sample Application with XML as DataSource and followed the example at the link :-
http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaprovider.html

There is MethodName GetAppointments(RadScheduler owner) which has a method in a "Resources" Case known as
LoadAppointmentResources(owner, appointment, appointmentData).

The defintion for LoadAppointmentResources method is not provided anywhere in the example.

Can you please provide it,

Thanks
Shaan
Peter
Telerik team
 answered on 02 Nov 2010
7 answers
341 views
I am trying to use the scheduler to add events on the admin side and then show a read only version of the same scheduler on the public site.  I am trying to setup the scheduler on the admin side first.  I went and looked at the demo site, then went to the documention / help area and read about using a data provider and then Implementing a provider.  I put the code into the web.config, but not sure if I put the following code in the right spot of the web.config.
<telerik.web.ui>
  
<radScheduler defaultAppointmentProvider="Integrated">
      
<appointmentProviders>
          
<add name="XmlSchedulerProvider1"
               
type="Telerik.Web.UI.XmlSchedulerProvider"
               
fileName="~/App_Data/Appointments.xml"
               
persistChanges="true"/>
      
</appointmentProviders>
  
</radScheduler>
</
telerik.web.ui>

Is there a specific section to put the code in.  It doesn't really say in the help section.  also I copied the code from "Implementing a DataProvider" section as well.  I am getting an error in Public Overloads Overrides Sub Initialize sub "config = Nothing".  Error says Operator '=' is not defined for types System.Collections.Specialized.NameValueCollection.   I get another error in the Private Sub EnsureFilePath sub owner.Page = Nothing Operator '=' is not defined for types System.Web.UI.Page.  The last error is in Public Overloads Overrides Function GetAppointments LoadAppointmentResources in not declared.

Not sure where to go from here.  I don't know enough about these errors to try and troubleshoot.  I have copied the code exactly from the VB sections.

I changed 
Public Class MyXmlSchedulerProvider
  Inherits SchedulerProviderBase
 End Class
to XmlScheduleProvider1 as that is what is in the web.config file.

Any help?
Peter
Telerik team
 answered on 02 Nov 2010
9 answers
237 views
Good Day

I have a radSchedular that is Defined like this

  
     
        <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="388px" TimeZoneOffset="03:00:00" 
            SelectedDate="2007-03-30" DayStartTime="08:00:00" DayEndTime="18:00:00" 
            OnDataBound="RadScheduler1_DataBound" 
            Skin="Vista" Width="1006px" DataEndField="ENDDATE" DataKeyField="ID"  
            DataSourceID="XmlDataSource1" DataStartField="STARTDATE"  
            DataSubjectField="SUBJECTS"> 
        </telerik:RadScheduler> 
     
  
        <asp:XmlDataSource ID="XmlDataSource1" runat="server"  
            DataFile="~/App_Data/TimeTable.xml"></asp:XmlDataSource> 
     


and my XML nodes looks like this

<Root> 
  <Datarow> 
    <ID>1</ID> 
    <DY>25</DY> 
    <SESS>2</SESS> 
    <CODE>CMH10431</CODE> 
    <DESCRIPTION>CMH10431</DESCRIPTION> 
    <ABREV>P</ABREV> 
    <TYPE>P</TYPE> 
    <NUMBER>1</NUMBER> 
    <GRPNAME>V0022012</GRPNAME> 
    <GRPNUMBER>1</GRPNUMBER> 
    <DURATION>1</DURATION> 
    <STUDENTS>1</STUDENTS> 
    <VENUE>V0022012</VENUE> 
    <CAPACITY>50</CAPACITY> 
    <MODLID>641</MODLID> 
    <TERM>Oct2008</TERM> 
    <STAFFTERM>Oct2008</STAFFTERM> 
    <STARTDATE>2008-10-30T17:00:00</STARTDATE> 
    <ENDDATE>2008-10-30T17:00:00</ENDDATE> 
    <LENGTH>180</LENGTH> 
  </Datarow> 
  <Datarow> 
    <ID>2</ID> 
    <DY>1</DY> 
    <SESS>1</SESS> 
    <CODE>PVL101Q1</CODE> 
    <DESCRIPTION>PVL101Q1</DESCRIPTION> 
    <ABREV>P</ABREV> 
    <TYPE>P</TYPE> 
    <NUMBER>1</NUMBER> 
    <GRPNAME>V0022012</GRPNAME> 
    <GRPNUMBER>1</GRPNUMBER> 
    <DURATION>1</DURATION> 
    <STUDENTS>4</STUDENTS> 
    <VENUE>V0022012</VENUE> 
    <CAPACITY>50</CAPACITY> 
    <MODLID>2634</MODLID> 
    <TERM>Oct2008</TERM> 
    <STAFFTERM>Oct2008</STAFFTERM> 
    <STARTDATE>2008-10-06T08:00:00</STARTDATE> 
    <ENDDATE>2008-10-06T08:00:00</ENDDATE> 
    <LENGTH>180</LENGTH> 
  </Datarow> 
</Root> 




and when i run my test app , i get an Error

DataBinding: 'System.Web.UI.WebControls.XmlDataSourceNodeDescriptor' does not contain a property with the name 'ID'.


Thanks
Peter
Telerik team
 answered on 02 Nov 2010
3 answers
84 views
Hi,

I have used Rad Uplaod control in my web application developed using Visual Studio 2005. However i am not able to view the progress details such as progress percentage, estimated time.. etc.  I tried uploading files of size 6 MB. 
Please let me now  whether the upload control will automatically display the details or should i need to manually write code to display the required.

Thanks,
Divya
Genady Sergeev
Telerik team
 answered on 02 Nov 2010
1 answer
70 views
Hi,

I am setting selected dates from a database during the DayRender event.

When I then fire the SelectedDateChange, the selected dates I have added are no there. It will only give me the new dates that have been subsequently selected.

My Code in the DayRender event is:

foreach (DateTime dt in Session["DBBookedDays"] as ArrayList)
        {
            if ((e.Day.Date >= Convert.ToDateTime(jStartDate.Text) && e.Day.Date <= Convert.ToDateTime(jEndDate.Text)) && e.Day.Date.ToShortDateString() == dt.ToShortDateString())
            {
                e.Cell.CssClass = "rcSelected";
                e.Cell.ToolTip = "Already booked in for this job";
                renderedDay.IsSelected = true;
                break;
            }
        }


If I then loop through selected dates on the SelectedDateChange event then this selected date no longer exists.

Thanks in advance
Iana Tsolova
Telerik team
 answered on 02 Nov 2010
2 answers
178 views
hello,
I am using a radgrid.
In that I have some columns. I am also using sorting functionality of radgrid.
<telerik:RadGrid ID="EmployeeRadGrid" runat="server" AllowPaging="True" DataSourceID="EmployeeDataSource"
                AllowFilteringByColumn="True" AutoGenerateColumns="false" OnItemDataBound="EmployeeRadGrid_ItemDataBound"
                GridLines="None" AllowCustomPaging="true" AllowSorting="true" PageSize="10" >
<MasterTableView AllowMultiColumnSorting="true" ClientDataKeyNames="Id" DataKeyNames="All the column names present in the data"
                    CommandItemDisplay="None" DataSourceID="EmployeeDataSource">
         <Columns>
            <telerik:GridBoundColumn DataField="EmployeeId" UniqueName="EmployeeId" HeaderText="employeeid"
                            SortExpression="EmployeeId" AllowSorting="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                            AutoPostBackOnFilter="true">
              </telerik:GridBoundColumn>
          </Columns>
</MasterTableView>

<asp:ObjectDataSource ID="EmployeeDataSource" runat="server" EnablePaging="True"
                TypeName="Layer where my method is present" SelectCountMethod="getEmployeeCount"
                SelectMethod="getAllEmployee" StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maximumRows"
                SortParameterName="sortBy" ></asp:ObjectDataSource>



Now when I click on the employeeid column, evrytime the call is going to the method "getAllEmployee" to retrieve the data. That method has "startRowIndex", "maximumRows" and "sortBy parameters.
Everytime the startRowIndex and maximumRows parameter values are received correctly according to page size. But the sortBy value is "" always.

So, when i click on the column employeeid, only that page data is getting sorted. The whole data which is bound to radgrid is not getting sorted.

Any help pls.
Thanks in advance.
Iana Tsolova
Telerik team
 answered on 02 Nov 2010
3 answers
119 views
Hi,

I am using Telerik RadEditor ImageManager to upload the Images to my local folder.
Instead of maintaining the Images in folder, I would like to maintain them in SharePoint. Is it possible?
If Yes.. then how can we achieve it?

Thanks & Regards.
Stanimir
Telerik team
 answered on 02 Nov 2010
2 answers
102 views
I have found multiple threads on this issue but none of the solutions work for me.

I am using the solution from here:
http://www.telerik.com/ClientsFiles/207185_printradgrid-ignorepaging.zip

to print a grid with paging temporarily disabled.  However, this line always returns a null:

var radGrid = $find(radGridId);



I've tried using

var

 

 

grd = $find("<%= radgrdMyPrograms.ClientID %>");

to no avail. I always get a null and then the .get_element().outerHTML fails and, of course, the

 

 

.get_masterTableView().fireCommand(

 

'EnablePaging', '') also fails.


here is my entire .aspx:

 

 

<asp:Content ID="Content1" ContentPlaceHolderID="MasterContentPlaceHolder" Runat="Server">
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
    function PrintRadGrid() {
        var grd = $find("<%= radgrdMyPrograms.ClientID %>");
        var previewWnd = window.open('about:blank', '', '', false);
        var sh = '<%= ClientScript.GetWebResourceUrl(radgrdMyPrograms.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",radgrdMyPrograms.Skin)) %>';
        var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
        var htmlcontent = styleStr + "<body>" + grd.get_element().outerHTML + "</body></html>";
        previewWnd.document.open();
        previewWnd.document.write(htmlcontent);
        previewWnd.document.close();
        previewWnd.print();
        previewWnd.close();
        grd.get_masterTableView().fireCommand('EnablePaging', '');
    }
</script>
</telerik:RadScriptBlock>
<style type="text/css">  
.RadMenu .rmGroup .rmText  {  
    font-size: x-small;
    width: 110px; }  
</style>
  
<table width="100%" cellpadding="0px" cellspacing="0px" style="padding-bottom:4px;">
    <tr>
        <td style="width:220px;"><asp:Label ID="Label1" runat="server" class="LabelDarkGrayMedium" Text="My Programs" /> </td>
        <td><asp:ImageButton ID="btnPrint" runat="server" ImageUrl="../img/Print.gif" ToolTip="Print table"/></td>
    </tr>
</table>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="radgrdMyPrograms">
            <UpdatedControls><telerik:AjaxUpdatedControl ControlID="radgrdMyPrograms" /></UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<xc:LinqDataSourceWrapper ID="ldsProgramsAllByUserName" runat="server" TypeName="DMCproWebApp.BALHelper" SelectMethod="GetProgramsAllByUserName" EnableObjectTracking="false" />
<telerik:RadGrid ID="radgrdMyPrograms" runat="server" Width="100%" DataSourceID="ldsProgramsAllByUserName" EnableLinqExpressions="true"
    EnableEmbeddedSkins="false" Skin="DMCpro" ShowStatusBar="true"
    AutoGenerateColumns="false" AllowFilteringByColumn="true" AllowPaging="true" AllowSorting="true" PageSize="20" >
    <ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="true" />
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView TableLayout="Fixed" DataKeyNames="ProgramID,ProgramName,ClientId,Client" >
        <ItemStyle Font-Size="Small" Wrap="false" />
        <AlternatingItemStyle Font-Size="Small" Wrap="false" />
        <Columns>
            <telerik:GridHyperLinkColumn HeaderText="Program #" DataTextField="ProgramID" SortExpression="ProgramID" UniqueName="ProgramID" 
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="80px" HeaderStyle-HorizontalAlign="Left" 
                AllowFiltering="false" />
            <telerik:GridBoundColumn HeaderText="Program" DataField="ProgramName" SortExpression="ProgramName" UniqueName="ProgramName"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Left"
                AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="150px" />
            <telerik:GridBoundColumn HeaderText="AE" DataField="AEName" SortExpression="AEName" UniqueName="AE"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="35px" HeaderStyle-HorizontalAlign="Left" 
                AllowFiltering="false" />
            <telerik:GridBoundColumn HeaderText="Start Date" DataField="StartDate" SortExpression="StartDate" UniqueName="StartDate"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="95px" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:MM/dd/yyyy}" DataType="System.String" 
                CurrentFilterFunction="GreaterThanOrEqualTo" AutoPostBackOnFilter="true" FilterControlWidth="60px" />
            <telerik:GridBoundColumn HeaderText="End Date" DataField="EndDate" SortExpression="EndDate" UniqueName="EndDate"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="95px" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:MM/dd/yyyy}" DataType="System.String" 
                CurrentFilterFunction="LessThanOrEqualTo" AutoPostBackOnFilter="true" FilterControlWidth="60px" />
            <telerik:GridBoundColumn HeaderText="Status" DataField="Status" SortExpression="Status" UniqueName="Status"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="92px" HeaderStyle-HorizontalAlign="Left" 
                CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="90px" />
            <telerik:GridBoundColumn HeaderText="Revenue" DataField="Revenue" SortExpression="Revenue" 
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Right" 
                AllowFiltering="false" />
            <telerik:GridHyperLinkColumn HeaderText="Client" DataTextField="Client" SortExpression="Client" UniqueName="Client" 
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="170px" 
                CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="170px" />
            <telerik:GridBoundColumn HeaderText="Market" DataField="Market" SortExpression="Market"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="90px" HeaderStyle-HorizontalAlign="Left" 
                AllowFiltering="false" />
            <telerik:GridBoundColumn HeaderText="Bus. Source" DataField="BusinessSource" SortExpression="BusinessSource" 
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Left" 
                AllowFiltering="false" />
            <telerik:GridBoundColumn HeaderText="Pax" DataField="Guests" SortExpression="Guests"
                HeaderStyle-CssClass="radGridViewHeader" HeaderStyle-Width="45px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Right" 
                AllowFiltering="false" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
</asp:Content>


and the relevant codebehind:

Private Sub btnPrint_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnPrint.Click
    radgrdMyPrograms.AllowPaging = False
    radgrdMyPrograms.Rebind()
    ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType, "PrintGrid", "PrintRadGrid();", True)
End Sub

 

 

Jerry T.
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
218 views
hey everyone,

I have a radcombobox & 3 textboxes.on page load radcombobox is visible,and first textbox is not.On combobox selected index change event of combobox,i fill other 2 text boxes for address and phoneNo.I have validated each 4 controls with required field validator,And added a validation summmary.I have added a button of new user where onClick radcombobox is invisible and textbox is visible.

Now,if i fill values for new user that is all through 3 textBoxes i got validation error for combobox "please select an item".And if i am using combobox then my selected index change from codebehind is not fired.Validation asks for "filling address and Phone no."

What to do?...

Thanks
Amit

Simon
Telerik team
 answered on 02 Nov 2010
5 answers
323 views
Hi,

I want to be able to implement client-side validation for data entered into the filter text box of a column. The things I want to check for include:

1. Data type, e.g., only numbers are allowed in a column with numeric data
2. Based on the filter function selected, check that the data has been specified in the correct format. For example, when the EQUALTO function is selected, only a single value is specified (if a comma-separated list is specified instead, it should fail the validation check).

Here's is what I think I would need:

A. When a filter function is selected from the dropdown, a client-side function handles the event. The following information would need to be available:
    (i) The filter function that was clicked
    (ii) The data specified in the filter textbox

I'm not sure how to obtain the above information on the client side. Can you please help implement the above scenario, or suggest an alternative solution?

Thanks.
Radoslav
Telerik team
 answered on 02 Nov 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?