Yii widget-Gridview get sorting data

Hi Yii masters,

Firstly sorry because my bad english. :)

I have a basic questions maybe, but i cant solve it ^^’

So my problem is that, i have a perfectly working gridview what i can sorting perfectly.

I just want to find a way to get a value, what I type into the textbox, which i use in the gridview to sorting my query,

because i want export the sorted query, into the csv file.

One of the View file code what i use:


$this->widget(‘application.extensions.NPager.NGridView’, array(

'id' =&gt; 'usergorpu-grid',

'dataProvider' =&gt; &#036;model-&gt;search(),

'filter' =&gt; &#036;model,

'ajaxUrl' =&gt; &#036;this-&gt;ajaxUrl,

'cssFile' =&gt; Yii::app()-&gt;baseUrl . '/css/gridview/styles.css',

'template' =&gt; '{summary}{pagerlist}{pager}{items}{pager}',

'pagerlist' =&gt; array(

    '8' =&gt; '8',

    '10' =&gt; '10',

    '25' =&gt; '25',

    '50' =&gt; '50',

    '100' =&gt; '100',


'textItemsPerPage' =&gt; 'row page',

'columns' =&gt; array(



        'name' =&gt; 'searchgroup',

        'value' =&gt; '(is_object(&#036;data-&gt;group) ? &#036;data-&gt;group-&gt;name : &quot;&quot;)',



        'name' =&gt; 'searchworkername',

        'value' =&gt; '&#036;data-&gt;worker-&gt;name',







Thanks for your support ^^

(The picture what i attachment isnt from my program, i just add it, for a clarity. So i want the value what I type on the textbox - red circle.)

If you need this value client-side, grab it using javascript.

If you need this value server-side (after user typed text and submitted), you have this value in $_GET array.

Thank you, after i read your answer i start searching the good way and i found it

So thank you again ^^

You helped me lots

If we meet someday i own you one beer :)

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

****** /* Gridview code*/


function myFunction() {

var Name_tbv = document.getElementById(&quot;Name_tb&quot;).value;

var Email_tbv= document.getElementById(&quot;Email_tbv&quot;).value;

document.getElementById(&quot;check&quot;).innerHTML = Name_tbv +&quot;-&quot;+  Email_tbv;