Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views

Hi,

I'm using Telerik version 2013.2.717.35 and trying to setup the keyboard navigation for the Radgrid.

did the following settings

<ClientSettings AllowKeyboardNavigation="true">
<Selecting AllowRowSelect="true"></Selecting>
<KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowSubmitOnEnter="true"
AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow"></KeyboardNavigationSettings>
</ClientSettings>

Still I could not able to navigate with the keyboard in IE11(working fine Chrome).

While navigating we set the focus to the Grid as well.

Please let me know is there any workaround to achieve this functionality.

Note: Not possible to upgrade the Telerik at this moment.

Thanks

Kesava

 

Rumen
Telerik team
 answered on 24 Oct 2016
4 answers
195 views
Hello.

I've implemented paging and it works great, however,  when I use the scroll bar to change the page the scroll bar position always goes back to the second/third page position. Below is my OnCommand method that deals with changing the page.

args.set_cancel(true);  
          
        var commandArg = args.get_commandArgument();  
                
        if(commandArg == 'Next')  
            thisSession.Grid.Page += 1;  
        else if(commandArg == 'Prev')  
            thisSession.Grid.Page -= 1;  
          
        if(thisSession.Grid.Page == 0) thisSession.Grid.Page = 1;  
          
        thisSession.Grid.Page = sender.get_masterTableView().get_currentPageIndex() + 1;  
          
        if(args.get_commandName() == "Sort")  
        {  
            thisSession.Grid.SortExpression = sender.get_masterTableView().get_sortExpressions();  
            var tsContent = $find('<%=tsContent.ClientID %>');  
            if(!tsContent) return;  
              
              
              
              
              
        }  
          
        var tsContent = $find('<%=tsContent.ClientID %>');  
        if(!tsContent) return;  
        var searchID = tsContent.get_selectedTab().get_value();  
          
        //getSearch(searchID);  
        var searchText = (thisSession.Grid.SearchText == null) ? '' : thisSession.Grid.SearchText;  
        PAB3.GetSearch(searchID.substring(4),thisSession.Grid.Days,  
        thisSession.Grid.Page,thisSession.Grid.PageSize,thisSession.Grid.SortExpression, thisSession.Grid.SearchType,searchText,  
        updateGrid_Paging,function(e){alert(e.get_message());}); 
bharath
Top achievements
Rank 1
 answered on 24 Oct 2016
24 answers
1.2K+ views
Hi,
         I have a problem to add LinkButton in Radgrid. i'm using DataTable as a source for RadGrid.The First Column of Datatable must come as Link Button on RadGrid. but the column of Datatable will not be static(if the DataTable has 5 columns in one scenario then the DataTable can has 50 columns in another scenario). It can change. so i cant use Item template  on RadGrid for this problem.

My Requirement is,

1. The First column of DataTable data will bind to Grid as LinkButton.
2. I need to add some event handler for that LinkButton.
 
  Plz send me some sample code for this. I need it urgently....

Thanks in advance.
Alexis
Kostadin
Telerik team
 answered on 24 Oct 2016
1 answer
72 views

Hi,

We are using the RADGrid with the columns set to be resizable and the minimum width set to be 100% so that the table always fills the available space. Most of the time this works fine and when resizing columns by dragging the column edge follows the mouse as it should. Occasionally however, the column resizes by a huge amount when the mouse is moved only a small distance, resulting in a very jerky experience where the column gets either very wide or very thin extremely quickly.  Is there any reason you know why this might be happening or a setting we should look at that can mitigate this please?

Thanks for your help in advance.

Viktor Tachev
Telerik team
 answered on 24 Oct 2016
3 answers
82 views

Hi everybody,

   I got one issue with RadSchedulerRecurrenceEditor. In my test project, I created 2 items (Test 1 and Test 2) in the test RadGrid. For Test 1, I assigned an Appointment instance where the RecurrenceEditor is a regular Hourly recurrence (Test1RecurrenceEditor.PNG). For Test 2, I assigned a new Appointment where the RecurrenceEditor is an Hourly recurrence with EndAfter (Test2RecurrenceEditor.PNG). I saved after I created each. Test 2 was selected. After I clicked on Test 1, my project threw the exception of "Sys.WebForms.PageRequestManagerServerErrorException: Cannot have multiple items selected".

   If you have seen this before, can you please help? Thank you.

Veselin Tsvetanov
Telerik team
 answered on 24 Oct 2016
1 answer
110 views

Hello-

    I have a radGrid which i'd like to append a csv to the rows in the radGrid. How would I go about doing this? I have an upload function in my code but when it run it replaces all data in grid with data from the chosen CSV.

 

ASPX.VB

Imports System.Data
Imports Telerik.Web.UI
Imports System.IO
Imports System.Data.SqlClient
Imports System.Configuration

