Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
213 views

Hello,

I have a radscheduler on my page. It is currently ordered by default, by start time of the appointment. I want the appointments to be sorted by a custom property "CompanyLocation". I followed this post but could not get the correct result. The post is this

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/how-can-i-change-the-display-order-of-the-radscheduler-appointment-in-monthview.aspx

At the bottom you will see my comment there. I was wondering if that thread is closed. Basically I load a datatable from my stored procedure with 6 columns ID,Subject,Start,end,CompanyLocation. In mark up I have

CustomAttributeNames="CompanyLocation" EnableCustomAttributeEditing="true"

In my pageload I call a BindData function that populates and fills the datatable which I bind



radScheduler.DataSource = dt

radScheduler.DataBind()



Protected Overrides Sub OnInit(e As EventArgs)

MyBase.OnInit(e)       

radScheduler.AppointmentComparer = New CustomAppointmentComparer("CompanyLocation", SortDirection.Descending)

End Sub



My CustomAppointmentComparer class is like this:



Class CustomAppointmentComparer

Implements IComparer

 

Private m_strField As String

Private _sortDirection As SortDirection

Sub New(strField As String, sortDirection As SortDirection)

 

m_strField = strField

_sortDirection = sortDirection

End Sub

Public Function Compare(first As Appointment, second As Appointment) As Integer

 

If first.Start < second.Start Then

Return -1

End If

If first.Start > second.Start Then

Return 1

End If

If first.[End] > second.[End] Then

Return -1

End If

Return [String].Compare(first.Attributes(m_strField), second.Attributes(m_strField))

End Function

Public Function Compare1(ByVal x As Object, ByVal y As Object) As Integer Implements System.Collections.IComparer.Compare

Dim apt1 As Appointment

Dim apt2 As Appointment

If GetType(Appointment).IsInstanceOfType(x) Then

apt1 = CType(x, Appointment)

Else

Throw New Exception("Casting failed...")

End If

If GetType(Appointment).IsInstanceOfType(y) Then

apt2 = CType(y, Appointment)

Else

Throw New Exception("Casting failed...")

End If

Select Case _sortDirection

Case SortDirection.Ascending

Return x.GetType.GetProperty(m_strField).GetValue(x, Nothing) < y.GetType.GetProperty(m_strField).GetValue(y, Nothing)

Case Else 'SortDirection.Descending

Return x.GetType.GetProperty(m_strField).GetValue(x, Nothing) > y.GetType.GetProperty(m_strField).GetValue(y, Nothing)

End Select

End Function

End Class

So what is that I am doing wrong?

Plamen
Telerik team
 answered on 17 Sep 2014
2 answers
169 views
hello

I am using Radgrid with template column of Radtextbox
as shown in attached image i want to nevigate to next textbox using arrow keys.

ie if left arrow key is clicked it should nevigate to left textbox and if down arrow key is clicked it should nevigate to below textbox

one more problem is - when up/down arrow key is clicked in RadNumeric textbox it increase/decrease the number how to avoid this behavoiur.

thanks
Kishor Dange
Kishor
Top achievements
Rank 2
 answered on 17 Sep 2014
3 answers
215 views
I am using the RadProgressArea to show the progress of a long running custom process on the server. When the process is complete, I set the RadProgressContext.Current.OperationComplete = true. At this point the RadProgressArea disappears. 

Is there any way to fire an event on the client side when the RadProgressContext.Current.OperationComplete property is set to true? I would like to run some javascript code showing telling the user that the process has completed successfully or display any information from the process.
Boyan Dimitrov
Telerik team
 answered on 17 Sep 2014
1 answer
100 views
Hello,

I'm using Html.Kendo().Grid and one of the column is datetime type. The filter "is equal to" is not working. Any solution?
Vladimir Iliev
Telerik team
 answered on 17 Sep 2014
2 answers
102 views
Hey all,

