Forum > Beginners
StringGrid Clear? (solved!!!)
Blaazen:
I still don't understand. You edited some *data* cells in design-time, than you rewrite them and you want to restore them?
jamie:
He just simply wants a fixed header on top that remains always and just be able to start the grid with no rows after the fixed header so he doesn't have to redefine them.
Basically a NEW feature but keeping the existing header definitions in tacked and no dead spaced cells.
Basically a DeleteRow loop.
That's my take on it.
dsiders:
--- Quote from: jamie on March 11, 2023, 11:25:16 pm ---Basically a NEW feature but keeping the existing header definitions in tacked and no dead spaced cells.
--- End quote ---
Why a new feature? Just use RowCount.
jamie:
--- Quote ---for c := spins downto 0 do begin
StringGrid1.DeleteRow(1);
StringGrid1.Refresh;
end;
--- End quote ---
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---For C := StringGrid1.RowCount-1 downto 1 Do DeleteRow(C);
dsiders:
--- Quote from: jamie on March 12, 2023, 01:15:56 am ---
--- Quote ---for c := spins downto 0 do begin
StringGrid1.DeleteRow(1);
StringGrid1.Refresh;
end;
--- End quote ---
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---For C := StringGrid1.RowCount-1 downto 1 Do DeleteRow(C);
--- End quote ---
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---StringGrid1.RowCount := StringGRid1.FixedRows;
Navigation
[0] Message Index
[#] Next page
[*] Previous page