Jump to content

Recommended Posts

Posted

How could I give a specific column.picklist by row ?

Other question : how to disable a cell of unidbgrid on runtime?

 

procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol,
  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
  if ACol = 1 then
  begin
    Attribs.Style.Cls:= 'myShadowStyle';// style is defined in file "files/mycss.css" ;
  end
  else if ACol = 2 then
  begin
    Attribs.Style.Padding := '0px';    // force image to fit in the cell
  end
  else if ACol = 3 then
  begin
    column.PickList.Clear;
    if Arow = 1 then
    begin
      column.PickList.Add('1');
      column.PickList.Add('2');
    end
    else if Arow = 2 then
    begin
      column.PickList.Add('3');
      column.PickList.Add('4');
    end;
  end
end;

 

Thanks very much for your response.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...