1 (edited by AD1408 2017-05-13 10:43:12)

Topic: Clearing Rows

Selected customer focused then it displays customer inv and if invoice has any inv items via use of search buttons.


Issue I wanted solve when newly added customer selected without any invoice to display. Inv Items tGrid was displaying all inv items of all customers.


The following sorted on cell click (when browsing customers tGrid with mouse)

procedure tgMainCustCellClick2; 
begin
  if Form1.tgMainCustomersTrans.rowcount = 0 then
  begin
  Form1.tgMainCustomersTransItems.clearrows;
  end;
end;

However, when browsing customer records with keyboard up and down keys following didn't work?

procedure tgMainCustKeyUp2;
begin
  if Form1.tgMainCustomersTrans.rowcount = 0 then
  begin
  Form1.tgMainCustomersTransItems.clearrows;
  end;
end;

Please see the attached sample project

Post's attachments

Attachment icon Clearing Rows.zip 19.26 kb, 342 downloads since 2017-05-13 

Adam
God... please help me become the person my dog thinks I am.

Re: Clearing Rows

Still couldn't resolve clearing tGrid rows issue.
Perhaps I couldn't explain my issue clearly on my first post above. This time I try with the image below:


https://s28.postimg.org/gfct3fib1/zzzzz_Temp31.png

Adam
God... please help me become the person my dog thinks I am.

Re: Clearing Rows

Fixed.

Post's attachments

Attachment icon Clearing Rows Fixed.zip 598.07 kb, 375 downloads since 2017-05-19 

4 (edited by AD1408 2017-05-19 02:45:02)

Re: Clearing Rows

Hi EHW,


Thank you very much............
Truly appreciated.............

Adam
God... please help me become the person my dog thinks I am.