jQWidgets Forums

jQuery UI Widgets Forums Grid Data Loading Problem

This topic contains 2 replies, has 2 voices, and was last updated by  ARoumani 11 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Data Loading Problem #45845

    ARoumani
    Participant

    I have problem in loading data to a grid
    if I put the grid and the scripts in a separated page it works correctly, can I get help

    @ModelType MvcApplication1.COMPANY

    @Code
    ViewData(“Title”) = “Edit”
    End code
    @Styles.Render(“~/Content/css”)

    @Section Scripts
    @Scripts.Render(“~/bundles/jqueryval”)

    <script type=”text/javascript” src=”scripts/jquery-1.8.2.min.js”></script>
    <script type=”text/javascript” src=”../../scripts/jquery-1.9.1.min.js”></script>
    <script type=”text/javascript” src=”../../../../jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.sort.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.filter.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsresize.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxpanel.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcheckbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsresize.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsreorder.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxnumberinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcalendar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdatetimeinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/globalization/jquery.global.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcombobox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxradiobutton.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.storage.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxwindow.js”></script>
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.summer.css” type=”text/css” />

    <script type=”text/javascript”>
    $(document).ready(function () {
    // prepare the data
    //var Paramsource =
    // {
    // datatype: “json”,
    // datafields: [
    // { name: ‘ID’ },
    // { name: ‘Desc1’ }
    // ],

    // url: ‘parameter/GetParameters(1)’
    // };

    //var dataAdapter1 = new $.jqx.dataAdapter(Paramsource);

    var source2 =
    {
    datatype: “json”,
    datafields: [
    { name: ‘RepCompID’, type: ‘Int’ },
    { name: ‘CompID_fk’, type: ‘Int’ },
    { name: ‘Manufacturer_name’, type: ‘String’ },
    { name: ‘RepType_para’, type: ‘Int’ },
    { name: ‘Active’, type: ‘Boolean’ },
    { name: ‘StartDate’, type: ‘Date’ },
    { name: ‘Enddate’, type: ‘Date’ },
    { name: ‘RepTypeDesc’, type: ‘String’ },
    ],
    url: ‘Company/GetCompaniesRep’
    // url: ‘Company/GetCompanies’
    };

    var dataAdapter2 = new $.jqx.dataAdapter(source2);

    // initialize jqxGrid

    $(“#grid1”).jqxGrid(
    {
    width: 900,
    source: dataAdapter2,
    autoheight: true,
    rtl: true,
    columns: [
    { text: “الرمز”, datafield: “RepCompID”, align: “Center”, cellsalign: “right” },
    // { text: “CompID_fk”, datafield: “CompID_fk”, align: “Center”, cellsalign: “right”, width: 200 },
    { text: “اسم الشركة المصنعة”, datafield: “Manufacturer_name”, align: “Center”, cellsalign: “right” },
    /* { text: “RepType_para”, datafield: “RepType_para”, align: “Center”, cellsalign: “right” , columntype: ‘dropdownlist’,
    createeditor: function (row, Column, editor) {
    editor.jqxDropDownList({ source: dataAdapter1, displayMember: ‘ID’, valueMember: ‘DESC1’ });
    }
    },*/
    { text: “نوع الوكالة”, datafield: “RepTypeDesc”, align: “Center”, cellsalign: “right”, },
    { text: “فعال”, datafield: “Active”, align: “Center”, cellsalign: “right”, columntype: ‘checkbox’ },
    { text: “من تاريخ”, datafield: “StartDate”, align: “Center”, cellsalign: “right” },
    { text: “الى تاريخ”, datafield: “Enddate”, align: “Center”, cellsalign: “right” },
    {
    text: ”, datafield: ‘Edit’, columntype: ‘button’, width: 50, cellsrenderer: function () {
    return “تعديل”;
    }, buttonclick: function (row) {
    editrowindex = row;
    var id = $(“#grid”).jqxGrid(‘getcellvalue’, row, “RepCompID”);
    window.location = ‘/Companyrep/Edit/?id=’ + id;
    }
    }
    ]
    });
    });

    </script>

    End Section

    @Using Html.BeginForm()
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(True)

    @<fieldset>
    <legend>COMPANY</legend>
    <p>
    <input type=”submit” value=”حفظ” />
    </p>
    <table style=”width:100%;”>
    <tr>
    <td width=”220″>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.COMPID, “الرمز″)
    </div>
    </td>
    <td>
    <div class=”editor-field” >
    @Html.TextBoxFor(Function(model) model.COMPID, New With {.style = “width:100px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.COMPID)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.NAME, “اسم الشركة”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.NAME, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.NAME)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.REGISTER, “رقم التسجيل في السجل التجاري”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.REGISTER, New With {.style = “width:100px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.REGISTER)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.EMPLOYEENBR, “عدد الموظفين”)
    </div>
    </td>
    <td>
    <div class=”editor-label”>
    @Html.TextBoxFor(Function(model) model.EMPLOYEENBR)
    @Html.ValidationMessageFor(Function(model) model.EMPLOYEENBR)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.Country, “البلد”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.DropDownListFor(Function(model) model.Country, New SelectList(MvcApplication1.ParameterController.GetCompParameters(8), “ID”, “DESC1”, Model.Country), New With {.class = “dropdown”})
    @Html.ValidationMessageFor(Function(model) model.Country)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.ADDRESS, “العنوان”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.ADDRESS, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.ADDRESS)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.PHONE, “الهاتف”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.PHONE, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.PHONE)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.FAX, “الفاكس″)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.FAX, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.FAX)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.EMAIL, “البريد الالكتروني”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.EMAIL, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.EMAIL)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.WebSite, “الموقع الالكتروني”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.WebSite, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.Website)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.RESPONSIBLE, “اسم المسؤول”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.RESPONSIBLE, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.RESPONSIBLE)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.RESPPOST, “وظيفته”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.RESPPOST, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.RESPPOST)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.IsImporter, “مستورد”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.CheckBoxFor(Function(model) model.IsImporter)
    @Html.ValidationMessageFor(Function(model) model.IsImporter)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.ManufacturerType, “مصنع″)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.DropDownListFor(Function(model) model.ManufacturerType, New SelectList(MvcApplication1.ParameterController.GetCompParameters(1), “ID”, “DESC1”, Model.ManufacturerType), New With {.style = “width:500px;border: 0px solid #787878;Color: #333;font-size: 1.2em;”})
    @Html.ValidationMessageFor(Function(model) model.ManufacturerType)
    </div>
    </td>
    </tr>

    </table>

    <p>
    <input type=”submit” value=”حفظ” />

    </p>

    </fieldset>
    End Using

    <div id=”grid1″></div>

    Data Loading Problem #45850

    Peter Stoev
    Keymaster

    Hi ARoumani,

    The problems which I noticed in the provided code are:

    1. The path to the jqxcore.js is different than the path to the other jQWidgets files. May be it is wrong.
    2. You load 2 jQuery libraries – 1.8.2 and 1.9.1. That should not be done.
    3. For using jqxGrid with MVC, please look at the ASP .NET Integration help topics.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Data Loading Problem #45856

    ARoumani
    Participant

    Thank you, I fix the notes but I have the same problem. but when I put the grid alone in a separated view it works. hereafter I will put both views:
    working view :
    @ModelType IEnumerable(Of MvcApplication1.Company_Representation)

    @Code
    ViewData(“Title”) = “Index”
    End Code

    @Section Scripts

    <script type=”text/javascript” src=”scripts/jquery-1.8.2.min.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqx-all.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.edit.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcombobox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxpanel.js”></script>
    <script type=”text/javascript” src=”scripts/gettheme.js”></script>

    <link rel=”stylesheet” type=”text/css” href=”jqwidgets/styles/jqx.base.css” />
    <script type=”text/javascript”>
    $(document).ready(function () {
    // prepare the data
    var Paramsource =
    {
    datatype: “json”,
    datafields: [
    { name: ‘ID’ },
    { name: ‘Desc1’ }
    ],

    url: ‘parameter/GetParameters(1)’
    };
    var dataAdapter1= new $.jqx.dataAdapter(Paramsource);

    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘RepCompID’, type: ‘Int’ },
    { name: ‘CompID_fk’, type: ‘Int’ },
    { name: ‘Manufacturer_name’, type: ‘String’ },
    { name: ‘RepType_para’, type: ‘Int’ },
    { name: ‘Active’, type: ‘Boolean’ },
    { name: ‘StartDate’, type: ‘Date’ },
    { name: ‘Enddate’, type: ‘Date’ },
    { name: ‘RepTypeDesc’, type: ‘String’ },
    ],
    url: ‘CompanyRep/GetCompaniesRep’
    //url: ‘Company/GetCompanies’
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    // initialize jqxGrid
    $(“#grid”).jqxGrid(
    {
    width: 900,
    source: dataAdapter,
    autoheight: true,
    rtl: true,
    columns: [
    { text: “الرمز”, datafield: “RepCompID”, align: “Center”, cellsalign: “right” },
    // { text: “CompID_fk”, datafield: “CompID_fk”, align: “Center”, cellsalign: “right”, width: 200 },
    { text: “اسم الشركة المصنعة”, datafield: “Manufacturer_name”, align: “Center”, cellsalign: “right” },
    /* { text: “RepType_para”, datafield: “RepType_para”, align: “Center”, cellsalign: “right” , columntype: ‘dropdownlist’,
    createeditor: function (row, Column, editor) {
    editor.jqxDropDownList({ source: dataAdapter1, displayMember: ‘ID’, valueMember: ‘DESC1’ });
    }
    },*/
    { text: “نوع الوكالة”, datafield: “RepTypeDesc”, align: “Center”, cellsalign: “right”, },
    { text: “فعال”, datafield: “Active”, align: “Center”, cellsalign: “right”, columntype: ‘checkbox’ },
    { text: “من تاريخ”, datafield: “StartDate”, align: “Center”, cellsalign: “right” },
    { text: “الى تاريخ”, datafield: “Enddate”, align: “Center”, cellsalign: “right” },
    {
    text: ”, datafield: ‘Edit’, columntype: ‘button’, width: 50, cellsrenderer: function () {
    return “تعديل”;
    }, buttonclick: function (row) {
    editrowindex = row;
    var id = $(“#grid”).jqxGrid(‘getcellvalue’, row, “RepCompID”);
    window.location = ‘/Companyrep/Edit/?id=’ + id;
    }
    }
    ]
    });
    });

    </script>
    End Section

    <h2>@Session(“compname”)</h2>

    <div style=”float :left “>
    @Html.ActionLink(“اضافة شركة مصنعة”, “Create”)
    @Html.ActionLink(“عودة الى ملف الشركة”, “Edit”, “Company”)

    </div>

    <h3>الشركات المصنعة</h3>
    <div id=”grid”></div>

    Not working view:
    @ModelType MvcApplication1.COMPANY

    @Code
    ViewData(“Title”) = “Edit”
    End code
    @Styles.Render(“~/Content/css”)

    @Section Scripts
    @Scripts.Render(“~/bundles/jqueryval”)

    <script type=”text/javascript” src=”scripts/jquery-1.8.2.min.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.sort.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.filter.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsresize.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxpanel.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcheckbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsresize.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.columnsreorder.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxnumberinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcalendar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdatetimeinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/globalization/jquery.global.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcombobox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxradiobutton.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.storage.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxwindow.js”></script>
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.summer.css” type=”text/css” />

    <script type=”text/javascript”>
    $(document).ready(function () {
    // prepare the data
    //var Paramsource =
    // {
    // datatype: “json”,
    // datafields: [
    // { name: ‘ID’ },
    // { name: ‘Desc1’ }
    // ],

    // url: ‘parameter/GetParameters(1)’
    // };

    //var dataAdapter1 = new $.jqx.dataAdapter(Paramsource);

    var source2 =
    {
    datatype: “json”,
    datafields: [
    { name: ‘RepCompID’, type: ‘Int’ },
    { name: ‘CompID_fk’, type: ‘Int’ },
    { name: ‘Manufacturer_name’, type: ‘String’ },
    { name: ‘RepType_para’, type: ‘Int’ },
    { name: ‘Active’, type: ‘Boolean’ },
    { name: ‘StartDate’, type: ‘Date’ },
    { name: ‘Enddate’, type: ‘Date’ },
    { name: ‘RepTypeDesc’, type: ‘String’ },
    ],
    url: ‘GetCompaniesRep’
    // url: ‘Companyreplist’
    };

    var dataAdapter2 = new $.jqx.dataAdapter(source2);

    // initialize jqxGrid

    $(“#grid1”).jqxGrid(
    {
    width: 900,
    source: dataAdapter2,
    autoheight: true,
    rtl: true,
    columns: [
    { text: “الرمز”, datafield: “RepCompID”, align: “Center”, cellsalign: “right” },
    // { text: “CompID_fk”, datafield: “CompID_fk”, align: “Center”, cellsalign: “right”, width: 200 },
    { text: “اسم الشركة المصنعة”, datafield: “Manufacturer_name”, align: “Center”, cellsalign: “right” },
    /* { text: “RepType_para”, datafield: “RepType_para”, align: “Center”, cellsalign: “right” , columntype: ‘dropdownlist’,
    createeditor: function (row, Column, editor) {
    editor.jqxDropDownList({ source: dataAdapter1, displayMember: ‘ID’, valueMember: ‘DESC1’ });
    }
    },*/
    { text: “نوع الوكالة”, datafield: “RepTypeDesc”, align: “Center”, cellsalign: “right”, },
    { text: “فعال”, datafield: “Active”, align: “Center”, cellsalign: “right”, columntype: ‘checkbox’ },
    { text: “من تاريخ”, datafield: “StartDate”, align: “Center”, cellsalign: “right” },
    { text: “الى تاريخ”, datafield: “Enddate”, align: “Center”, cellsalign: “right” },
    {
    text: ”, datafield: ‘Edit’, columntype: ‘button’, width: 50, cellsrenderer: function () {
    return “تعديل”;
    }, buttonclick: function (row) {
    editrowindex = row;
    var id = $(“#grid”).jqxGrid(‘getcellvalue’, row, “RepCompID”);
    window.location = ‘/Companyrep/Edit/?id=’ + id;
    }
    }
    ]
    });
    });

    </script>

    End Section

    <div style=”float :left “>
    @Html.ActionLink(“الشركات المصنعة”, “Index”, “Companyrep”)
    @Html.ActionLink(“عودة الى لائحة الشركات”, “Index”)

    </div>

    @Using Html.BeginForm()
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(True)

    @<fieldset>
    <legend>COMPANY</legend>
    <p>
    <input type=”submit” value=”حفظ” />
    </p>
    <table style=”width:100%;”>
    <tr>
    <td width=”220″>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.COMPID, “الرمز″)
    </div>
    </td>
    <td>
    <div class=”editor-field” >
    @Html.TextBoxFor(Function(model) model.COMPID, New With {.style = “width:100px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.COMPID)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.NAME, “اسم الشركة”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.NAME, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.NAME)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.REGISTER, “رقم التسجيل في السجل التجاري”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.REGISTER, New With {.style = “width:100px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.REGISTER)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.EMPLOYEENBR, “عدد الموظفين”)
    </div>
    </td>
    <td>
    <div class=”editor-label”>
    @Html.TextBoxFor(Function(model) model.EMPLOYEENBR)
    @Html.ValidationMessageFor(Function(model) model.EMPLOYEENBR)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.Country, “البلد”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.DropDownListFor(Function(model) model.Country, New SelectList(MvcApplication1.ParameterController.GetCompParameters(8), “ID”, “DESC1”, Model.Country), New With {.class = “dropdown”})
    @Html.ValidationMessageFor(Function(model) model.Country)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.ADDRESS, “العنوان”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.ADDRESS, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.ADDRESS)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.PHONE, “الهاتف”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.PHONE, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.PHONE)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.FAX, “الفاكس″)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.FAX, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.FAX)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.EMAIL, “البريد الالكتروني”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.EMAIL, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.EMAIL)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.WebSite, “الموقع الالكتروني”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.WebSite, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.Website)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.RESPONSIBLE, “اسم المسؤول”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.RESPONSIBLE, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.RESPONSIBLE)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.RESPPOST, “وظيفته”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.TextBoxFor(Function(model) model.RESPPOST, New With {.style = “width:500px;Color: #333″})
    @Html.ValidationMessageFor(Function(model) model.RESPPOST)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.IsImporter, “مستورد”)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.CheckBoxFor(Function(model) model.IsImporter)
    @Html.ValidationMessageFor(Function(model) model.IsImporter)
    </div>
    </td>
    </tr>
    <tr>
    <td>
    <div class=”editor-label”>
    @Html.LabelFor(Function(model) model.ManufacturerType, “مصنع″)
    </div>
    </td>
    <td>
    <div class=”editor-field”>
    @Html.DropDownListFor(Function(model) model.ManufacturerType, New SelectList(MvcApplication1.ParameterController.GetCompParameters(1), “ID”, “DESC1”, Model.ManufacturerType), New With {.style = “width:500px;border: 0px solid #787878;Color: #333;font-size: 1.2em;”})
    @Html.ValidationMessageFor(Function(model) model.ManufacturerType)
    </div>
    </td>
    </tr>

    </table>

    <p>
    <input type=”submit” value=”حفظ” />

    </p>

    </fieldset>
    End Using

    <div id=”grid1″></div>

    <div style=”float :left “>
    @Html.ActionLink(“الشركات المصنعة”, “Index”, “Companyrep”)
    @Html.ActionLink(“عودة الى لائحة الشركات”, “Index”)

    </div>

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.