Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
Good afternoon stoy trying to access the data of a hidden column in the event rowdrop, but the value displayed is ""
<telerik:RadGrid ID="GrdDetalleHorario" runat="server" AllowMultiRowSelection="true"
                                AutoGenerateColumns="False" GridLines="None" Width="240px">
                                <AlternatingItemStyle />
                                <ItemStyle />
                                <MasterTableView>
                                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn Visible="false" DataField="HorarioDetalleID" HeaderText="Codigo"
                                            UniqueName="HorarioDetalleID" >
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn Visible="false" DataField="HorarioID" HeaderText="HorarioID"
                                            UniqueName="HorarioID" >
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn ItemStyle-Width="10px" DataField="HoraInicio" HeaderText="H. Ini."
                                            UniqueName="HoraInicio">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn ItemStyle-Width="10px" DataField="HoraFinal" HeaderText="H. Fin"
                                            UniqueName="HoraFinal">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn Visible="false" ItemStyle-Width="10px" DataField="Flag"
                                            HeaderText="Receso" UniqueName="Flag">
                                            <ItemStyle Width="10px"></ItemStyle>
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                </MasterTableView>
                                <FilterMenu EnableImageSprites="False">
                                </FilterMenu>
                                <HeaderStyle BackColor="#D7FFFA" HorizontalAlign="Center" />
                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                <ClientSettings AllowRowsDragDrop="True">
                                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                                    <%--<ClientEvents OnRowDropping="onRowDropping" />--%>
                                </ClientSettings>
                            </telerik:RadGrid>
the code is as follows:
Protected Sub GrdDetalleHorario_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles GrdDetalleHorario.RowDrop
        If String.IsNullOrEmpty(e.HtmlElement) Then
            Dim CursoSemestre As Curso_Presupuesto = oCurso_Presupuesto.ObtenerCursos_SemestreIDPrueba(Session("IDACA"))
            For Each oRowItem As GridDataItem In e.DraggedItems
                Dim ohorarioDetalleID As Integer = oRowItem.Item("HorarioDetalleID").Text  'Here the return value is " "
                Dim oHorarioID As Integer = oRowItem.Item("HorarioID").Text 'Here the return value is " "
                Dim oHoraInicio As String = oRowItem.Item("HoraInicio").Text
Princy
Top achievements
Rank 2
 answered on 06 Sep 2013
4 answers
240 views
Hi,

I have a RadPageView with several RadGrid controls on each page. I am trying to accomplish a few things:

1. Add a CommandItem button but still have the default "refresh" button as well as have the buttons created from CommandItemSettings-AddNewRecordText and ShowExportToPdfButton. Defining a CommandItemTemplate removes these buttons.

2. I want to Hijack the functionality of the CommandItem button created by ShowExportToPdfButton and call my own PDF export method/handler.

3. Since there will be many Grids, how can I hijack each grid's ShowExportToPdfButton and identify which grid to export from the same export method?

Basically, I want a generic way to hijack each Grid's ShowExportToPdfButton or insert into each grid's CommandItem bar a generic exportPDF button that I define.

An add on question is how to find the width of each visible column that is to be exported so that I can set the grid.ExportSettings.Pdf.PageWidth accordingly.

Thanks for any advice.
kernelk
Top achievements
Rank 1
 answered on 06 Sep 2013
4 answers
223 views
By default the blinking yellow status icon is to the left side of the filename, how hard is it to move it to the right side?
Kjell
Top achievements
Rank 1
 answered on 05 Sep 2013
1 answer
190 views
Hello,
I am using 2012.2.607.40 version of RadEditor. I have the editor inside a PageView. I have javascript that resizes my editor width (the resize code works perfectly except if I click on a ribbon bar tab). The problem I am having is when I navigate to the editor (ajax or direct page load) and then click on one of the ribbon bar tabs, the resize code does not resize the ribbon bar, which remains at it original 100% width. This also happen if I open the editor pageView on the initial page load so I don't think it has to do with Editor/PageView/Css issues? If I change to the Default editor toolbar, the editor and default toolbar resize correctly.

Here is my resize javascript code:
window.onresize = onPageResize;
    function onPageResize() {
        var editor = $find("<%=edEditor.ClientID %>");
        if (editor != null) {
            setTimeout(function () {
                var wt = jQuery('.editorTop').width();
                wt = (wt - 15);
                editor.setSize(wt, 600);
                editor.get_element().style.width = wt + "px";
            }, 200);
        }
    }
 
I do have the following code in my Master page to help with the well-known Css limitation:
<Telerik:RadStyleSheetManager ID="SSH1" EnableStyleSheetCombine="true" runat="server">
        <StyleSheets>
            <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
            <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Default.Editor.Default.css" />
            <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
            <Telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Default.Window.Default.css" />
        </StyleSheets>
    </Telerik:RadStyleSheetManager>

Finally here is my editor markup:
<telerik:RadEditor ID="edEditor" Height="600px" Skin="Default" ToolbarMode="RibbonBar" toolsfile="~/Editor/Tools/ToolsFile.xml" EnableResize="false" OnClientLoad="edEditor_ClientLoad" OnClientModeChange="edEditor_ClientModeChange" runat="server">
    <CssFiles>
        <telerik:EditorCssFile Value="~/Editor/Styles/EditorContentArea.css" />
    </CssFiles>
</telerik:RadEditor>

Thank you!

Ianko
Telerik team
 answered on 05 Sep 2013
5 answers
311 views
We've developed a tool for a client of ours that uses the radScheduler control so they can make plans for their consultants for the future.

However, we've received a call today to say that they cannot view data beyond 1 year into the future. I've done some testing, and noticed that the end date is indeed 365 days from today (today being 21st May 2013 - EndDate is 21st May 2014) , and it's read only. If I set the StartDate of the timeline view to be after this (30th June 2014), the radScheduler control only shows data up to the TimeLineView EndDate and not beyond.

How can I get around this, and force the radScheduler control to show data beyond 365 days from a given date?

We are using an older version of the control, but you have removed other controls we use (such as RadPanelBar) so upgrading will be a major pain.

Karl

Boyan Dimitrov
Telerik team
 answered on 05 Sep 2013
5 answers
144 views
Hi, 
I'm loading appointments to scheduler using: 
<WebServiceSettings Path="~/Webservices/Scheduler.asmx" ResourcePopulationMode="ServerSide" />

This is my scheduler.asmx.cs
public class MySchedulerInfo : SchedulerInfo
    {
        private int _hubID;
        public int HubID
        {
            get { return _hubID; }
            set { _hubID = value; }
        }
        private int _orderID;
        public int OrderID
        {
            get { return _orderID; }
            set { _orderID = value; }
        }
        private string _date;
        public string Date
        {
            get { return _date; }
            set { _date = value; }
        }
    }
 
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]   
    [System.Web.Script.Services.ScriptService]
    public class Scheduler : System.Web.Services.WebService
    {
        private WebServiceAppointmentController _controller;
 
        /// <summary>
        /// The WebServiceAppointmentController class is used as a facade to the SchedulerProvider.
        /// </summary>
        private WebServiceAppointmentController Controller
        {
            get
            {
                if (_controller == null)
                {
                    _controller = new WebServiceAppointmentController("MyDBSchedulerProvider");
 
                }
                return _controller;
            }
        }
 
        [WebMethod(EnableSession=true)]
        //public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo)
        public IEnumerable<AppointmentData> GetAppointments(MySchedulerInfo schedulerInfo)
        {
            //
            Session["schHubID"] = schedulerInfo.HubID;
            Session["schDate"] = schedulerInfo.Date;
            Session["schOrderID"] = schedulerInfo.OrderID;
            return Controller.GetAppointments(schedulerInfo);
        }
 
 
         [WebMethod(EnableSession = true)]
        //public IEnumerable<AppointmentData> UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData)
        public IEnumerable<AppointmentData> UpdateAppointment(MySchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            Session["schHubID"] = schedulerInfo.HubID;
            Session["schDate"] = schedulerInfo.Date;
            Session["schOrderID"] = schedulerInfo.OrderID;
            return Controller.UpdateAppointment(schedulerInfo, appointmentData);
        }
 
        #region not used
        [WebMethod]
        public IEnumerable<AppointmentData> InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData)
        {
            return Controller.InsertAppointment(schedulerInfo, appointmentData);
        }
 
        [WebMethod]
        public IEnumerable<AppointmentData> CreateRecurrenceException(SchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
        {
            return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);
        }
 
        [WebMethod]
        public IEnumerable<AppointmentData> RemoveRecurrenceExceptions(SchedulerInfo schedulerInfo, AppointmentData masterAppointmentData)
        {
            return Controller.RemoveRecurrenceExceptions(schedulerInfo, masterAppointmentData);
        }
 
        [WebMethod]
        public IEnumerable<AppointmentData> DeleteAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries)
        {
            return Controller.DeleteAppointment(schedulerInfo, appointmentData, deleteSeries);
        }
        #endregion
 
       [WebMethod(EnableSession = true)]
        public IEnumerable<ResourceData> GetResources(MySchedulerInfo schedulerInfo)
        {
            Session["schHubID"] = schedulerInfo.HubID;
            return Controller.GetResources(schedulerInfo);
        }
    }

