0

I have searched and searched, and Trirand, despite offering a paid for product, offer almost zero useful documentation.

I am using server side code to build the grid model, i.e. a collection of JQGridColumn objects, but of course there is zero documentation for this object:

Columns = new List<JQGridColumn>()
            {
                new JQGridColumn
                    {
                        DataField = "Id",
                        PrimaryKey = true, 
                        Editable = false,
                        Visible = false
                    },
                new JQGridColumn
                    {
                        DataField = "FileName",
                        HeaderText = "File Name",
                        Editable = false
                    },

This is taken from the example they give. There are millions of answers in the mode of building the grid column with JavaScript, and I probably will eventually manage to translate one, but right now, can anyone answer my question please?

tshepang
  • 12,111
  • 21
  • 91
  • 136
ProfK
  • 49,207
  • 121
  • 399
  • 775

1 Answers1

0

jqGrid is open source JavaScript jQuery-plugin. One can use it in commercial products under MIT license. The solution from trirand.net just uses the same JavaScript internally. You can mix it with any JavaScript code which you find for free jqGrid. I recommend you to open source code of HTML page generated by commercial jqGrid and examine the code. If you use

<%= Html.Trirand().JQGrid(Model.OrdersGrid, "Grid") %>

then you will find

<table id='Grid'>

<script type='text/javascript'>
    jQuery(document).ready(function() {
        jQuery('#Grid').jqGrid({....});
    });
</script>

It will give you the starting point for mapping one solution to another one.

Additionally I recommend you to examine the code of "Cell Formatters/Templates(custom)" which you will find under "Functionality" part of the demos. You will see that Controller can define column model with CustomFormatter. The CustomFormatter specify object with string properties FormatFunction and UnFormatFunction which values are global JavaScript functions which you define in the View part. In the way you can specify custom formatters which gives you the way of pacing any custom HTML fragment in the grid's column.

Oleg
  • 220,925
  • 34
  • 403
  • 798