Click here to Skip to main content
15,918,330 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Dropdown control doesn't always populate Pin
Bernhard Hiller4-Mar-14 2:28
Bernhard Hiller4-Mar-14 2:28 
GeneralRe: Dropdown control doesn't always populate Pin
#realJSOP4-Mar-14 3:43
professional#realJSOP4-Mar-14 3:43 
GeneralRe: Dropdown control doesn't always populate Pin
Bernhard Hiller4-Mar-14 22:11
Bernhard Hiller4-Mar-14 22:11 
QuestionASP.net - Webforms - Dynamic controls Pin
tinaclement2-Mar-14 20:56
tinaclement2-Mar-14 20:56 
AnswerRe: ASP.net - Webforms - Dynamic controls Pin
Richard MacCutchan2-Mar-14 22:58
mveRichard MacCutchan2-Mar-14 22:58 
QuestionWindow.open Pin
Zeyad Jalil1-Mar-14 20:15
professionalZeyad Jalil1-Mar-14 20:15 
AnswerRe: Window.open Pin
Kornfeld Eliyahu Peter1-Mar-14 20:43
professionalKornfeld Eliyahu Peter1-Mar-14 20:43 
AnswerRe: Window.open Pin
jkirkerx2-Mar-14 9:19
professionaljkirkerx2-Mar-14 9:19 
QuestionPREVIEW ASP.NET PAGE ON A WEB BROWSER Pin
Member 106347491-Mar-14 0:15
Member 106347491-Mar-14 0:15 
SuggestionRe: PREVIEW ASP.NET PAGE ON A WEB BROWSER Pin
Richard Deeming3-Mar-14 0:50
mveRichard Deeming3-Mar-14 0:50 
QuestionMVC4 - WebMatrix.WebData.SimpleMembershipProvider vs System.Web.Security.MembershipProvider Pin
Swab.Jat27-Feb-14 17:17
Swab.Jat27-Feb-14 17:17 
QuestionWCF error, System.ServiceModel.CommunicationException the maximum message size quota for incoming messages has been exceeded Pin
littleGreenDude27-Feb-14 4:24
littleGreenDude27-Feb-14 4:24 
QuestionJQuery to get sum of testboxes values of each row in Repeater Control Pin
indian14326-Feb-14 11:30
indian14326-Feb-14 11:30 
AnswerRe: JQuery to get sum of testboxes values of each row in Repeater Control Pin
Ahmed Bensaid26-Feb-14 23:06
professionalAhmed Bensaid26-Feb-14 23:06 
GeneralRe: JQuery to get sum of testboxes values of each row in Repeater Control Pin
indian14327-Feb-14 5:50
indian14327-Feb-14 5:50 
QuestionClient side pagination is not working in jqGrid Pin
manishchourasia200026-Feb-14 1:16
professionalmanishchourasia200026-Feb-14 1:16 
Hi Friends,
I am new user for jQuery and jqGrid. I am trying to implement jqGrid with client side pagination. It is not working at my end. I am using .net 4.0 web service to get json respons.

This is my web service code
C#
public string GetMessage(string FDate,string TDate,string Status)
        {
  databaseDataContext dc = new databaseDataContext();
            var v = (from v1 in dc.WBS_MESSAGEs
                     where v1.TransStatus ==  Status && v1.CreatedDate >= fromDate
                     && v1.CreatedDate <= toDate
                     select new
                     {
                         v1.MessageID,
                         v1.Task,
                         v1.Remark,
                         v1.CreatedDate,
                         Object = (v1.ObjectID == "2" ? "Business Partner" :
                             v1.ObjectID == "30" ? "Journals" : "Unknown")
                     });
            if (v.Count() > 0)
            {

                System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer();
                return js.Serialize(v.ToList());
            }
            else
            {
                return null;
            }
    }


This is my JavaScript / jqGrid code

