Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
237 views
Hi,
I am using RadControls For Asp.net Ajax Q12012 SP1 version
I am having issue with RadTabStrip - click event. It is not fired.
Here is how the control is set up.

<asp:XmlDataSource ID="XmlDSJATabs" runat="server" DataFile="~\App_Data\JATabStrip.xml"
    XPath="//TabCollection/Tab"></asp:XmlDataSource>
      
<p>
    <telerik:RadTabStrip ID="testRadTabStrip" runat="server" 
    DataTextField="Text"   DataValueField="Text" DataSourceID="XmlDSJATabs" 
        SelectedIndex="0" MultiPageID="RadMPJA" 
         AutoPostBack="True" 
        ontabdatabound="testRadTabStrip_TabDataBound" 
        ontabclick="testRadTabStrip_TabClick" CausesValidation="False" 
        ClickSelectedTab="True" >
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMPJA" runat="server">
        <telerik:RadPageView ID="RPV1" runat="server" Width="100%">
            PageView1</telerik:RadPageView>
        <telerik:RadPageView ID="RPV2" runat="server" Width="100%">
            PageView2</telerik:RadPageView>
        <telerik:RadPageView ID="RPV3" runat="server" Width="100%">
            PageView3</telerik:RadPageView>
    </telerik:RadMultiPage>
</p>

Here is the xml file for xml data source.
<?xml version="1.0" encoding="utf-8" ?>
<TabCollection>
  <Tab Text="Customer" PageViewID="RPV1"></Tab>
  <Tab Text="Product" PageViewID="RPV2"></Tab>
  <Tab Text="FAQ" PageViewID="RPV2"></Tab>
</TabCollection>


I would appreciate help with this.
Thanks,
Manisha
Kate
Telerik team
 answered on 04 Jun 2012
11 answers
174 views
I have a derived version of the SchedulerInfo class that is properly being populated in my GetAppointments Web Service Call...

[WebMethod(EnableSession = true)]
public IEnumerable<AppointmentData> GetAppointments(CustomSchedulerInfo schedulerInfo)
{
        return Controller.GetAppointments(schedulerInfo);
}


However I noticed when the CreateRecurrenceException web service call is made it DOES send my custom scheduler info to the web service call but once it hits the Update method in my overridden SchedulerProvider it appears cast as type SchedulerInfo.


Note that also when I update a schedule item which is not recurring the Update method is called with the CustomSChedulerInfo.

An exert of my overriden SchedulerProvider

public class SchedulerProvider : DbSchedulerProviderBase
    {
        public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo schedulerInfo)
        {
               var scheduleInfo = schedulerInfo as CustomSchedulerInfo;
        }
 
        public override void Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)
        {
               var scheduleInfo = schedulerInfo as CustomSchedulerInfo;

//NOTE: When this is called from the CreateRecurrenceException web service call that
scheduleInfo is cast as null.  When this is called from the UpdateAppointment web service call
scheduleInfo is properly cast.

        }
}


An Exert of the web service

[WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    [System.Web.Script.Services.ScriptService]
    public class Scheduling : WebService, IRequiresSessionState
    {
        private WebServiceAppointmentController _controller;
        public const string ProviderSessionKey = "SchedulerWebServiceData";
 
        private WebServiceAppointmentController Controller
        {
            get
            {
                SchedulerProvider provider;
                if ((Session[ProviderSessionKey] == null))
                {
                    provider = new SchedulerProvider();
                    Session[ProviderSessionKey] = provider;
                }
                else
                {
                    provider = (SchedulerProvider)Session[ProviderSessionKey];
                }
 
                if (_controller == null)
                {
                    _controller = new WebServiceAppointmentController(provider);
                }
 
                return _controller;
            }
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> GetAppointments(CustomSchedulerInfo schedulerInfo)
        {
            return Controller.GetAppointments(schedulerInfo);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> InsertAppointment(CustomSchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            return Controller.InsertAppointment(schedulerInfo, appointmentData);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> UpdateAppointment(CustomSchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            return Controller.UpdateAppointment(schedulerInfo, appointmentData);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> CreateRecurrenceException(CustomSchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
        {
            return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> RemoveRecurrenceExceptions(CustomSchedulerInfo schedulerInfo, AppointmentData masterAppointmentData)
        {
            return Controller.RemoveRecurrenceExceptions(schedulerInfo, masterAppointmentData);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<AppointmentData> DeleteAppointment(CustomSchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries)
        {
            return Controller.DeleteAppointment(schedulerInfo, appointmentData, deleteSeries);
        }
 
        [WebMethod(EnableSession = true)]
        public IEnumerable<ResourceData> GetResources(CustomSchedulerInfo schedulerInfo)
        {
            return Controller.GetResources(schedulerInfo);
        }
 
    }

Peter
Telerik team
 answered on 04 Jun 2012
4 answers
319 views
When i use RadAsyncUpload and Rad Upload its giving the following error

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The process cannot access the file because it is being used by another process.



I have pasted the code for your reference.


    protected void AsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
    {

        checkThum.Width = Unit.Pixel(97);
        checkThum.Height = Unit.Pixel(60);
        if (e.File.FileName.Length <= 150)
        {
            byte[] imageData = new byte[e.File.InputStream.Length];

            using (Stream stream = e.File.InputStream)
            {
                stream.Read(imageData, 0, (int)e.File.InputStream.Length);
            }

            checkThum.Visible = true;
            checkThum.DataValue = imageData;

        }
        else
        {
            checkThum.Visible = false;

        }

    }


The above is the code where i will read it as bytes and display the image.




  protected void Button1_Click(object sender, EventArgs e)
    {
        if (RadUpload1.UploadedFiles.Count > 0)
        {
            if (AsyncUpload1.UploadedFiles.Count > 0)
            {
                AsyncUpload1.TargetFolder = System.Configuration.ConfigurationSettings.AppSettings["NetworkSmallImageUrl"];
                UploadedFile ufImage = AsyncUpload1.UploadedFiles[AsyncUpload1.UploadedFiles.Count - 1];

                string imgFileNameMaster = DateTime.Now.TimeOfDay.Ticks.ToString() + ufImage.FileName;
                string strImgPathMaster = System.Configuration.ConfigurationSettings.AppSettings["NetworkSmallImageUrl"] + imgFileNameMaster;
                string FolderPathMaster = Server.MapPath(System.Configuration.ConfigurationSettings.AppSettings["NetworkSmallImageUrl"]) + imgFileNameMaster;
                new PictureFunctions().IsResizeRadUploadImageWithWhiteBackroundFilled(ufImage, FolderPathMaster, 80, 56);

                ViewState["LogoPath"] = strImgPathMaster;

            }
}
}

The above is the button click event which is hidden when i choose a file from a Radupload this button1_click will be fired.


Can you guys help me out on this issue.



Genady Sergeev
Telerik team
 answered on 04 Jun 2012
4 answers
415 views
is Radgrid supported in MVC3 Razor project?

IF yes, please give me the Online demo URL.

Regards,
Raja Muthaiah
Raja
Top achievements
Rank 1
 answered on 04 Jun 2012
1 answer
80 views
I want a client to go to a "widget" page to select his widget. When he clicks on Add it will save it to the db. When they go to the portal page that widget will show up.
Slav
Telerik team
 answered on 04 Jun 2012
8 answers
119 views

One of the limitations of the RadEditor for MOSS feature is that it is unable to support object and embed tags when used as the replacement rich text editor in lists.  I have come to the conclusion that this is actually a function of the underlying sharepoint field type.  However, new, custom, field types are a reality in sharepoint development, and by simply using the default WSP builder template, I have created a custom field that does not suppress these tags.  From there my natural instinct is to use the RadEditor for MOSS as the editor control; however, it doesn't have the necessary control properties exposed to do so.  (no public content or text properties)  Therefore, I'm attempting to use the standard RadEditor.  This is perhaps more of a sharepoint question, but for anyone interested, after littering the code with debugging stops, the last method it leaves is the one below:

protected override void CreateChildControls()
        {
            if (Field == null) return;
  
            base.CreateChildControls();
  
            if (ControlMode == SPControlMode.Display)
                ConstructDisplayMode();
            else
            {
                ConstructEditMode();
  
                if (ControlMode == SPControlMode.New)
                {
                    OpenHTMLField field = (OpenHTMLField)base.Field;
                }
            }
        }

I then see an 'unexpected error has occurred' and the Logs contain the following messages:
05/28/2012 16:15:56.08  w3wp.exe (0x0FE4)                           0x17C8  CMS                             Publishing                      8zug    Medium      PublishingHttpModule.Init() calling AppDomainUnloadListener.Register()   
05/28/2012 16:15:56.08  w3wp.exe (0x0FE4)                           0x17C8  CMS                             Publishing                      8x0a    High        AppDomainUnloadListener.RegisterSelf() entered lock(this=34622967)   
05/28/2012 16:15:56.08  w3wp.exe (0x0FE4)                           0x17C8  CMS                             Publishing                      8zug    Medium      PublishingHttpModule.Init() calling AppDomainUnloadListener.Register()   
05/28/2012 16:15:56.08  w3wp.exe (0x0FE4)                           0x17C8  CMS                             Publishing                      8x0a    High        AppDomainUnloadListener.RegisterSelf() entered lock(this=34622967)

If I'm way out in left field with this I'd appreciate any advice.
Rumen
Telerik team
 answered on 04 Jun 2012
4 answers
184 views
Hello,
Am using Rad Window to show Appointment details by click on Rad Scheduler Appointment.But Problem is,window is Opening in every Post back.I want to open this in only click event. And can i close window,when Page is Post backs.

Thanks And Regards
N.Vishnu Vardhan Reddy
Genus
Top achievements
Rank 1
 answered on 04 Jun 2012
3 answers
126 views
Hello,
i have a problem that i dont know how to solve.
I have some date picker isndie TemplateFilter of a grid that worked perfectly in previous version of telerik 2012.1.215.35 and just replacing the DLLs to the new version (2012.1.411.35) the width of the telerik control is not working anymore. I simply can't change the width of the radDatePicker controls nomatter what i do. I switched back to older version (2012.1.215.35) and the width worked perfectly again.

AGAIN: I specify that by simply copying the old DLLs of telerik over the new ones in my project sovled the WIDTH problem. Is there anything i should know about the new version that breaks my design ?
Also, i'm using IE 9.0.8112.16421, but inside the project i use this to force IE8 rendering:
<meta http-equiv="X-UA-Compatible" content="IE=8" />

However, the width problem with the new version is also on Firefox and not only in IE

The code is preaty simple:
<telerik:GridBoundColumn DataField="DateIn" HeaderStyle-Width="145px" DataType="System.DateTime" DataFormatString="{0:MMM/dd/yyyy}" HeaderText="Date In" ItemStyle-HorizontalAlign="Left">
    <FilterTemplate>
        <div style="width:35px;float:left; padding-top:2px;">From:</div>
        <div style="float:left; padding-bottom:1px;"><telerik:RadDatePicker ID="FromDateInPicker" runat="server" Width="90px" ClientEvents-OnDateSelected="FromDateSelected" DbSelectedDate='<%# startDateIn %>'><DateInput Font-Size="11px" /><Calendar><SpecialDays><telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" /></SpecialDays></Calendar></telerik:RadDatePicker></div>
        <div style="width:35px; clear: both; float:left; padding-top:2px;">To:</div>
        <div style="float:left;"><telerik:RadDatePicker ID="ToDateInPicker" runat="server" Width="90px" ClientEvents-OnDateSelected="ToDateSelected" DbSelectedDate='<%# endDateIn %>'><DateInput Font-Size="11px" /><Calendar><SpecialDays><telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" /></SpecialDays></Calendar></telerik:RadDatePicker></div>
    </FilterTemplate>
</telerik:GridBoundColumn>
Vasil
Telerik team
 answered on 04 Jun 2012
2 answers
240 views
Hello,

Im trying to get the sums shown in the footer of my grid. Works fine but when doing it using the aggregate functions it adds the text "SUM: " infront of the number.

How do i remove this?

Code im using to set the footer sums

protected void RadGrid_Months_DataBound(object sender, EventArgs e)
{
    foreach (GridBoundColumn col in RadGrid_Months.MasterTableView.AutoGeneratedColumns)
    {
        if(col.UniqueName != "Namn")
            col.Aggregate = GridAggregateFunction.Sum;
    }
}
Robert
Top achievements
Rank 1
 answered on 04 Jun 2012
11 answers
448 views

With the previous RadEditor we could use an .aspx for a modal dialog from the toolbar.  Now it seems it has to be .ascx user control, meaning all the dialogs we wrote as web pages before will not work now.   Is this the case?  The new radwindow still seems to use aspx’s for dialogs, so I’m curious why the ascx change for the RadEditor.  I hope we can still use aspx's for dialogs, as converting them all to ascx's will be far from trivial for us.

Rumen
Telerik team
 answered on 04 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?