- Code: Select all
col := gridCreaLotti.JQGridOptions.ColModel.Add;
col.Formatter := gcfControl;
col.FormatOptionsControl.ControlTemplate := IWRegionButton;
col.Idx := 'CustomColumn';
col.Name := 'Creazione lotto';
col.OnUpdateControl := TIWCGJQGridOptionsColModelUpdateControl;
col.Caption := 'Creazione lotto';
col.Sortable := false;
- Code: Select all
procedure TframeLotto.TIWCGJQGridOptionsColModelUpdateControl(Sender: TObject; ACol: TIWCGJQGridCol;
const ARowId, ACellValue: string);
begin
btnCreaLotoGrid.Tag := gridCreaLotti.RowIndexForRowId[ARowId];
if (Pos('SCART', UpperCase(gridCreaLotti.JQGridProviderCells.Cell[0, gridCreaLotti.RowIndexForRowId[ARowId]].Value)
) > 0) then
btnCreaLotoGrid.Tag := 999;
end;
and the result is this
There is a way to hide/show the button if the value of the first cell on the same row is "Scarto"?
Hope someone can help me