TWebResponsiveGrid and selected items

Hi,

I can't find a method in TWebResponsiveGrid which is responsible for get items which are selected.
How can I do this?

Property ItemIndex gets/sets the selected item.

I have observation:

  1. When page is loaded at the first time
    itemindex = 0 (why, nothinhg is selected)
  2. When I select eg second item
    itemindex=1 it is ok
  3. when I unselect the item (now nothing is selected)
    itemindex=1 still (why)

In this way ... returned selected index is always -1

function TfrmMain.getIndexOfSelectedItem(
  grid: TWebResponsiveGrid): Integer;
var i:Integer;
begin
  Result:=-1;
  for i := 0 to grid.Items.Count-1 do
    begin
      if(grid.Items[i].Selected)then
        begin
          Result:=i;
          Break;
        end;
    end;
end;

Why?

item.Selected is used when Options.MultiSelect = true

Ok ... but what about this

I have observation:

  1. When page is loaded at the first time
    itemindex = 0 (why, nothinhg is selected)
  2. When I select eg second item
    itemindex=1 it is ok
  3. when I unselect the item (now nothing is selected)
    itemindex=1 still (why)

... how can I check which item is selected currently?

For the startup, set at designtime ItemIndex = -1.
Get & set the selected item with ItemIndex. Set to -1 to unselect.