Quantcast

How to retrieve data from table.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to retrieve data from table.

daralis
Hi

Im trying to export data from table, I have no idea how to start it.

Thanks.
Below is the html:
<div class="w1 repertoire">
   

Infringing Websites List

    <div class="main-holder">
        <div class="meta-row top">
            <ul class="btn-list">
                <li>
                    <form id="iwl-export-form" action="/IWL/Export" method="post"></form>
                    Export
                <li>
                    <div class="iwl-filter">
                        <input type="text" data-bind="value: filter" />
                        Filter
                        Clear
                    </div>
                </li>
            </ul>
           
            <nav class="page-nav iwl-pager">
               
                <ul>
                    <li class="prev">
                       
                            Go to the previous page
                       

                    </li>
                    <li class="next">
                       
                            Go to the next page
                       

                    </li>
                </ul>

               
                    Go to the last page
               


            </nav>
        </div>
        <div class="main-box">
            <div class="table custom-form">
                <div class="table-head" id="iwlTableHeader">
                    <div class="table-row">
                        <div class="table-cell size04" data-field="WebsiteURL">Website URL</div>
                        <div class="table-cell size04" data-field="Reference">Reference</div>
                        <div class="table-cell size04" data-field="DateCreatedUTC">Created Date</div>
                        <div class="table-cell size04" data-field="DateUpdatedUTC">Updated Date</div>
                    </div>
                </div>
                <div class="table-body">
                    <div id="iwlGrid"></div>
                </div>
            </div>
        </div>
        <div class="meta-row">
            <div class="meta-block custom-form iwl page-sizes">
                <label class="label" for="select-1">View</label>
               
                    <select id="select-1">
                        <option selected="selected">10</option>
                        <option>100</option>
                        <option>150</option>
                        <option>200</option>
                        <option>250</option>
                    </select>
               

            </div>
            <nav class="page-nav iwl-pager">
               
                <ul>
                    <li class="prev">
                       
                            Go to the previous page
                       

                    </li>
                    <li class="next">
                       
                            Go to the next page
                       

                    </li>
                </ul>

               
                    Go to the last page
               


            </nav>
        </div>
    </div>
</div>

        </main>
    </div>
    <script type="text/x-kendo-template" id="password-validation-template"> <div class="alert alert-error" style="left: 0px;"> <div class="validation-summary-errors" data-valmsg-summary="true"> <ul> #for(var ind = 0; ind < data.length; ind++){# <li>#=data[ind]#</li> #}# </ul> </div> </div> </script>   
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>    <script type="text/javascript">window.jQuery || document.write('<script src="/scripts/jquery-1.11.2.min.js"><\/script>')</script>   
    <script src="/Content/kendoui/js/kendo.all.js"></script>    <script src="/Content/kendoui/js/kendo.aspnetmvc.js"></script>    <script src="/scripts/jquery.main.js"></script>    <script src="/Scripts/main.js"></script>   
<script type="text/x-kendo-template" id="iwlRowTemplate"> <label class="table-row" for="check-${Id}"> <span class="table-cell size04" title="WebsiteURL"><span>${WebsiteURL}</span></span> <span class="table-cell size04" title="Reference"><span>${Reference}</span></span> <span class="table-cell size04" title="Created Date"><span>${DateCreatedUTC}</span></span> <span class="table-cell size04" title="Updated Date"><span>${DateUpdatedUTC}</span></span> </label> </script><script type="text/javascript"> $(function () { var iwlDataSource = new kendo.data.DataSource({ type: "webapi", transport: { read: { dataType: "json", url: "/iwl/get", type: "GET" } }, serverPaging: true, serverSorting: true, serverFiltering: true, pageSize: 10, sort: { field: "DateCreatedUTC", dir: "desc" }, schema: { data: "Data", total: "Total", errors: "Errors", model: { fields: { WebsiteURL: { type: "string" }, Reference: { type: "string" }, DateCreatedUTC: { type: "datetime" }, DateUpdatedUTC: { type: "datetime" } } } } }); $("#iwlGrid").kendoListView({ dataSource: iwlDataSource, pageable: true, pageSize: 10, template: kendo.template($("#iwlRowTemplate").html()), autoBind: false }); $(".iwl-pager").kendoPager({ autoBind: true, dataSource: iwlDataSource, numeric: false, messages: { display: "{0}-{1} from {2}" } }); $("#iwlTableHeader").kendoIncyanTableHeader({ dataSource: iwlDataSource }); $(".iwl.page-sizes select").on("change", function (e) { iwlDataSource.pageSize(parseInt($(this).val())) }); var iwlFilter = kendo.observable({ filter: "", filterClick: function (e) { e.preventDefault(); var filter = this.get("filter"); var filters = [ { field: "WebsiteURL", operator: "contains", value: filter } ]; iwlDataSource.filter(filters); this.set("filtered", true); }, clearFilterClick: function (e) { e.preventDefault(); this.set("filter", ""); iwlDataSource.filter({}); this.set("filtered", false); }, filtered: false }); kendo.bind($(".iwl-filter"), iwlFilter); iwlDataSource.read(); $(document).on("click", "#iwl-export-button", function (e) { e.preventDefault(); $("#iwl-export-form").submit(); }); }); </script>    <div id="SessionTimeoutWindow" style="display:none">Your session is about to end. Click <a href='#' onclick='onStillHereClick();return false;' class='btn btn-default'>I am still here to prolong your session.</div>
    <script>jQuery(function(){jQuery("#SessionTimeoutWindow").kendoWindow({"modal":true,"iframe":false,"draggable":false,"scrollable":true,"pinned":false,"title":"Session","resizable":false,"content":null,"width":400,"height":100,"actions":["Close"]});});</script>    <script type="text/javascript"> var sessionTimeout = null; var keepAliveTimeout = null; var timeout = 10 * 60000; // ms var stillHereTimeout = timeout - 60000; var sessionTimeoutWindowTimeout = null; var onStillHereClick = function (e) { $("#SessionTimeoutWindow").data().kendoWindow.close(); $.ajax({ url: "/home/keepalive", success: function () { kendo.logToConsole(arguments); } }); }; var updateSessionTimeout = function () { clearTimeout(sessionTimeout); sessionTimeout = setTimeout(function () { $("#logoutForm").submit(); }, timeout - 20000); clearTimeout(sessionTimeoutWindowTimeout); sessionTimeoutWindowTimeout = setTimeout(function () { $("#SessionTimeoutWindow").data().kendoWindow.center().open(); }, stillHereTimeout); }; $(function() { $(document).on("click", function (e) { updateSessionTimeout(); kendo.logToConsole("click"); }); $(document).on("keypress", function(e) { if (e.keyCode == 13) { updateSessionTimeout(); } }); updateSessionTimeout(); }); </script></body>
</html>
Loading...