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

SelectedItem(S)

1 Answer 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rieni De Rijke
Top achievements
Rank 1
Rieni De Rijke asked on 19 Apr 2010, 10:57 AM
We have a testmethod.
We create a new RadViewGrid and add a customer:

        [TestMethod]
        public void OnEditExecuted_OpenDialogOK()
        {
            ViewMock.SetupProperty(v => v.Grid, new RadGridView());

            ViewMock.Object.Grid.Items.Add(_customer[0]);
            ViewMock.Object.Grid.SelectedItem = ViewMock.Object.Grid.Items[0];

At this moment, the SelectedItem is a customer. So, that's OK.
But..., the SelectedItemS.Count = 0 !

How is this possible?

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 21 Apr 2010, 03:44 PM
Hi Rieni De Rijke,

Currently unbound mode is not supported but we are working on this feature and we hope to introduce it in the near future. For the time being you will have to bind the grid using its ItemsSource property. For example:

1.ViewMock.Object.Grid.ItemsSource = _customer;


Best wishes,
Milan
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
Rieni De Rijke
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or