Solved

posting the flexigrid data

Posted on 2008-06-17
8
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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
 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

622 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