Jump to content

Problem with Grid refreshing .. please help !


Recommended Posts

Hi everybody ! ..


I'm making my first 'application' using Delphi+UniGUI, at first it seems impressive ! .. so, once again, congratulations Farshad !


Now I have a problem. I put some simple 'fast search' functionality, simply letting the user type some text, then when he press <enter> or some button .. begin the search the 'usual' way:


with Table do



while not Eof and UpperCase(LeftStr(FieldByName('description').AsString),Length(Search.Text)))<>UpperCase(Search.Text)) do





This under these conditions: Grid.FetchAll=True, Grid.Paged=False.


The row selected in the Grid ('Web version') corrresponds to the actual row in Table .. BUT if this new selected row was not in the 'current' page, the Grid doesn't refresh' the page, forcing the user to manually scroll to that page (where the row is actually selected)


I look over the forum to find some answer to this .. but I only found 'have you tried Grid.refresh ?' .. yes I have.


Okey, thanks a lot, everybody !



Link to comment
Share on other sites

Well .. :-)


I finally found this:




The point here is that Grid.getView().focusRow(n), force a page refresh, allowing to see the actual selected row in the grid.


It's becoming more clear for me that some understanding of ExtJs is not just a 'plus' but some kind of need.


Thank's everybody.

Link to comment
Share on other sites

  • 2 months later...

I tried this by putting this code on uniedit onchnage. On webmode it says that MainForm or Grid doesnot exists.


Where should i use your code.




Here 'MainForm' or .. 'Grid' are just the names of components as you named it in plain Delphi, but it seems that ExtJS take exactly those names to operate over it's ExtJS counterpart.


Put it simply, use the names you use in Delphi ('Form' or 'MyForm' or whatever)





Link to comment
Share on other sites

  • 11 months later...
Hi Paulo Monteiro.
If I understand the question, try this:


... uses UniGUIApplication ...
Just use the property JSName




  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...