I suggest you ...

Multiselection of grid items

The main idea is easy:
- DataGrid Layout Item must have 'AllowMultiselect' property or something like this;
- ScreenObject must provide 'SelectedItems' property to get access to collection of selected item from code.

By the way, here is my temporary solution to solve this problem:
public partial class SearchCustomers
{
private DataGrid grid;

partial void SearchCustomers_Created()
{
// Write your code here.
var dgControl = this.FindControl("grid");
dgControl.ControlAvailable += new EventHandler<ControlAvailableEventArgs>(dgControl_ControlAvailable);
}

void dgControl_ControlAvailable(object sender, ControlAvailableEventArgs e)
{
grid = e.Control as DataGrid;
if (grid != null)
{
grid.SelectionMode = DataGridSelectionMode.Extended;
grid.SelectionChanged += new SelectionChangedEventHandler(grid_SelectionChanged);
}
}

void grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.SelectedCount = grid.SelectedItems.Count;
}
}

You need to override <Screen>_Created() method to get DataGrid object and then access to it for you needs. Don't forget that you must also override Delete method to delete all selected items in grid not just first selected.

65 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    DmitryDmitry shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base