Short Desc:
I have been given an interesting task of taking an old system (built on .Net 3.5) and upgrading to 4.5. This system uses the RadGrid from version Q3 2011. When I update my framework it looks like the radgrid is not rendering out the correct table tag that it needs to. Is there a rendering mode or a setting I am missing to fix this?

Long Desc:

Before I get to the code, here are my guidelines I have to stick to.
1) I cannot update my telerik license due to budget.
2) I have to run as .Net 4 or up. 

The code for the rad grid is pretty straitforward. (I apologize for the wall of code)

01.<telerik:RadGrid ID="grdCustomers" runat="server" GridLines="None"
02.    AllowSorting="true" OnItemCreated="grdCustomers_ItemCreated" OnSortCommand="grdCustomers_SortCommand"
03.    OnItemCommand="grdCustomers_ItemCommand"
04.    OnNeedDataSource="grdCustomers_NeedDataSource">
05.    <HeaderContextMenu>
06.        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
07.    </HeaderContextMenu>
08.    <ClientSettings>
09.        <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" ClipCellContentOnResize="false" />
10.    </ClientSettings>
11.    <MasterTableView AutoGenerateColumns="False" HierarchyLoadMode="ServerOnDemand" DataKeyNames="CustomerID" TableLayout="Auto"
12.        Name="Master">
13.        <RowIndicatorColumn>
14.            <HeaderStyle Width="20px"></HeaderStyle>
15.        </RowIndicatorColumn>
16.        <ExpandCollapseColumn>
17.            <HeaderStyle Width="20px"></HeaderStyle>
18.        </ExpandCollapseColumn>
19.        <AlternatingItemStyle CssClass="config_alternating_item" />
20.        <Columns>
21.            <telerik:GridTemplateColumn UniqueName="IDColumn" HeaderText="ID" SortExpression="CustomerID">
22.                <ItemTemplate>
23.                <asp:LinkButton ID="lbtnID" runat="server"
24.                    CommandName="EditCustomer"
25.                    CommandArgument='<%# ourObject.CustomerID %>' />
26.                <br />
27.                <asp:Literal ID="ltCreatedOn" runat="server" />
28.                </ItemTemplate>
29.            </telerik:GridTemplateColumn>
30.            <telerik:GridTemplateColumn HeaderText="Name" UniqueName="NameColumn" SortExpression="Name">
31.                <ItemTemplate>
32.                    <asp:LinkButton ID="lbtnName" runat="server"
33.                    CommandName="EditCustomer"
34.                    CommandArgument='<%# CustomerID %>'/>
35.                </ItemTemplate>
36.            </telerik:GridTemplateColumn>
37.        </Columns>
38.    </MasterTableView>
39.    <FilterMenu>
40.        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
41.    </FilterMenu>
42.</telerik:RadGrid>


When this gets rendered into html in .net 3.5 it creates the source below
01.<div id="pregenID" class="RadGrid RadGrid_Default" tabindex="0">
02.    <table class="rgMasterTable" border="0" id="pregenID" style="width:100%;table-layout:auto;empty-cells:show;">
03.        <colgroup>
04.            <col>
05.            <col>
06.        </colgroup>
07.        <thead>
08.            <tr>
09.                <th scope="col" class="rgHeader" title="">
10.                    <a title="Click here to sort" href="postback">ID</a>
11.                </th>
12.                <th scope="col" class="rgHeader" title="">
13.                    <a title="Click here to sort" href="postback">Name</a>
14.                </th>
15.            </tr>
16.        </thead>
17.        <tbody>
18.            <tr class="rgRow" id="pregenID">
19.                <td>
20.                    <a id="col1">cust id</a>
21.                    <br>
22.                    9/9/2014
23.                </td>
24.                <td>
25.                    <a id="col2">cust name</a>
26.                </td>
27.            </tr>
28.            <tr class="rgAltRow config_alternating_item" id="pregenID">
29.                <td>
30.                    <a id="col1">cust2 id</a>
31.                    <br>
32.                    9/6/2014
33.                </td>
34.                <td>
35.                    <a id="col2">cust2 name</a>
36.                </td>
37.            </tr>
38.        </tbody>
39.    </table>
40.</div>


