ISO: Examples of adding custom columns (and data) to the Detail View (MVC or Core, preferrably)
Question asked by Jerome Atchison - 11/14/2019 at 6:09 AM
Answered
I am In Search Of (ISO) some example code or documentation that demonstrates how to add/remove/configure the columns in the detail view either server side or client side.  

I would like to take the filename.ext and query against a database (REST api ajax call) to get additional metadata I have about the file and then display that data in additional columns in the Detail View or in tooltips for the icon views.  I have most of the pieces working except I can't seem to find where I can hook into the fileultimate.js API to modify its "columns" property.  I found a getViewColumnsConfig function, but not sure how to use it or even if this is the correct way to do what I want...

I am able to translate from most other languages to my preferred coding tools, but examples in C# for ASP.Net MVC or MVC Core would be awesome.

Jerome

1 Reply

Reply to Thread
0
Jerome Atchison Replied
Marked As Answer
For others that are looking for a similar answer... Cem posted addtional code for this request in this related thread...  https://support.gleamtech.com/community/a16/how-to-custom-menu-and-custom-toolbar.aspx

Snippet from other thread:
<head> 
  <script type="text/javascript">

              //Adding a column for "Details" view layout
        Ext.override(fileManager, {
            getViewColumnsConfig: function () {
                var columns = this.callParent(arguments);

                columns.push({
                    text: "Test column",
                    dataIndex: "name",
                    tdCls: "x-item-value",
                    renderer: function (value, meta, record) {
                        //you can use the name value as an id to 
                        //get your own corresponding value here
                        //e.g if you have an object customValues 
                        //with file names as key, you can retrieve
                        //and return customValues[record.data.name]
                        return record.data.name;
                    }
                });

                return columns;
            }
        });
      
  </script>
</head> 
<body>

  <GleamTech:FileManager id="fileManager" runat="server" 
    ClientLoading="fileManagerLoading"
    ClientLoaded="fileManagerLoaded" />
  
</body>

THANK YOU Cem!!

Reply to Thread