Yii Framework Forum: new 2 Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

new 2 Yii yii2 grids

#1 User is offline   upperdeck 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 06-October 17

Posted 01 November 2017 - 11:57 AM

I am new to yii and trying to port some existing flash grids into a yii framework. Since I have some existing code I am trying to understand where to go to replicate what my flash grids do

1) I have a parent grid loaded from a search button click which by default loads a child grid based on data from the first parent row returned and then loads multiple tabs based on the first child row returned. Some of these tabs contain grids and some html table data

2) when my sql returns and fills the grids and tabs you can then filter the returned data without calling sql again as it filters the data in memory in real time.. so for example if you click in a desc filter it filters and loads the grids as each letter is typed. so the more you type the less rows are returned.

i found some parent child type examples and made so I would assume the first question is doable, but didnt find any examples the preloaded the grids , they all seemed to load after clicking a row.. not a bid deal i think?

for the second thing i havent searched properly or is it not something generally done in Yii? I really dont want to force a sql query and button click everytime i modify my filters as the query is quite complicated and is joining dozens of tables so it can run for awhile under certain criteria.

thoughts?
0

#2 User is offline   genyded 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 11-July 17

Posted 05 November 2017 - 10:47 AM

For the 2nd question, see the guide sections on data caching. If you know the data is fairly static (or even if it's not and you don't care), you can work off of filtering cached results which will bypass the db. http://www.yiiframew...hing-data.html. You can use the debugger to see whether or not the queries are being executing or not and when.
0

#3 User is offline   jkofsky 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 687
  • Joined: 17-May 10
  • Location:Pensacola, Florida

Posted 10 November 2017 - 02:32 PM

HTML5 I believe has a way to store data on the client, that you could then use for the filtering. Not sure how to do this, but it might something to look into.
Do, or do not. There is no 'try.' Jedi Master Yoda
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users