Here is the one being generated in 4.5
01.<div id="pregenID" class="RadGrid RadGrid_Default">
02.    <a id="pregenID" href="postback">cust id</a>
03.    <br>
04.    9/9/2014
05.</div>
06.<td>
07.    <a id="pregenID" href="postback">cust name</a>
08.</td>
09.</tr>
10.<tr class="rgAltRow config_alternating_item" id="pregenID">
11.    <td>
12.        <a id="pregenID" href="postback">cust2 id</a>
13.        <br>
14.        9/6/2014
15.    </td>
16.    <td>
17.        <a id="pregenID" href="postback">Admin User</a>
18.    </td>
19.</tr>

Maria Ilieva
Telerik team
 answered on 17 Sep 2014
1 answer
187 views
This is the image we did using and css. I am trying to implement the same in RAD Menu.

How can I align image right to the text in Radmenuitem ? This image is in my solution.

In this image, hover over the text and image will slide the menu. How can do it in radmenu ?

<telerik:RadMenu ID="rmMenu" runat="server" EnableImagePreloading="true" EnableEmbeddedSkins="false"     BorderColor="Black" BorderStyle="None" BorderWidth="0px" Skin="COPMenu" BackColor="Transparent" ExpandAnimation-Type="None">
       <Items>
               <telerik:RadMenuItem ID="riTrans" runat="server" Text="Communication"></telerik:RadMenuItem>
                <telerik:RadMenuItem ID="riGen" runat="server" Text="Appointment Book"></telerik:RadMenuItem>
      </Items>
</telerik:RadMenu>
Magdalena
Telerik team
 answered on 17 Sep 2014
7 answers
395 views
Hi.

I have a RadMenu as below:
        
                                <telerik:RadMenu runat="server" ID="templatesMenu" OnClientItemClicked="templatesMenuOnItemClicked" 
                                    OnClientLoad="templatesMenuOnClientLoad" Skin="Telerik" Style="margin-left: 10px;" DefaultGroupSettings-Height="250px" EnableAutoScroll="true" EnableScreenBoundaryDetection="false"
                                    <Items> 
                                        <telerik:RadMenuItem Text="<span style='color: Black; font-weight: normal;'>Templates</span>" runat="server" GroupSettings-Height="250"
                                        </telerik:RadMenuItem> 
                                    </Items> 
                                </telerik:RadMenu> 

I am dynamically adding three items in javascript to the root Item "Templates". Then each of these sub-items have 40ish sub-items added under them. Shouldn't scrolling work on these 40ish sub-items, since I have enableautoscroll and Default-GroupSettings and EnableScreenDetection configured?

I've tried every combination of those three to no avail. Scrolling just doesn't appear for these sub-sub items.
Magdalena
Telerik team
 answered on 17 Sep 2014
5 answers
72 views
Hi,

When I use LightBox all of keys are hijacked.

So I cannot use any key (combination) stroke.

Marc

Maria Ilieva
Telerik team
 answered on 17 Sep 2014
1 answer
94 views
I have a RadComboBox(with checkboxes) and RadTextBox. Whenever I choose items in RadComboBox and select RadTextBox to enter text, cursor in RadTextBox is lost and I cannot enter Text. I have to click in RadTextBox again in order to enter the text.

If I select items in RadComboBox and click somewhere else on the Page and later if I select RadTextBox then it works.

Please help

Thanks
Peter Filipov
Telerik team
 answered on 17 Sep 2014
3 answers
414 views
I am trying to export a gridview with itextsharp to PDF but I get some errors i need the source code (C#) of the simplest form to export the gridview to PDF. I am already successfully exporting to PDF "chunk" "phrases" and adding the paragraph to the document. Below these data I want to add the gridview. Can you please provide the code to do this? I just need the code of the simplest form....


Thanks...
Angel Petrov
Telerik team
 answered on 17 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?