Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have the Drop down Options which are pulled from the Database and they have the following structure

GblOptions

OptionId OptionName OptionType IsActive

EF code

gblOptions.where(e=>e.IsActive ==true and e.OptionType=="CustomerType")
Now i use the Angular route resolve to get all the options for the optionType .

The things are fine with the add cause i am pulling all the options which are only active.

Now i assign the Dropdown option to my entity ex customer and they exit the page ...and change the CustomerType that was asssigned to the customer to be inactive ....

But now the lookups service doesnt pull the inactive records and it feels that the customer is not having any customerType.

One way i thought was to pull the record which the customer is associated already like the

gblOptions.where(e=>e.IsActive ==true &&e.OptionType=="CustomerType" || e.OptionId==Customer.CustomerTypeId)
so that it pulls the option for the dropdown but i dont feel this way is correct..cause then the inactive option is available to the user..

I am using kendo dropdowns with angular and the mvc and webapi and ef being my backend

Is there any other approach for handling this inactive dropdowns
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900