This is a migrated thread and some comments may be shown as answers.

[Solved] Context menu doesnt display all values

1 Answer 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sonu
Top achievements
Rank 1
Sonu asked on 23 Oct 2010, 06:40 PM
Hi

In my telerik grid view I am displaying around 50K rows. When I click on the column context menu I does not get all the values. Is there any limitation in the context menu item display?

In the screen shot I have expanded context menu for column "Period 9". But as you can see it displays values till -25,547.64 (ordered  ascending) but I have have positive values as well, its not even displaying all negative values. Please see the screen shot


Thanks
Sonu


1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 25 Oct 2010, 09:08 AM
Hello Sonu,

For performance reasons we are loading the first 1000 items in the distinct values filter. If you need to show all the data you can subscribe to the DistinctValuesLoading event of the gridview and set the e.ItemsSource to whatever you want.
Here is an example:

public MainPage()
{
    InitializeComponent();
 
    this.testGrid.ItemsSource = MyData();
    this.testGrid.DistinctValuesLoading += new EventHandler<GridViewDistinctValuesLoadingEventArgs>(testGrid_DistinctValuesLoading);           
}
 
void testGrid_DistinctValuesLoading(object sender, GridViewDistinctValuesLoadingEventArgs e)
{
    if (e.Column.Header.ToString() == "Int32")
    {
        e.ItemsSource = this.MyData();
    }
}
 
List<int> MyData()
{
    return Enumerable.Range(0, 2000).ToList();
}

Hope this helps.

Kind regards,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Sonu
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or