C#
function callMessage(p0, p1,p2,ctrlName) {
                $.ajax({
                    type: "POST",
                    url: "SAPBOne.asmx/GetMessage",
                    data: '{ "FDate":"' + p0 + '" ,"TDate":"' + p1 + '","Status":"' + p2 + '"}',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    error: function (data) {
                        alert(data.statusText);
                    },

                    success: function (data) {
                        var thegrid = jQuery(ctrlName)[0];
                        thegrid.addJSONData(JSON.parse(data.d));
                        // var jSonMessage = JSON.parse(data.d); // data.d is a JSON formatted string, to turn it into a JSON object
                        // we use JSON.parse
                        // now that myData is a JSON object we can access its properties like normal
                    }
                });
            };

      $(window).load(function () {
                var qString = get_query();
                //Get Success Messages
                jQuery("#jsonmap").jqGrid({
                    url: callMessage(qString.p0, qString.p1,'Success','#jsonmap'),
                    datatype: 'json',
                    colNames: ['Message ID', 'Object', 'Task', "CreatedDate", 'Remark'],
                    ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
                    colModel: [
                                    { name: 'MessageID', index: 'MessageID asc', sortable: true, align: "center", width: 55 },
                                    { name: 'Object', index: 'Object', width: 120, jsonmap: "Object" },
                                    { name: 'Task', index: 'Task', width: 80, jsonmap: "Task", align: "center" },
                                    { name: 'CreatedDate', index: 'CreatedDate', jsonmap: "CreatedDate", align: "center", formatter: 'date', formatoptions: { srcformat: 'yyyyMMdd', newformat: 'd-M-y @ H:i:s' }, width: 140 },
                                    { name: 'Remark', index: 'Remark', width: 300, jsonmap: "Remark" }
                                ],
                    serializeGridData: function (postData) {
                        return JSON.stringify(postData);
                    },
                    loadtext: "Loading...",
                    rowNum:5,
                    rowList: [5, 10],
                    pager: '#pjmap',
                    sortname: 'MessageID',
                    sortorder: "desc",
                    viewrecords: true,
                    gridview: true,
                    loadonce:true,
                    sortorder: "desc",
                    sortname: 'MessageID',
                    caption: "Success",
                    pgbuttons: true,
                    height: 'auto',
                    refreshtext:'Refresh',
                    repeatitems: true,
                    emptyrecords: "No records to view"
                });
                jQuery("#jsonmap").jqGrid('navGrid', '#pjmap', { edit: false, add: false, del: false  });



I am stuck here.

Your help will be highly applicable.
s

AnswerRe: Client side pagination is not working in jqGrid Pin
Ahmed Bensaid26-Feb-14 2:33
professionalAhmed Bensaid26-Feb-14 2:33 
QuestionASP.NET Data Grid and Data List Click Event Pin
sivagiri126-Feb-14 1:04
sivagiri126-Feb-14 1:04 
AnswerRe: ASP.NET Data Grid and Data List Click Event Pin
Ahmed Bensaid26-Feb-14 2:30
professionalAhmed Bensaid26-Feb-14 2:30 
GeneralRe: ASP.NET Data Grid and Data List Click Event Pin
sivagiri126-Feb-14 17:43
sivagiri126-Feb-14 17:43 
SuggestionRe: ASP.NET Data Grid and Data List Click Event Pin
Ahmed Bensaid26-Feb-14 21:39
professionalAhmed Bensaid26-Feb-14 21:39 
Questionpassing value betwen pages Pin
tarzn24-Feb-14 5:47
tarzn24-Feb-14 5:47 
AnswerRe: passing value betwen pages Pin
Richard Deeming24-Feb-14 9:04
mveRichard Deeming24-Feb-14 9:04 
Questioncrystal report Pin
Member 1062089124-Feb-14 1:10
Member 1062089124-Feb-14 1:10 
AnswerRe: crystal report Pin
thatraja24-Feb-14 4:06
professionalthatraja24-Feb-14 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.