Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views
Is it possible for me to populate a dropdown menu with the column names from my radgrid and use the dropdown menu to sort the grid (along with radio buttons to select ascending or descending), as opposed to using column headers to sort?
Princy
Top achievements
Rank 2
 answered on 13 Jun 2013
1 answer
74 views
Hi,

I have recently updated a webpart which worked in SP2010 to SP2013, the upgrade process was changing the target framework and referencing the telerik.ui for 4.5

After deploying the webpart into SP2013, i'm now getting this error:

"that assembly does not allow partially trusted callers"

I assume its to do with the changes in 4.5 security? has anyone experienced the same issue?

I'd like to avoid putting the telerik.dll's in the GAC

Thanks
Nencho
Telerik team
 answered on 13 Jun 2013
3 answers
124 views
I have a grid and i am applying sorting on the columns on client side using this code :

<script type="text/javascript">
    function AddSortExpression(grid, fieldName, sortOrder) {
        var sortExpression = new Telerik.Web.UI.GridSortExpression();
        sortExpression.set_fieldName(fieldName);
        sortExpression.set_sortOrder(sortOrder);
        grid.get_masterTableView()._sortExpressions.add(sortExpression);
        grid.get_masterTableView()._showSortIconForField(fieldName, sortOrder);
    }
</script>

The code works fine for a single column sorting but if there are two columns
to be sorted then sorting gets applied on the two columns and the column header
color changes to denote that but the little black triangle which denotes whether
it is a ascending or descending sort vanishes. I have attached the image of how
the header looks.

Please help me out.

Angel Petrov
Telerik team
 answered on 13 Jun 2013
1 answer
113 views
    Hello.
I`m using RadGrid populating data in OnNeedDataSource.
I want to check row count on client side before exporting and if row count is greater than 100000 (for examle) I want to show  Alert('Can`t exporf data, please specify another criteria')
How can I do this? What client event use? How to check row count on client side?
Princy
Top achievements
Rank 2
 answered on 13 Jun 2013
0 answers
83 views
i have issue with datetime picker in radscheduler. I have a custom time starting from 04:00 Am and it has interval of 30 min i have a function that returns all the time starting from 04:00 am and goes till 03:30 on 24 hour. But when i bind this time with either datetime picker or time picker it shows time starting from 12:00 Am and when i click 12:00 am it populates the datetime picker time with 04:00 am.i don't know what's going on. Can anyone help me with this.
Ashesh
Top achievements
Rank 1
 asked on 12 Jun 2013
1 answer
530 views
Hello,

I'm trying to implement a RadScheduler. I have it all set up with an appointment data source with two resource (room and user) data sources. I autogenerated the insert/update/delete commands for the appointment data source. Whenever I try to create a new appointment I get the following error (even though I only have 9 parameters...):

[OleDbException (0x80040e21): Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]
  
[InvalidOperationException: Command parameter[9] '' is invalid.
Command parameter[10] '' is invalid.
Command parameter[11] '' is invalid.
]
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e) +39
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +72
   Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Insert(RadScheduler owner, Appointment appointmentToInsert) +202
   Telerik.Web.UI.SchedulerProviderBase.Insert(ISchedulerInfo schedulerInfo, Appointment appointmentToInsert) +70
   Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointment) +109
   Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointment(ISchedulerInfo schedulerInfo, Appointment appointment) +40
   Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +303
   Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +505
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +156
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9643314
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

Here is my Default.aspx code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body style="height: 459px">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
  
        // Avoid Page_Validators is undefined error.
        var Page_Validators = new Array();
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
  
    </div>
        <telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Description" DataEndField="End_Time" DataKeyField="AppointmentID" DataRecurrenceField="Recurrence_Rule" DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="SqlDataSource_Appointment" DataStartField="Start_Time" DataSubjectField="Subject" DayEndTime="19:00:00" DayStartTime="07:00:00" StartInsertingInAdvancedForm="True" WorkDayStartTime="09:00:00" Height="600px" SelectedView="MonthView">
            <ResourceTypes>
                <telerik:ResourceType DataSourceID="SqlDataSource_Resource" ForeignKeyField="RoomID" KeyField="ResourceID" Name="Rooms" TextField="RoomName" />
                <telerik:ResourceType DataSourceID="SqlDataSource_Employee" ForeignKeyField="EmployeeID" KeyField="EmployeeID" Name="Employees" TextField="UserName" />
            </ResourceTypes>
            <WeekView DayStartTime="07:00:00" WorkDayStartTime="09:00:00" />
            <DayView DayStartTime="07:00:00" WorkDayStartTime="09:00:00" />
            <MultiDayView DayStartTime="07:00:00" WorkDayStartTime="09:00:00" />
        </telerik:RadScheduler>
        <asp:SqlDataSource ID="SqlDataSource_Employee" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString_mgsql2 %>" ProviderName="<%$ ConnectionStrings:ConnectionString_mgsql2.ProviderName %>" SelectCommand="SELECT [EmployeeID], [UserName] FROM [Employee] ORDER BY [UserName]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource_Appointment" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString_mgsql2 %>" ProviderName="<%$ ConnectionStrings:ConnectionString_mgsql2.ProviderName %>" SelectCommand="SELECT * FROM [Appointment]" DeleteCommand="DELETE FROM [Appointment] WHERE [AppointmentID] = ?" InsertCommand="INSERT INTO [Appointment] ([AppointmentID], [Subject], [Description], [Start], [End], [RoomID], [EmployeeID], [RecurrenceRule], [RecurrenceParentID]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [Appointment] SET [Subject] = ?, [Description] = ?, [Start] = ?, [End] = ?, [RoomID] = ?, [EmployeeID] = ?, [RecurrenceRule] = ?, [RecurrenceParentID] = ? WHERE [AppointmentID] = ?">
            <DeleteParameters>
                <asp:Parameter Name="AppointmentID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="AppointmentID" Type="Int32" />
                <asp:Parameter Name="Subject" Type="String" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="Start" Type="DateTime" />
                <asp:Parameter Name="End" Type="DateTime" />
                <asp:Parameter Name="RoomID" Type="Int32" />
                <asp:Parameter Name="EmployeeID" Type="Int32" />
                <asp:Parameter Name="RecurrenceRule" Type="String" />
                <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Subject" Type="String" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="Start" Type="DateTime" />
                <asp:Parameter Name="End" Type="DateTime" />
                <asp:Parameter Name="RoomID" Type="Int32" />
                <asp:Parameter Name="EmployeeID" Type="Int32" />
                <asp:Parameter Name="RecurrenceRule" Type="String" />
                <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
                <asp:Parameter Name="AppointmentID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource_Resource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString_mgsql2 %>" ProviderName="<%$ ConnectionStrings:ConnectionString_mgsql2.ProviderName %>" SelectCommand="SELECT * FROM [Resource]"></asp:SqlDataSource>
    </form>
