GithubHelp home page GithubHelp logo

ItemsToDisplay about grid.blazor HOT 6 OPEN

kimiyon27 avatar kimiyon27 commented on June 1, 2024
ItemsToDisplay

from grid.blazor.

Comments (6)

gustavnavar avatar gustavnavar commented on June 1, 2024 1

You must use the GridClient object in the front-end to display the ItemToDisplay serialized object sent by the back-end.

You can follow this guide: https://github.com/gustavnavar/Grid.Blazor/blob/master/docs/blazor_client/Quick_start.md

from grid.blazor.

Mohammedyasith avatar Mohammedyasith commented on June 1, 2024

Thank you @gustavnavar but now am facing another issue when ever I applying some filter the value was not passed to the api

var query = new QueryDictionary();
query.Add("grid-page", "2");
var client = new GridClient(HttpClient, url, query, false, "ordersGrid", Columns);
_grid = client.Grid;

every time the query obj(query) we send from here is received not we applied one

from grid.blazor.

Mohammedyasith avatar Mohammedyasith commented on June 1, 2024

program.cs file
services.AddHttpContextAccessor();
razor file

@Inject IHttpContextAccessor HttpContextAccessor

   var query = HttpContextAccessor.HttpContext.Request.Query;
    var dictionary = ConvertToDictionary(query);
    var clients = new GridClient<WorkflowsModel>(HttpClient, "app/Data", dictionary, false, "appGrid", Columns)
                .Sortable()
                .Filterable()
                .WithMultipleFilters();

public static QueryDictionary ConvertToDictionary(IQueryCollection queryCollection)
{
var dictionary = new QueryDictionary();

    foreach (var kvp in queryCollection)
    {
        dictionary.Add(kvp.Key, kvp.Value);
    }
    return dictionary;
}

from grid.blazor.

Mohammedyasith avatar Mohammedyasith commented on June 1, 2024

Is this right

from grid.blazor.

gustavnavar avatar gustavnavar commented on June 1, 2024

I cant not see what is wrong in your code.

Could you open a new issue attaching the a visual studio project with your code?

from grid.blazor.

Mohammedyasith avatar Mohammedyasith commented on June 1, 2024

Its working fine

from grid.blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.