Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
134 views
Hi,
Why performance of rad grid goes down dramatically when it has to display more than 50 rows. Scroll bar gets stuck.
Please suggest solution to improve performance as this has been acritical issue for this project.

Also i had requirement of having "All" as PageSize ComboBox item to display all items at one time in grid. So i customized the "

PageSizeComboBox" as follows:

 Protected Sub grid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid.ItemCreated

        If TypeOf (e.Item) Is GridPagerItem Then
            Dim pageBoundItem As GridPagerItem = DirectCast(e.Item, GridPagerItem)
            Dim PageSizeComboBox As RadComboBox = TryCast(pageBoundItem.FindControl("PageSizeComboBox"), RadComboBox)

            If PageSizeComboBox IsNot Nothing Then

        'Start **Page Size initialization
        Dim itemIndex As Integer = 0
        Dim minPageSize As Integer
        Dim maxPageSize As Integer
        Dim pageSizeStep As Integer
        Integer.TryParse(ConfigurationManager.AppSettings("MinPageSize").ToString(), minPageSize)
        Integer.TryParse(ConfigurationManager.AppSettings("MaxPageSize").ToString(), maxPageSize)
        Integer.TryParse(ConfigurationManager.AppSettings("PageSizeStep").ToString(), pageSizeStep)
        'End **Page Size initialization

        Dim ComboItem As RadComboBoxItem
        For iCount As Integer = minPageSize To maxPageSize Step pageSizeStep
            Dim newComboItem As RadComboBoxItem = PageSizeComboBox.Items.FindItemByValue(iCount)
            If newComboItem Is Nothing Then
                ComboItem = New RadComboBoxItem(iCount.ToString(), iCount.ToString())
                ComboItem.Attributes.Add("ownerTableViewId", gridClientId)
                PageSizeComboBox.Items.Insert(itemIndex, ComboItem)
            End If
            itemIndex += 1
        Next

        Dim newItem As RadComboBoxItem = PageSizeComboBox.Items.FindItemByValue(gridDataItemCount.ToString())
        If newItem Is Nothing Then
            ComboItem = New RadComboBoxItem("All", gridDataItemCount.ToString())
            ComboItem.Attributes.Add("ownerTableViewId", gridClientId)
            PageSizeComboBox.Items.Insert(PageSizeComboBox.Items.Count, ComboItem)
        Else
            newItem.Text = "All"
        End If

                AddHandler PageSizeComboBox.SelectedIndexChanged, AddressOf Me.PageSizeComboBox_SelectedIndexChanged
                PageSizeComboBox.AutoPostBack = True
            End If
          
        End If

    End Sub


Public Sub PageSizeComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)

        Dim intPageSize As Integer

        Integer.TryParse(e.Value, intPageSize)
        ViewState("intPageSize") = intPageSize.ToString()

        grid.PageSize = ViewState("intPageSize")
        grid.Rebind()

    End Sub



 Protected Sub grid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid.NeedDataSource
        If ViewState("gridData") IsNot Nothing Then
            grid.VirtualItemCount = CType(ViewState("gridData"), DataTable).Rows.Count
            grid.DataSource = CType(ViewState("gridData"), DataTable)
        Else
            grid.VirtualItemCount = 0
            grid.DataSource = Nothing
        End If
    End Sub
Abhishek
Top achievements
Rank 1
 answered on 22 Jun 2011
1 answer
36 views

Hi,

We have recently upgraded the latest telerik version (2011.1.413.40) and it seems we are having some issue. PagerTemplate is getting disappear and comes back when we change the pagesize. I am not sure why it is getting disappear for a short while, it doesn't happen in the older version (2010.2.826.35). I can able to see the same issue in demo page which is mentioned below.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/pagertemplate/defaultcs.aspx

Please could you let me know whether it is a bug or any code change required to fix this issue.

Thanks
Vasil
Telerik team
 answered on 22 Jun 2011
2 answers
173 views
Hi,

Is it possible to detect (or if there is an event that I am missing) the final OnRowSelected/OnRowDeselected?

I have a grid of 100 items and I am turning toolbar icons on/off depending if there are any items in the grid selected or not i.e. if one or more items selected then turn on the Delete/Move buttons, if not, disable the Delete/Move buttons.