</body>
</html>

Please help me!

Thanks,
Matt
Matt
Top achievements
Rank 1
 answered on 12 Jun 2013
29 answers
1.3K+ views
Hi,

    Just I am starting the evaluation of your control, but i have a big question: Is it possible to avoid the overlapping of 2 appointments ?
    It's means that when the user finish the drag&drop of the one of them, the control returns it to the original position, if it drops inside the time interval of the second  (avoiding the overlapping each other)...
    I need this feature in my application because my real cases can't be happening at the same or parallel time.

Thanks for your help.
Abod
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
309 views

I have a RadListView that binds and displays data correctly. In the ItemTemplate there is an edit button. When the user clicks the edit button I handle the ListViews OnItemEditing event.

In the EditItem template I have a txtbx(s) for the text values and a cmbo box for a list of choices for one of the data items. The combo box binds and displays choices just fine.

So I thought it would be nice to find in the combobox the current (i.e. ListView item that has been clicked to edit) matching option, display it (find in combo box list of choices and make it selected choice) and this is where I hit my snag. I can't seem to get a handle on the DataItem....well actually I can and it is null???

My reading while trying to solve reveals that the list is technically not yet in "edit" mode. If that is the case then does that mean the data item is not yet populated? This would explain why my data item is empty but then I can't find any other event to handle to achieve my objective?

<telerik:RadListView ...<snip>... OnItemEditing="ExPrgmLstVw_ItemEditing" >
....Layout Template, ItemTemplate, EditTemplate, Insert Template......
</telerik:RadListView>
 
protected void ExPrgmLstVw_ItemEditing(object sender, RadListViewCommandEventArgs e)
{
 ...
  RadListViewDataItem itm = (RadListViewDataItem) e.ListViewItem;
  ...
}

Here is the SO question as well so get yourself some SO points too! I have a screenshot here with the debugger showing my empty data item.
(http://stackoverflow.com/questions/16986363/accessing-listview-item-being-edited)


So in summary I just need to know how to id the item being clicked for editing etc. so I can get at the data values for that item. Thank You
JB
Angel Petrov
Telerik team
 answered on 12 Jun 2013
1 answer
103 views
Hello everyone,

I am trying to show the HeaderContextFilterMenu every time an image is clicked in the header of a RadGrid control.

I'm using this example as a reference.
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextfiltermenu/defaultcs.aspx


I am handling the image clicks in jQuery like so...

        //images have a class of .showFilter
        $(".showFilter").live('click', function (event, handler) {
            var mouseEvent = event.originalEvent;  
            showFilter(this, mouseEvent)
        });

    ...getting the Radrid header object in jQuery and then calling the _initHeaderContextMenu() to show the menu.

     function showFilter(imageLink, event)
     {
        var header = imageLink.parentElement.control;
        var sysEvent = new Sys.UI.DomEvent(event);
        header._initHeaderContextMenu(sysEvent, undefined, 75, 20);
     }

    This does show the HeaderContextMenu for the proper column header.

    The problem is that the menu immediately closes.

I suspect this is because I am not capturing the same event as a right click on the header but instead manufacturing a Sys.UI.DomEvent based off the image click event.

Can anyone help me out with this?

  Thanks,
    Chuck



Chuck
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
38 views
Hello,

i have a problem with the export pdf into my radscheduler.

when i load my page, i have the view Timeline selected,

i change the view (for example: MonthView) and i click to export on PDF.

But when i see the pdf, the MonthView is not showed but it's the Timelineview and the date is not respected

do you have a solution?

Thx

Grégory
Peter
Top achievements
Rank 1
 answered on 12 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?