Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
48 views
How to set when the pagedown key is pushed it select the next row in the grid
Eyup
Telerik team
 answered on 12 Dec 2016
1 answer
80 views

Hi,

Is it possible to upgrade radEditor only , I am using Telerik.Web.UI v4.0.30319 for asp.net web forms.

Thank you,

 

Marin Bratanov
Telerik team
 answered on 12 Dec 2016
1 answer
76 views

Hi,

 

I create a Webpage with DataGrid, and all great working, edit items, add nee etc. 

I have problem with this Grid when I try to implementing something in Page_load. I have to add to roles, One of them are editor, second one are reader. I catch the login user name from Request.ServerVeriables, and then recognize the login and assign role for them, bur when I do this my grid only list the rows but doesn't work any button on them like "edit" or "add new row" ;/ 

 

Thanks for feedback

regards

Tomasz
Top achievements
Rank 1
 answered on 12 Dec 2016
1 answer
183 views

Hi

I have a RadPane which loads an aspx page that contains a RadComboBox.

A Javascript function on the parent page is trying to find the element - 

$('#RAD_SPLITTER_PANE_CONTENT_MyRadPane').contents().contents().find("#" + cbo.id)

However, this returns just a jQuery object which is not useful when I want to manipulate the items using get_items() etc.

How can I get the Telerik client object in this scenario?

Thanks in advance.

Ivan Danchev
Telerik team
 answered on 12 Dec 2016
1 answer
274 views

Hi,

I am facing an issue with the tab index order. The expected tabindex order should be ‘header – body – footer’ but the order is ‘header – footer – body’. After tabbing the last column in header, the tab should go to first checkbox in the 1st row, but the tab is going to the page nation in the footer, and after that it goes to the first checkbox in the 1st row. I checked in the developer tools and noticed that Telerik control renders in html as <thead>, <tfoot> and <tbody> which is disturbing the tab index order. Please let me know how can i resolve this issue? I am using 2016 version of telerik.ui.dll.

Thanks in advance.

Kostadin
Telerik team
 answered on 12 Dec 2016
2 answers
176 views

Hello --

I have a custom task class and a custom provider (non-EM). Both follow the model code, and work perfectly on page load.

When changing values, the server side TaskUpdate event fires, and e.Tasks(0) has the expected values for the task that was just updated.

However...

Problem 1: e.Tasks(0) is a standard Task object, and not my CustomTask object. How can I get my custom field values on TaskUpdate?

Problem 2: Sender, while containing the appropriate RadGantt properties set on the .aspx page, does not have the Provider I gave it on Page Load. Also, Tasks contains zero object and GetAllTasks returns nothing.

I'm not sure what code will help, so I'll just post it all.  Sorry for the length.

