实现colModel时,jqgrid在列中生成数据会消失

时间:2011-11-03 13:31:11

标签: jqgrid

当我实现一个colModel时,在我的tableToGrid调用中,单元格内的数据消失了吗?这是奇怪的行为。这就是我做的......

    jQuery(document).ready(function () {
    ShowMessage();
    tableToGrid("#table1", {
        cmTemplate: { sortable: false },
        height: '200',
        shrinkToFit: false,
        autowidth: true,
        colNames: ['Edit',
                   'MRN',
                   'Hospital Fin',
                   'First Name',
                   'Last Name',
                   'Date of birth',
                   'Completed Pathway',
                   'Completed Pathway Reason',
                   'PCP Appointment',
                   'Specialist Appointment',
                   'Admit Date',
                   'Discharge Date',
                   'Discharge Disposition',
                   'Discharge To',
                   'Discharge Advocate Call',
                   'Home HealthCare Accepted',
                   'Safe Landing Accepted',
                   'PCP Name',
                   'PCP Phone',
                   'PCP Appointment Location',
                   'Specialist Name',
                   'Specialist Phone',
                   'Specialist Appointment Location',
                   'Comments',
                   'Patient Room',
                   'Phone',
                   'Payor',
                   'MRN Type'
                   ],
        colModel: [{ name: 'Edit', width: 55 },
                   { name: 'MRN',  width: 55 },
                   { name: 'HospitalFin', width: 85 },
                   { name: 'FirstName',  width: 85 },
                   { name: 'LastName',  width: 85 },
                   { name: 'Dateofbirth',  width: 85 },
                   { name: 'CompletedPathway',  width: 145 },
                   { name: 'CompletedPathwayReason',  width: 165 },
                   { name: 'PCPAppointment',  width: 145 },
                   { name: 'SpecialistAppointment', width: 165 },
                   { name: 'AdmitDate', width: 55 },
                   { name: 'DischargeDate', width: 80 },
                   { name: 'DischargeDisposition', width: 180 },
                   { name: 'DischargeTo', width: 55 },
                   { name: 'DischargeAdvocateCall', width: 165 },
                   { name: 'HomeHealthCareAccepted', width: 165 },
                   { name: 'SafeLandingAccepted', width: 165 },
                   { name: 'PCPName', width: 55 },
                   { name: 'PCPPhone', width: 55 },
                   { name: 'PCPAppointmentLocation', width: 165 },
                   { name: 'SpecialistName', width: 185 },
                   { name: 'SpecialistPhone', width: 185 },
                   { name: 'SpecialistAppointmentLocation', width: 185 },
                   { name: 'Comments', width: 55 },
                   { name: 'PatientRoom', width: 85 },
                   { name: 'Phone', width: 85 },
                   { name: 'Payor', width: 85 },
                   { name: 'MRNType', width: 85 }
                   ]
    });

0 个答案:

没有答案