Solved

posting the flexigrid data

Posted on 2008-06-17
8
300 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
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

739 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