Gantt declaration on the .aspx:

            <telerik:RadAjaxManager runat="server" EnableAJAX="true" ></telerik:RadAjaxManager>
            <telerik:RadAjaxPanel runat="server" >
            <telerik:RadGantt runat="server" RenderMode="Auto" ID="RadGantt1" Enabled="true" Visible="true"
                Skin="BlackMetroTouch" Height="600" Width="100%" ListWidth="60%"
                AllowColumnResize="true" AllowSorting="true" ReadOnly="false" ShowTooltip="false"
                EnablePdfExport="true" AutoGenerateColumns="false" DisplayDeleteConfirmation="true"
                AllowPercentCompleteDrag="false" ShowCurrentTimeMarker="true" EnableViewState="true"
                SelectedView="WeekView" WeekView-UserSelectable="true" YearView-UserSelectable="true"
                DayView-UserSelectable="true" MonthView-UserSelectable="true">
                <Columns>
                    <telerik:GanttBoundColumn DataField="Title" DataType="String" Width="180px" />
                    <telerik:GanttBoundColumn DataField="Start" DataType="DateTime" DataFormatString="dd/MM/yy" Width="80px" />
                    <telerik:GanttBoundColumn DataField="End" DataType="DateTime" DataFormatString="dd/MM/yy" Width="80px" />
                    <telerik:GanttBoundColumn DataField="System" HeaderText="System" DataType="String" Width="120px" />
                    <telerik:GanttBoundColumn DataField="ActivityType" HeaderText="Type" DataType="String" Width="120px" />
                    <telerik:GanttBoundColumn DataField="AssignedTo" HeaderText="AssignedTo" DataType="String" Width="120px" />
                    <telerik:GanttBoundColumn DataField="NotificationAddress" HeaderText="Notify" DataType="String" Width="250px" />
                    <telerik:GanttBoundColumn DataField="Description" HeaderText="Description" DataType="String" Width="300px" />
                </Columns>
                <CustomTaskFields>
                    <telerik:GanttCustomField PropertyName="Description" ClientPropertyName="description" Type="String" />
                    <telerik:GanttCustomField PropertyName="AssignedTo" ClientPropertyName="assignedTo" Type="String" />
                    <telerik:GanttCustomField PropertyName="System" ClientPropertyName="system" Type="String" />
                    <telerik:GanttCustomField PropertyName="ActivityType" ClientPropertyName="activityType" Type="String" />
                    <telerik:GanttCustomField PropertyName="NotificationAddress" ClientPropertyName="notificationAddress" Type="String" />
                </CustomTaskFields>
                <DataBindings>
                    <TasksDataBindings IdField="ID" ParentIdField="ParentID" StartField="Start" EndField="End" TitleField="Title" PercentCompleteField="PercentComplete" SummaryField="Summary" ExpandedField="Expanded" OrderIdField="OrderID" />
                    <DependenciesDataBindings TypeField="Type" IdField="ID" PredecessorIdField="PredecessorID" SuccessorIdField="SuccessorID" />
                </DataBindings>
            </telerik:RadGantt>
            </telerik:RadAjaxPanel>

 

The page code-behind:

    Private Sub RadGantt1_TaskUpdate(sender As Object, e As TaskEventArgs) Handles RadGantt1.TaskUpdate

       ' Both sender and RadGantt1 have no tasks here!

       'e.Tasks(0) is a standard Task object. How can I get my custom column data?

   End Sub

 

 

Lastly, sorry for the huge clip, but I don't know what could be significant.

Here's the custom provider. It seems to work fine.

Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports Telerik.Web.UI.Gantt

Public Class CustomTask
    Inherits Task

    Public Sub New()
        MyBase.New()
    End Sub

    Public Property Description() As String
        Get
            Return DirectCast(If(ViewState("Description"), ""), String)
        End Get
        Set(value As String)
            ViewState("Description") = value
        End Set
    End Property

    Public Property AssignedTo() As String
        Get
            Return DirectCast(If(ViewState("AssignedTo"), ""), String)
        End Get
        Set(value As String)
            ViewState("AssignedTo") = value
        End Set
    End Property

    Public Property System() As String
        Get
            Return DirectCast(If(ViewState("System"), ""), String)
        End Get
        Set(value As String)
            ViewState("System") = value
        End Set
    End Property

    Public Property RunActivityID() As Integer
        Get
            Return DirectCast(If(ViewState("RunActivityID"), ""), Integer)
        End Get
        Set(value As Integer)
            ViewState("RunActivityID") = value
        End Set
    End Property

    Public Property ActivityType() As String
        Get
            Return DirectCast(If(ViewState("ActivityType"), ""), String)
        End Get
        Set(value As String)
            ViewState("ActivityType") = value
        End Set
    End Property

    Public Property NotificationAddress() As String
        Get
            Return DirectCast(If(ViewState("NotificationAddress"), ""), String)
        End Get
        Set(value As String)
            ViewState("NotificationAddress") = value
        End Set
    End Property

    Public Property ScheduleDays() As String
        Get
            Return DirectCast(If(ViewState("ScheduleDays"), ""), String)
        End Get
        Set(value As String)
            ViewState("ScheduleDays") = value
        End Set
    End Property

    Protected Overrides Function GetSerializationData() As IDictionary(Of String, Object)
        Dim dict = MyBase.GetSerializationData()

        dict("Description") = Description
        dict("AssignedTo") = AssignedTo
        dict("System") = System
        dict("RunActivityID") = RunActivityID
        dict("ActivityType") = ActivityType
        dict("NotificationAddress") = NotificationAddress
        dict("ScheduleDays") = ScheduleDays

        Return dict
    End Function

    Public Overrides Sub LoadFromDictionary(values As System.Collections.IDictionary)
        MyBase.LoadFromDictionary(values)

        Description = DirectCast(values("Description"), String)
        AssignedTo = DirectCast(values("AssignedTo"), String)
        System = DirectCast(values("System"), String)
        RunActivityID = DirectCast(values("RunActivityID"), Integer)
        ActivityType = DirectCast(values("ActivityType"), String)
        NotificationAddress = DirectCast(values("NotificationAddress"), String)
        ScheduleDays = DirectCast(values("ScheduleDays"), String)
    End Sub