As the events (OnRowSelected and/or OnRowDeselected) fire for each row selection change, I don't really want to call the enable/disable methods 100 times (if the user selects ALL rows) and again 100 times if they deselect all rows.

Is there an event that fires when the final select/deselect event fires so you can then process the actuall selected rows?

The work around I am using is to have a timer created on the OnRowSelected and in the OnRowDeselected - this timer has an interval of 50ms which when fires does the toolbar options. Each time the OnRowSelected/OnRowDeselected  events fire they cancel the timer and create a new timer. So, if there is no events fired for 50ms I am "assuming" the events have completed and therefore perform the toolbar methods.

But this seems a bit of a hack.

Anyone got any ideas?

Thanks,

Ro
Rohan
Top achievements
Rank 1
 answered on 22 Jun 2011
2 answers
157 views
Hi there, 

Where can I find the Javascript API for the treeview?

The following no longer works in the new telerik control:

Treeview.Nodes[0] 
TreeVies.AllNodes[0] 
TreeView.UnSelectAllNodes();


Thanks in Advance

K
Kevin Cauchi
Top achievements
Rank 1
 answered on 22 Jun 2011
1 answer
210 views
I am working with a RadGrid to which I have applied a custom skin.  I am experiencing an issue trying to create a continuous border when an edit form template is present.

<td colspan="10" style="vertical-align:top;">
    <div class="rgEditForm">
    </div>
</td

In the code above, created when the grid renders the edit template, I have access to the CSS for rgEditForm, but the div created is 2px shorter both width and height than the td.  Thus, applying a border to the right results in a border that is 1px inset from the rest of the grid.

My question is, can I change the style declaration that sits on the td?  If I could append something after the vertical-align declaration, it would solve my problem.  Is this possible?
Galin
Telerik team
 answered on 22 Jun 2011
1 answer
234 views
Instead of using SelectedValue and a predefined column as DataKeyName, how can I get the other selected values in the other columns like;

bHasChildren = IIf(RadGrid1.SelectedValues("HasChild").ToString() = "Y", True, False)

SelectedValues("HasChild") does not work here...
"HasChild" is another column and I would like to get the cell in the intersection of this column and the row, when one clicks the row.

Thanks,
Ervin
Princy
Top achievements
Rank 2
 answered on 22 Jun 2011
1 answer
109 views
Hi,

im using radDock Ajax control. I ve done the saving of radDock state in database. Now i want to store radDock custom settings in db, like page size of listing of particular radDock and time of interval for refreashing radDock. I want custom command (that is done). on clicking custom command an input page will open and user can select setting like page size 10, refreash interval 5 min. on pressing ok the setting for particulat radDock will save in db and on post backs AND REOPENING next time same setting will apply to them.

is there any wayto do so, or i can just do manually like create table for available docks, and save setting for each dock against userid. and save and reload it.

thanks
Dobromir
Telerik team
 answered on 22 Jun 2011
1 answer
94 views
All,

Forgive me for my ignorance here, but I have exhausted all other avenues. Hopefully someone can point me in the right direction.

I am trying to write jQuery that will allow me to access a RadMenu object from client-side and call the disable function on that object. The issue is, I'm writing the code to be generic. Given that, I'll only know the name of the containing <div>, not the actual RadMenu ID. Can this be accomplished, or am I barking up the wrong tree? Below is the code that I am currently attempting to use, but firebug shows an error of "$("[id$=" + target + "]").find('[id$="rmMenu"]').disable is not a function". The "target" is the string representing the div id before asp.net gets hold of it and prepends the id with the asp.net identifier string.

Thanks in advance...

$("[id$=" + target + "]").find('[id$="rmMenu"]').disable();
Plamen
Telerik team
 answered on 22 Jun 2011
1 answer
1.5K+ views
I have a RadComboBox embedded on the 'EditFormSettings - FormTemplate' When the user clicks the 'Edit' on the row of information in the data-grid, I would like the RadComboBox to select the existing 'State' that is already selected for the user.  I have text-boxes on the same location and I pre-set the values using:  Text='<%# Bind("strFirstName") %>'  How can I do the same thing for the RadComboBox?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2011
4 answers
65 views
The Image Manager load and load too long.
My current RadEditor using is:
 

I also using Fiddler to investigate:


I appreciate if you can help me this problem.
Hung
Top achievements
Rank 1
 answered on 22 Jun 2011
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?