Solved

posting the flexigrid data

Posted on 2008-06-17
8
297 Views
Last Modified: 2010-04-21
Hello Experts,
By default I am showing 11 records in the Flexigrid, all I am trying now is to allow users to chose the records they want from the flexigrid and post to the export_list.asp page to export the data to their email.

The problem I am having now is when the user picks up some existing list from the drop down which will hide the existing Flexigrid data and show the detail of recently selected in the another Flexigrid.

Now, If I select the checkAll button on the current Flexigrit it is also picking the records of the existing Flexigrid before posting.

Is there anyway I can make the checkAll function to tick the checkboxes available on the current Flexigrid only. Please advice.

Hope you understand the problem here?

Thanks for your help



0
Comment
Question by:newbie27
  • 5
  • 2
8 Comments
 
LVL 22

Expert Comment

by:neeraj523
ID: 21802485
Well.. not sure but you can edit CheckAll function and only check those which are visible ie style property is visible or skip which are hidden
0
 
LVL 8

Author Comment

by:newbie27
ID: 21802610
Oh okay that makes sense.
I am using attached function which actually checks for each checkbox which has a class name "chkRefNos" and make it checked.

how would I do If I want to avoid those which are with in a hidden DIV - > "defaultResults"

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

please advice
thanks

function checkAll(chkd)

{

$(".chkRefNos").each(function(){

                this.checked = chkd;

            });

}

  

Open in new window

0
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 21804577
If you want to "Check All" in listDisplay1 use:
function checkAll(chkd)
{
      $("#listDisplay1 > tbody > tr > td > div > input.chkRefNos").each(function(){
                this.checked = chkd;
            });
}

If you want to do so in listDisplay, then use:
function checkAll(chkd)
{
      $("#listDisplay > tbody > tr > td > div > input.chkRefNos").each(function(){
                this.checked = chkd;
            });
}
0
 
LVL 8

Author Comment

by:newbie27
ID: 21804732
Thanks Hielo,
Can I use something like this in the function?

if(listID=="#listDisplay"){
               var chkEvent = '<input type="checkbox" name="chkAll" onclick="checkAllDefault(this.checked)"/> All';
            }else{
               var chkEvent = '<input type="checkbox" name="chkAll" onclick="checkAllDynamic(this.checked)"/> All';
            }

this is not displaying the checkbox on the Flexigrid column...
function listViewer(listID, param1)

{      

		if(listID=="#listDisplay"){

		   var chkEvent = '<input type="checkbox" name="chkAll" onclick="checkAllDefault(this.checked)"/> All';

		}else{

		   var chkEvent = '<input type="checkbox" name="chkAll" onclick="checkAllDynamic(this.checked)"/> All';

		}

       

     	$(listID).flexigrid

		({

        		url: 'list_proxy.asp?a=results',       

        		colModel : [                    

                  //      	{display: ' ', name : 'chkDelete', width : 30, sortable : false, align: 'left'},

					//{display: chkEvent, width : 30},

                        	{display: 'Notes', name : 'notes', width : 50, sortable : false, align: 'left'},

           			{display: 'Contact    ', name : 'pe_rev_name', width : 150, sortable : true, align: 'left'},

                    	{display: 'Compnay Name  ', name : 'co_name', width : 200, sortable : true, align: 'left'},   

                    	{display: 'Flag  ', name : 'action_flag', width : 150, sortable : true, align: 'left'},

                    	{display: 'Group  ', name : 'co_group', width : 200, sortable : true, align: 'left'}                 

        			],

        		buttons : [                             

                         {name: 'Delete', bclass: 'delete', onpress : test},

					//	{name: 'Select All', bclass: 'add', onpress : test},

					//{name: 'DeSelect All', bclass: 'delete', onpress : test}

                                

                  	],                                      

        		sortname: '',

        		sortorder: 'asc',

        		usepager: false,

        		title: 'List Manager - ' + $("#drpLists").val(),

        		useRp: true,

        		rp: 1000,

        		query : param1+'&Fields=ref_no,notes,pe_rev_name,co_name,action_flag,co_group',         

        		showTableToggleBtn: true,                       

        		width: 760,

        		height: 350,

				onSuccess:function()

	   			{

                		$(".edit_area").editable( 

						function(value, settings) { return(value); }, 

                			{     

							submit    : "OK",

							indicator : "process..........",

							tooltip   : "Click to edit...",

							style  : "inherit" 

                			}

					);

				}

        		

        	});

 

}

 

Open in new window

0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 82

Expert Comment

by:hielo
ID: 21804761
I don't understand your last question, but that is unrelated to what you asked here. You needed the path to select only the checked items and that's what you got for both flexigrid displays.
0
 
LVL 8

Author Closing Comment

by:newbie27
ID: 31467928
thanks
0
 
LVL 8

Author Comment

by:newbie27
ID: 21804885
0
 
LVL 8

Author Comment

by:newbie27
ID: 21804894
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now