title: How Add pickup list to DBGrid at run time?
body: <p>i have a DBGrid and it is linked to client dataset when i assign a SQLQuery at run time
  the DBGrid automatically assigns no of column. What i need is when DBGrid automatically assign columns i need to set one of those columns to assign a picklist.
  can anyone help me?
  the following procedure calls in the forms on show event. the form contains DataSource, ClientDataSet, SQLViewQuery (TSQLQuery), DatasetProvider and DBGridDetails (TDBGrid).</p>
  
  <pre><code>procedure TViewDetailsForm.ViewPendingAndReturnCheques;
  var I : Integer;
  slPickList:TStringList;
  begin
    slPickList := TStringList.Create;
    slPickList.Add('Pending');
    slPickList.Add('Returned');
    slPickList.Add('Passed');
  
    SQL := 'SELECT a.CHEQUE_NO, a.BANK, a.CHEQUE_DATE, a.AMOUNT,a.STATUS FROM CHEQUES a';
  
    //refreshisng the DBGrid
    SQLViewQuery.SQL.Clear;
    SQLViewQuery.SQL.Add(SQL);
    ClientDataSet.Active := false;
    ClientDataSet.Active := true;
  
    DBGridDetails.Columns[0].Width := _Block;
    DBGridDetails.Columns[1].Width := _Block;
    DBGridDetails.Columns[2].Width := _Block;
    DBGridDetails.Columns[3].Width := _Block;
    DBGridDetails.Columns[4].Width := _Block;
  
  
    for I := 0 to DBGridDetails.Columns.Count - 1 do
    begin
      if DBGridDetails.Columns[I].FieldName = 'STATUS' then
      begin
         DBGridDetails.Columns[i].ButtonStyle := cbsAuto;
         DBGridDetails.Columns[I].PickList := slPickList;
      end;
    end;
  
    Show;
  
  end;
  </code></pre>