Fórum Duvidas StringGrid #559042
07/07/2016
0
Alguém pode me ajudar com isso:
1) Retornar no Edit o valor da célula selecionada;
2) Organizar em ordem crescente o StringGrid;
3) Calcular a moda.
Se alguém puder me ajudar eu aradeço
João Natividade
Curtir tópico
+ 0Post mais votado
08/07/2016
No evento OnSelectedCell do Stringgrid:
Edit1.Text:= StringGrid1.Cells[ACol, ARow];
2) Organizar em ordem crescente o StringGrid;
http://fabiomassalino.blogspot.com.br/2007/12/dica-delphi-ordenando-stringgrid.html
Natanael Ferreira
Gostei + 1
Mais Posts
07/07/2016
Jordan Bernardes
É uma aplicação mobile, estas utilizando banco de dados? Se estiver qual?
Se for uma versão XE você pode ligar esses componentes com o LiveBindings Designer.
Gostei + 0
08/07/2016
João Natividade
procedure TfrmMedia.btnEntrarClick(Sender: TObject);
var
num: Real;
Cont_Coluna: Cardinal;
begin
if (btnIncluir.Enabled = False) then
begin
if (edtVlr.Text <> '') then
begin
begin
num := StrToFloat(edtVlr.Text);
with StringGrid1 do
begin
Cont_Coluna := Row;
Cells[0, Cont_Coluna] := IntToStr(Cont_Coluna);
Cells[1, Cont_Coluna] := FloatToStr(num);
RowCount := RowCount+1;
Row := RowCount -1;
end;
edtVlr.SetFocus;
end;
end
else
edtVlr.SetFocus;
end;
end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)