Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
1.I have one grid having 100 records and it is in updatepanel.
2.I have implimented search using jquery.
3. when i found that record after search then i when i go for for editing all the records are comming.
4. what i want is to have only that record to display for updating.

here is my code

C#
$(document).ready(function () {
          GridFilter();
      });
      function pageLoad(sender, args) {
          if (args.get_isPartialLoad()) {
              GridFilter();
          }
      }

      function GridFilter() {

          $('#ContentPlaceHolder1_gvTransactionType').GridviewFix().dataTable({
              "bPaginate": false,
              "sDom": 't<"clear">',
              "bSort": false
          })
          .columnFilter({ sPlaceHolder: "head:after",
              aoColumns: [{ type: "text" },
           { type: "text" },
           { type: "text"}]
          });
      }


5. i have use js to maitain the scroll position for this gridview
 var totalRows = $("#<%= gvTransactionType.ClientID %> tr").length;
           alert( totalRows );
var xPos, yPos;
           var prm = Sys.WebForms.PageRequestManager.getInstance();
           prm.add_beginRequest(BeginRequestHandler);
           prm.add_endRequest(EndRequestHandler);
           function BeginRequestHandler(sender, args) {
               //Get x and y position of scrollbar before partial postback
               xPos = $get('scrollDiv').scrollLeft;
               yPos = $get('scrollDiv').scrollTop;

           }
           function EndRequestHandler(sender, args) {
    //Set x and y position back to the scrollbar after partial postback
               $get('scrollDiv').scrollLeft = xPos;
               $get('scrollDiv').scrollTop = yPos;

           }

So any one can say how to handel this.

Thank You
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900