Within MyDBSchedulerProvider:
public class MyDbSchedulerProvider2 : DbSchedulerProviderBase
    {
        #region get Vans
        private IDictionary<int, Resource> _vans;       
 
        private IDictionary<int, Resource> Vans
        {
            get
            {
                bool load = false;
                if (_vans == null)
                {
                    load = true;
                }
                if (!load)
                {
                    //if (_vans.Count == 0)
                        load = true;
                }
                if (load)
                {
                    _vans = new Dictionary<int, Resource>();
                    foreach (Resource van in LoadVans()) <---NEED TO PASS PARAM HERE
                    {
                        _vans.Add((int)van.Key, van);
                    }
                     
                }
 
                return _vans;
            }
        }
        public override IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner)
        {
            ResourceType[] resourceTypes = new ResourceType[1];
            resourceTypes[0] = new ResourceType("Van", false);
            return resourceTypes;
        }

 I'm loading my resources (Vans), but I need to be able to pass a parameter (HubID) from my aspx to allow me to load the right resources.. I've tried doing this via "Session["schHubID"] = schedulerInfo.HubID;"
#region LoadVans
        private IEnumerable<Resource> LoadVans()
        {
            List<Resource> resources = new List<Resource>();
            int hubID = (int)HttpContext.Current.Session["schHubID"];
DO the load based on hubID


I'm no having much luck passing the param to the session... any ideas?

using Version 2010.1.309.35
Thanks

Boyan Dimitrov
Telerik team
 answered on 05 Sep 2013
3 answers
119 views
Hi
I use RadSkinManager to apply mycustom skin on every controls in my web application.
I add RadSkinManager in OnInit event in my PageBase.
I would like to do this...
MySkinManager.TargetControls.Add(ControlTypeToApplySkin.RadTreeViewContextMenu, mythema);

But ControlTypeToApplySkin
doesn't contain RadTreeViewContextmenu.
I tried to add RadContextMenu but it doesn't work.
Any suggestion?
Thank you
Boyan Dimitrov
Telerik team
 answered on 05 Sep 2013
2 answers
122 views
Hello All,
              I have code of rad date picker in aspx page like:
<td style="vertical-align: middle">
                                        <telerik:RadDatePicker ID="FromDate" runat="server" AutoPostBack="false" Calendar-AutoPostBack="false"
                                            Culture="English (United States)" SelectedDate="2011-10-01" Width="120px">
                                            <ClientEvents OnDateSelected="FromDateSelected" />
                                            <Calendar UseRowHeadersAsSelectors="False" AutoPostBack="false" UseColumnHeadersAsSelectors="False"
                                                ViewSelectorText="x">
                                            </Calendar>
                                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                            <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="false" CssClass="txtBack-Color"
                                                SelectedDate="2011-10-04">
                                            </DateInput>
                                        </telerik:RadDatePicker>
                                    </td>

This is works fine in Firefox,Chrome,safari and IE9,IE8 but in IE10 calendar not display properly. I also attach IE10 screen shots below.

Konstantin Dikov
Telerik team
 answered on 05 Sep 2013
2 answers
121 views
I have a user control with a RadListBox in it. The Page_Load event of the user control calls ScriptManager.RegisterClientScript to register a js file. The RadListBox has an OnClientLoad property referencing a function in the js file.

When I load the page with the user control I get a script error because the js file isn't loaded yet. But how can that be? RegisterClientScript puts a script tag in the head tag and OnClientLoad should only fire once the page is loaded. And when the page is loaded shouldn't the script tag already have been processed?

After that initial error everything seems to work ok because by then the script is finally loaded.

I tried putting the reference to the file directly into page that hosts the control but I still get the same error.
Ilya
Top achievements
Rank 1
 answered on 05 Sep 2013
1 answer
71 views
Hi,

We are setting tooltip property (server side) on nodes.
These are rendered as alt-tag for the image of a node.

This means that the tooltip is not displayed on the image in any modern browser. Only IE7 displays the alt-tag as tooltip, all other browsers that I have tested needs the title-attribute instead.

Hopfully you will fix this in the next release?

Regards
Caesar
Kate
Telerik team
 answered on 05 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?