I have TIWDBAdvWebGrid (very nice grid by the way) on form. I added button column wich would be use to generate PDF from data in row where clicked.
So i used event:
procedure TIWFormMain.TIWDBAdvWebGridButtonClick(Sender: TObject;
RowIndex, ColumnIndex: Integer)
begin
WebApplication.ShowMessage(TIWDBAdvWebGridMeasList.CellValues[1,RowIndex]);
end;
if first (1) column is jus autoincremented ID, and in first page values are correct, but once i go next page and all after, click on button gives me incorrect values.
What to do?
Hi,
Yes, I noticed it as soon as i post. And i post it here that i found the solution, but the post is not here for some reason.
Thank you for reply
Another one!
Now i added check boxes column so i can select rows. If i select rows in different pages and move to random page and then run:
var I : Integer;
AI: string;
begin
for I := 0 to IWDBAdvWebGrid.RowTot - 1 do
begin
if IWDBAdvWebGrid.RowSelect then
AI:=IWDBAdvWebGrid.CellValues[1,I]
end;
AI is autoincremented value from table. But this piece of code works only if i am on page whare rows are selected. How to iterate throught grid to get all selected rows regardless of what is current page?
I have not been able to reproduce an issue with the sample code you provided.
Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Actually i found it better to get only what is visible on page. Like so:
for I := 0 to IWDBAdvWebGrid.RowCount do
begin
if IWDBAdvWebGrid.RowSelect[IWDBAdvWebGrid.RowOffset + I - 1] then
begin
...
end;
end;