End Class

Public Class CustomGanttTaskFactory
    Implements ITaskFactory

    Private Function ITaskFactory_CreateTask() As Task Implements ITaskFactory.CreateTask
        Return New CustomTask()
    End Function
End Class

Public Class GanttCustomProvider
    Inherits GanttProviderBase

    Private TemplateName As String
    Private RunID As Integer
    Private ProcString As String  'all three of these are used to help form the SQL queries

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(Template As String)
        MyBase.New()
        TemplateName = Template
        ProcString = "@TemplateName = '" & TemplateName & "'"
    End Sub

    Public Sub New(SandboxRunID As Integer)
        MyBase.New()
        RunID = SandboxRunID
        ProcString = "@RunID = " & SandboxRunID.ToString
    End Sub

    Public Overrides ReadOnly Property TaskFactory() As ITaskFactory
        Get
            Return New CustomGanttTaskFactory()
        End Get
    End Property

    Public Overrides Function GetTasks() As List(Of ITask)
        Dim tasks = New List(Of ITask)()

        Dim strConn As String = ConfigurationManager.ConnectionStrings("DefaultConnection").ConnectionString
        Dim conn As New SqlConnection(strConn)
        Dim cmdCommand As SqlCommand = conn.CreateCommand()
        cmdCommand.CommandText = "usp_Telerik_Task_SELECT " & ProcString
        cmdCommand.CommandType = System.Data.CommandType.Text
        conn.Open()
        Dim dr As SqlDataReader = cmdCommand.ExecuteReader()
        If dr.HasRows Then
            While dr.Read()
                Dim newTask As New CustomTask
                newTask.ID = dr("ID")
                newTask.ParentID = dr("ParentID")
                newTask.OrderID = dr("OrderID")
                newTask.Title = dr("Title")
                newTask.Start = dr("Start")
                newTask.End = dr("End")
                newTask.PercentComplete = dr("PercentComplete")
                newTask.Expanded = dr("Expanded")
                newTask.Summary = dr("Summary")
                newTask.Description = dr("Description")
                newTask.AssignedTo = dr("Assigned To")
                newTask.System = dr("StageID").ToString()
                newTask.RunActivityID = dr("RunActivityID")
                newTask.ActivityType = dr("ActivityType")
                newTask.NotificationAddress = dr("Notification Address")
                newTask.ScheduleDays = dr("ScheduleDays")

                tasks.Add(newTask)
            End While
        End If

        tasks(0).ParentID = Nothing
        tasks(0).Summary = True

        Return tasks
    End Function

    Public Overrides Function UpdateTask(task As ITask) As ITask
        Dim strConn As String
        Dim sqlText As String = "usp_Telerik_Task_UPDATE "

        sqlText = sqlText & "@ID = " & task.ID.ToString
        sqlText = sqlText & ", @ParentID = " & task.ParentID.ToString
        sqlText = sqlText & ", @OrderID = " & task.OrderID.ToString
        sqlText = sqlText & ", @Title = '" & task.Title & "'"
        sqlText = sqlText & ", @Start = '" & task.Start.ToString & "'"
        sqlText = sqlText & ", @End = '" & task.End.ToString & "'"
        sqlText = sqlText & ", @PercentComplete = " & task.PercentComplete.ToString
        sqlText = sqlText & ", @Expanded = " & task.Expanded.ToString()
        sqlText = sqlText & ", @Summary = " & task.Summary.ToString()

