Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom searching #11

Open
tpeczek opened this issue Apr 30, 2017 · 2 comments
Open

Add support for custom searching #11

tpeczek opened this issue Apr 30, 2017 · 2 comments

Comments

@tpeczek
Copy link
Owner

tpeczek commented Apr 30, 2017

No description provided.

@MichealeSee
Copy link

Hi Sir,

How can make the Gender read from database which I have table to stored the Gender Id & Name? How to make the enum

public enum Genders
    {
        Female = 1,
        Male = 2,
        Hermaphrodite = 3
    }

to be read from dataContext instead hardcoded as above?

public Dictionary<string, string> GetGendersDictionary()
        {
            var list = _db.Gender.Select(t => new { t.Id, t.Name })
            .ToDictionary(t => t.Id.ToString(), t => t.Name.ToString());
            return list;
        }

[JqGridColumnSearchable(typeof(DictionariesViewModel), "GetGendersDictionary", SearchType = JqGridColumnSearchTypes.Select, SearchOperators = JqGridSearchOperators.EqualOrNotEqual | JqGridSearchOperators.NullOperators)]

Please advise.

Regards,
Micheale

@tpeczek
Copy link
Owner Author

tpeczek commented May 2, 2018

@MichealeSee I'm not sure what is the actual issue you are having. My wild guess would be problem with injecting context into class providing dictionary, but I can't be sure without more details from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants