Filtering a bootstrap table

4 posts, 0 answers
  1. Mirjam
    Mirjam avatar
    2 posts
    Member since:
    Oct 2016

    Posted 14 Oct Link to this post

    Hi guys,

    I have a few problems with my brandnew grid. The situation is this: I added a grid to an mvc view. I made the grid columns filterable with the filterable: true setting.
    The grid also contains a column with a checkbox to enable multiselect and a submit button to process the selection. If I tick a few boxes and process the selection everything works fine. If I use the filter and then select multiple rows to process, the list returned to the controller contains the wrong number of records or no records at all.

    Furthermore, only rhe 'contains' option in the filter produces results, if I choose another option I get a grid with no results. I put the code for the View, ViewModel, Controller, the _layout.cshtml and the bundle.config in the attached zip. I'm afraid I couldn't get it in to a working project, because of the necessary data. I hope you'll still be able to figure out what's going wrong.

    Cheers,

    Mirjam

     

  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 18 Oct Link to this post

    Hello Mirjam,

    The grid in the Index.cshtml View does not contain any columns and I can see how it is populated. There is no data provided for the data source. Is this the code that we should reference? Here you can find a sample of a grid that has enabled filtering.

    Regards,
    Angel Petrov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Mirjam
    Mirjam avatar
    2 posts
    Member since:
    Oct 2016

    Posted 18 Oct in reply to Angel Petrov Link to this post

    Hi Angel,

    The grid is populated using the mvc structure. In the Alerts controller, the service layer for alerts is called and this gets the relevant data from the database. What I guess I am trying to figure out is whether it is possible to use the filteroptions from the grid, without completely rebuilding the page. As in, putting a layer of grid functionality on top of the existing mvc table. But it looks like that is going to be difficult...

    Kind regards,

    Mirjam

     

  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 20 Oct Link to this post

    Hello Mirjam,

    I am experiencing difficulties understanding the exact requirement. If you want to configure the grid to read the data from a controller action you can initialize it as demonstrated here. In this case however you do not need to initialize it from a table.

    Regards,
    Angel Petrov
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready