Rotina para manipulaçao de Grids

Você precisa estar logado para dar um feedback. Clique aqui para efetuar o login
Para efetuar o download você precisa estar logado. Clique aqui para efetuar o login
Confirmar voto
0
 (0)  (0)

Veja nesta dica uma rotina para excluir itens selecionados no Grid.

Veja nesta dica uma rotina para excluir itens selecionados no Grid.

procedure TForm1.ExcluirItensSelecionadosGrid(Grid : TDBGrid);                            
var  i          : integer;                                                                 
Begin                                                                                     
    with Grid, Grid.datasource.dataset do                                                 
    begin                                                                                 
        DisableControls;                                                                  
        for i:= 0 to SelectedList.Count-1 do                                              
        begin                                                                             
          GotoBookmark(SelectedList.items[i]);                                            
          Freebookmark(SelectedList.items[i]);                                            
          Delete;                                                                         
        end;                                                                              
        SelectedList.clear;                                                               
        EnableControls;                                                                   
    end;                                                                                  
end;                                                                                      
                                                                                          
                                                                                          
//O Grid deve está sempre com a Propriedade Multiselect = True;                           
//EX:  GridD.Options := GridD.Options + [dgMultiSelect];                                                                                                      

 
Você precisa estar logado para dar um feedback. Clique aqui para efetuar o login
Receba nossas novidades
Ficou com alguma dúvida?