• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

jQuery, flexigrid

Hello Expert,

Just a quick question on the way I am handing the Flexigrid data, I just have a thought to make the default flexigrid as a dynamic one, then we don't need two different IDs.

whether its a cookie list or list name from the <SELECT> we show in the same flexigrid, is this not possible?

as we are doing now for all the <SELECT> listnames...

<div id="defaultResults"><table id="listDisplay" style="display:none"></table></div>                        
<span id="dynamicResults"><table id="listDisplay1" style="display:none"></table></span>      

Please advice
Thanks
Sam
0
newbie27
Asked:
newbie27
  • 3
1 Solution
 
hieloCommented:
>> same flexigrid, is this not possible?
Of course. I don't know why you chose two different <table>. I thought you had some "plan" for it. To be able to "repopulate" the same <table> you would need to wrap it in some container element like a div:
<div id="flexicontainer"><table id="listDisplay></table></div>

 and whenever you want to populate it, before you attempt to make the flexigrid ajax call you would need to obliterate the contents of flexigridcontainer as follows:
$("#flexicontainer").html('<table id="listDisplay" style='display:none;'></table>');
0
 
newbie27Author Commented:
thanks
0
 
newbie27Author Commented:
Then I wont need

function checkAll(id )
{
      $( id +" > tbody > tr > td > div > input.chkRefNos").each(function(){
                this.checked = id;
            });
}

and

   ( listID=="#listDisplay") ? {display: '<input type="checkbox" name="chkAll" onclick="checkAll(&#39;#listDisplay&#39;)"/> All', width : 30} : {display: '<input type="checkbox" name="chkAll" onclick="checkAll(&#39;#listDisplay1&#39;)"/> All', width : 30},
                        

??

please advice
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_23492649.html

i have moved all the function to the list.js file Hielo
0
 
newbie27Author Commented:
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now