' comment out these lines because only a standard task is provided by the control and the custom fields are not included.
        'sqlText = sqlText & ", @StageName = '" & task.StageName & "'"
        'sqlText = sqlText & ", @ActivityType = '" & task.ActivityType.ToString & "'"
        'sqlText = sqlText & ", @NotificationAddress = '" & task.NotificationAddress.ToString & "'"
        'sqlText = sqlText & ", @ScheduleDays = '" & task.ScheduleDays.ToString & "'"
        'sqlText = sqlText & ", @Comments = '" & task.Description.ToString & "'"

        strConn = ConfigurationManager.ConnectionStrings("DefaultConnection").ConnectionString
        Dim conn As New SqlConnection(strConn)
        Dim cmdCommand As SqlCommand = conn.CreateCommand()
        cmdCommand.CommandText = sqlText
        cmdCommand.CommandType = System.Data.CommandType.Text
        conn.Open()
        cmdCommand.ExecuteNonQuery()

        Return task
    End Function

    Public Overrides Function DeleteTask(task As ITask) As ITask
' not implemented yet

        Return task
    End Function

    Public Overrides Function InsertTask(task As ITask) As ITask
' not implemented yet

        Return task
    End Function

    Public Overrides Function GetDependencies() As List(Of IDependency)
        Dim deps = New List(Of IDependency)()

        Dim strConn As String
        strConn = ConfigurationManager.ConnectionStrings("DefaultConnection").ConnectionString
        Dim conn As New SqlConnection(strConn)
        Dim cmdCommand As SqlCommand = conn.CreateCommand()
        cmdCommand.CommandText = "usp_Telerik_TaskDependencies_SELECT " & ProcString
        cmdCommand.CommandType = System.Data.CommandType.Text
        conn.Open()
        Dim dr As SqlDataReader = cmdCommand.ExecuteReader()
        If dr.HasRows Then
            While dr.Read()
                Dim newDep As New Dependency
                newDep.ID = dr("ID")
                newDep.PredecessorID = dr("PredecessorID")
                newDep.SuccessorID = dr("SuccessorID")
                newDep.Type = dr("Type")
                deps.Add(newDep)
            End While
        End If

        Return deps
    End Function

    Public Overrides Function DeleteDependency(dependency As IDependency) As IDependency
' not implemented yet

        Return dependency
    End Function

    Public Overrides Function InsertDependency(dependency As IDependency) As IDependency
' not implemented yet

        Return dependency
    End Function
End Class

David
Top achievements
Rank 1
 answered on 11 Dec 2016
2 answers
671 views

Hi, 

   I am looking for ideas to display each row in two lines, as shown below.

  | col1  |   col 2 |  col 3  | col 5| col 6 |

  | col7  |  Edit button | Save button   |

Please suggest for any ideas, if possible.

 

Thank you,

Madhavi

madhavi
Top achievements
Rank 1
 answered on 10 Dec 2016
2 answers
217 views
I have a RadGrid which can wrap the text in cells.  The end result is that some rows are one line high while others are taller.  How can I determine, server-side, the height of a given row?
Grant
Top achievements
Rank 2
 answered on 09 Dec 2016
2 answers
126 views
I have gridview of a table so I can export it.
if I can export off of some other item like a panel - that may help.
anyhow my grid has html and I put a single plain text at top to test and when I export to pdf - only that text shows.
when I export to word - everything shows (properly)

is there a command I need to do to tell pdf to use html table?
Doug
Top achievements
Rank 1
 answered on 09 Dec 2016
0 answers
188 views

Is it possible to apply Bootstrap styling to a version '2013.3.1324.40' RadGrid? 

(Please don't discuss upgrades.  It's just not politically possible at this time.)

Boris
Top achievements
Rank 1
 asked on 09 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?