Partial Class JPTest
    Inherits System.Web.UI.Page

    Sub Page_Load(ByVal Sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
            LoadAtrributeDropDown()
        End If
    End Sub
    Private Sub LoadAtrributeDropDown()
        'AttributeTypeBox.DataSource = GetDataTable("SELECT TOP 10000 lkct.CategoryLabel, lkct.CategoryID  FROM dbo.LkupCategories lkct ORDER BY lkct.CategoryLabel")

        Dim ConnString As [String] = ConfigurationManager.ConnectionStrings("eCommerceClassification").ConnectionString
        Dim adapt As New SqlDataAdapter()
        Dim CategoryDataTable As New DataTable()
        Using conn As New SqlConnection(ConnString)

            adapt.SelectCommand = New SqlCommand("SELECT TOP 10000 lkct.CategoryLabel, lkct.CategoryID  FROM dbo.LkupCategories lkct ORDER BY lkct.CategoryLabel", conn)
            adapt.Fill(CategoryDataTable)
        End Using
        AttributeTypeBox.DataTextField = "CategoryLabel"
        AttributeTypeBox.DataValueField = "CategoryID"
        AttributeTypeBox.DataSource = CategoryDataTable
        AttributeTypeBox.DataBind()

        AttributeTypeBox.Items.Insert(0, "----SELECT----")

    End Sub


    'Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles ReceiptGrid.NeedDataSource

    'End Sub

    Public Function GetDataTable(ByVal query As String) As DataTable
        Dim ConnString As [String] = ConfigurationManager.ConnectionStrings("eCommerceClassification").ConnectionString
        Dim adapter As New SqlDataAdapter()
        Dim myDataTable As New DataTable()
        Using conn As New SqlConnection(ConnString)
            adapter.SelectCommand = New SqlCommand(query, conn)
            adapter.Fill(myDataTable)
        End Using
        Return myDataTable
    End Function
   
    Protected Sub AttributeTypeBox_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs)
        ReceiptGrid.DataSource = GetDataTable("SELECT TOP 5000 ah.CategoryID, lkct.CategoryLabel, lka.AttributeLabel, lkat.AttributeTypeLabel FROM dbo.AttributeHierarchy ah INNER JOIN dbo.LkupCategories lkct WITH (NOLOCK) ON ah.CategoryID = lkct.CategoryID INNER JOIN dbo.LkupAttributes lka WITH (NOLOCK) ON ah.AttributeTypeID = lka.AttributeTypeID INNER JOIN dbo.LkupAttributeTypes lkat WITH (NOLOCK) ON lkat.AttributeTypeID = ah.AttributeTypeID WHERE lkct.CategoryID = '" & AttributeTypeBox.SelectedItem.Value & "' ORDER BY ah.DateActivated DESC")
        ReceiptGrid.DataBind()
    End Sub

    Public Function Upload(sender As Object, e As EventArgs) As DataTable
        'Upload and Import TabDelimited CSV
        Dim csvPath As String = Server.MapPath("~/File") + Path.GetFileName(FileUpload1.PostedFile.FileName)
        FileUpload1.SaveAs(csvPath)

        Dim dt As New DataTable()
        dt.Columns.AddRange(New DataColumn(3) {New DataColumn("CategoryID", GetType(String)), New DataColumn("CategoryLabel", GetType(String)), New DataColumn("AttributeLabel", GetType(String)), New DataColumn("AttributeTypeLabel", GetType(String))})

        Dim csvData As String = File.ReadAllText(csvPath)
        For Each row As String In csvData.Split(Environment.NewLine) 'How to split csv?'
            If Not String.IsNullOrEmpty(row) Then
                dt.Rows.Add()
                Dim i As Integer = 0
                For Each cell As String In row.Split(","c)
                    dt.Rows(dt.Rows.Count - 1)(i) = cell
                    i += 1
                Next
            End If
        Next
        ReceiptGrid.DataSource = dt
        ReceiptGrid.DataBind()
    End Function
End Class

 

 

 

 

Marin Bratanov
Telerik team
 answered on 24 Oct 2016
1 answer
79 views

Hi,

Have created a RadWindow and gave the property autosize=true, it works fine IE with correct height and width based on the contents, but in Chrome width and height are not according to content.

Marin Bratanov
Telerik team
 answered on 24 Oct 2016
1 answer
170 views

Is it possible to have another wizard (child wizard) within one of the wizard steps?  I have tried, it seems doe not work... The Next button for the nested wizard acts like the parent wizard next button.  Any one has any idea if this can be done ?

 

Thanks!

Bozhidar
Telerik team
 answered on 24 Oct 2016
3 answers
199 views

We have controls within a RadPageLayout control that we would like to add into RadAjaxManager individually but the UI in VS does not show any of the controls within the RadPageLayout control.

So the only option seems to be a full refresh of the whole RadPageLayout control. Is there any way to manage the controls within the RadPageLayout at all?

Konstantin Dikov
Telerik team
 answered on 24 Oct 2016
3 answers
522 views

Hi,

In my grid i need to set enable= false for GridEditCommandColumn,GridButtonColumn's.Here is my source code:

<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditButton"
                                 HeaderStyle-HorizontalAlign="Left" HeaderText="Edit" 
                                 ItemStyle-HorizontalAlign="Left">
                                 <HeaderStyle HorizontalAlign="Left" />
                                 <ItemStyle HorizontalAlign="Left" />
                             </telerik:GridEditCommandColumn>
  
                             <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" UniqueName="DeleteButton"
                                 ConfirmDialogHeight="100px" ConfirmDialogType="RadWindow" HeaderText="Delete"
                                 ConfirmDialogWidth="220px" 
                                 ConfirmText="Are you sure you want to delete this Indent Item?" ConfirmTitle="Delete" 
                                 HeaderStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="NotSet" 
                                 ItemStyle-HorizontalAlign="Left">
                                 <HeaderStyle HorizontalAlign="Left" />
                                 <ItemStyle HorizontalAlign="Left" />
                             </telerik:GridButtonColumn>

I am using below code under PreRender event for the above requirement as below:
protected void gvItems_PreRender(object sender, EventArgs e)
   {
       foreach (GridDataItem item in gvItems.MasterTableView.GetItems(GridItemType.Item))
                {
                   ImageButton btn1 = (ImageButton)item.FindControl("EditButton");//accessing the Button by its name
                   btn1.Enabled = false;                    
                }
   }

Even though it's not working...

Can any one help me...

Thanks in advance...
Anto
Top achievements
Rank 1
 answered on 22 Oct 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?