I'm developing custom SimpleListViewVisualItem for RadListView. It should contain a list of business items and it should be displayed on RadListView in IconView mode. Business items must be displayed on RadGridView.
public class CustomVisualItem : SimpleListViewVisualItem
{
RadGridView gwBusinessItems;
BindingSource bsBusinessItems;
List<BO> _list = new List<BO>();
...
public CustomVisualItem()
{
bsBusinessItems.DataSource = _list;
gwBusinessItems.DataSource = bsBusinessItems;
}
...
public void InitializeControls()
{
gwBusinessItems = new RadGridView();
gwBusinessItems.Dock = DockStyle.Fill;
gwBusinessItems.DataSource = bsBusinessItems;
...
Children.Add(gwBusinessItems.GridViewElement);
}
...
public void AddBO(BO bo)
{
_list.Add(bo);
bsBusinessItems.ResetBindings(false);
}
}
When i add a business object and update RadGridView by bsBusinessItems.ResetBindings, new record appears on the RadGridView, but i'm unable to select any record on the RadGridView and when i click on the grid, GotFocus event isn't fired. Looks like i can't set focus to the grid due to it is on the CustomVisualItem.
gwBusinessItems.Focusable = true doesn't work.
What should i do to make RadGridView focusable?
public class CustomVisualItem : SimpleListViewVisualItem
{
RadGridView gwBusinessItems;
BindingSource bsBusinessItems;
List<BO> _list = new List<BO>();
...
public CustomVisualItem()
{
bsBusinessItems.DataSource = _list;
gwBusinessItems.DataSource = bsBusinessItems;
}
...
public void InitializeControls()
{
gwBusinessItems = new RadGridView();
gwBusinessItems.Dock = DockStyle.Fill;
gwBusinessItems.DataSource = bsBusinessItems;
...
Children.Add(gwBusinessItems.GridViewElement);
}
...
public void AddBO(BO bo)
{
_list.Add(bo);
bsBusinessItems.ResetBindings(false);
}
}
When i add a business object and update RadGridView by bsBusinessItems.ResetBindings, new record appears on the RadGridView, but i'm unable to select any record on the RadGridView and when i click on the grid, GotFocus event isn't fired. Looks like i can't set focus to the grid due to it is on the CustomVisualItem.
gwBusinessItems.Focusable = true doesn't work.
What should i do to make RadGridView focusable?