Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "huntethan89"

Answer

Hi, It is showing loading image constantly, not showing the data from database.

code is as below:-

this is Index.js file code. to load data in grid.


var _$FileTable = $('#FileTable'); // div where we add the grid.

_$FileTable.jtable({ title: app.localize('File Tracking'),

        actions: {
            listAction: {
                method: _fileService.GetFiles
            }
        },

        fields: {
            id: {
                key: true,
                list: false
            },
            actions: {
                title: app.localize('Actions'),
                width: '30%',
                display: function (data) {
                    var $span = $('<span></span>');

                    if (_permissions.edit) {
                        $('<button class="btn btn-default btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
                            .appendTo($span)
                            .click(function () {
                                _createOrEditModal.open({ id: data.record.id });
                            });
                    }

                    if (!data.record.isStatic && _permissions.delete) {
                        $('<button class="btn btn-default btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
                            .appendTo($span)
                            .click(function () {
                                deleteRole(data.record);
                            });
                    }

                    return $span;
                }
            },
            displayName: {
                title: app.localize('FileName'),
                width: '35%',
                display: function (data) {
                    var $span = $('<span></span>');

                    $span.append(data.record.FileName + "   ");

                    return $span;
                }
            },
            creationTime: {
                title: app.localize('CreationTime'),
                width: '35%',
                display: function (data) {
                    return moment(data.record.CreateDate).format('L');
                }
            }
        }
    });

function getRoles() { _$FileTable.jtable('load'); }

    getRoles();

FiletrackingAppservice.cs ( this is i am using to retireve data from database)

public ListResultDto<FileListDto> GetFiles(GetFileTrack input) { var files = _fileRepository .GetAll() .Include(p => p.User) .WhereIf( !input.Filter.IsNullOrEmpty(), p => p.FileName.Contains(input.Filter) || p.FilePath.Contains(input.Filter) || p.File_Status.Contains(input.Filter) ) .OrderBy(p => p.FileName) .ThenBy(p=>p.File_Status) .ToList();

        return new ListResultDto&lt;FileListDto&gt;(files.MapTo&lt;List&lt;FileListDto&gt;>());

    }

Thanks

Answer

Hi, Yes, now i got the mail and able to access pages.

Thanks Himanshu sharma

Showing 121 to 122 of 122 entries