How to get data in dhtml grid by clicking the corresponding checkbox?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sruti panda
    New Member
    • Apr 2011
    • 4

    How to get data in dhtml grid by clicking the corresponding checkbox?

    In java script i have 5 check box having 5 different name,which contain corresponding values...if i check one box i will get corresponding value in a grid below,,if check 2 box then two will come,,,like wise...


    please help
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    what do you have so far? please show some code to work with.

    kind regards

    Comment

    • sruti panda
      New Member
      • Apr 2011
      • 4

      #3
      Code:
      var mygrid;
      	function doOnLoad() {
      
      		
      		 mygrid = new dhtmlXGridObject('mygrid_container');
      			
      		 mygrid.setImagePath("Resources/javascript/dhtmlxGrid/codebase/imgs/");
      		 mygrid.setSkin("dhx_skyblue");
      		 mygrid.setHeader(",<%=defaultmonth1%>,#cspan,#cspan,#cspan,#cspan,<%=defaultmonth2%>,#cspan,#cspan,#cspan,#cspan");
      		 mygrid.attachHeader("Asset, <%=tempNames.GetData_frm_Location(0,0)%>, <%=tempNames.GetData_frm_Location(1,0)%>, <%=tempNames.GetData_frm_Location(2,0)%>,<%=tempNames.GetData_frm_Location(3,0)%>,<%=tempNames.GetData_frm_Location(4,0)%>,<%=tempNames.GetData_frm_Location(0,0)%>,<%=tempNames.GetData_frm_Location(1,0)%>, <%=tempNames.GetData_frm_Location(2,0)%>,<%=tempNames.GetData_frm_Location(3,0)%>,<%=tempNames.GetData_frm_Location(4,0)%>");
      		 //mygrid.setIconPath("Resources/javascript/dhtmlxGrid/codebase/imgs/icons_books/");
      		 mygrid.setInitWidths("100,100,100,100,100,100,100,100,100,100,100");
      	
      			
      		 
      		    mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left");
      		    
      		    mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
      		   
      			 mygrid.attachEvent("onRowDblClicked", function(rId,cInd){});  
      		    
      		    mygrid.init();
      		    //this code enables paging and sets its skin;
      		   mygrid.enablePaging(true, 100, 10, "pagingArea", true, "infoArea");
      		  mygrid.setPagingSkin("bricks");
          		    mygrid.loadXML('<%=XMLPath%>');
          	       
          	   }
      Last edited by gits; Apr 11 '11, 07:11 AM. Reason: added code tags

      Comment

      • sruti panda
        New Member
        • Apr 2011
        • 4

        #4
        in the above code in grid all the temp names are coming on grid head....but i want which checkbox i'll click(those r presents in an another jsp)the corresponding tempname and is value(from database) will come on my grid according to date selected in the same previous jsp

        Comment

        Working...