Mvc.CascadeDropDown icon indicating copy to clipboard operation
Mvc.CascadeDropDown copied to clipboard

Cascading DropDown, that can take options to avoid Duplicate Combinations

Open weedkiller opened this issue 8 years ago • 2 comments

Hi, thanks for this great control.

for e.g. if we have a Table with cascading drop downs, no two combinations should be repeated or duplicated. So the check usually happens on the OnChange of the seconddropdown in the cascading dropdown

In cases where I have rows of cascading dropdowns, I often face a requirement where the user should not be allowed to pick the same combination of selections across the rows.

weedkiller avatar Aug 14 '17 05:08 weedkiller

I am not sure that I understand the question. Could you please try to explain it in a little more details? Maybe adding some code could clarify it.

alexanderar avatar Aug 14 '17 06:08 alexanderar

@alexanderar imagine a table with rows containing 2 dropdowns. ( explained here)

for e.g..Say you have table of babies, where you are picking names in reach for the babies. So, each row has 2 dropdowns & you've to pick 1) GenderDropDown M/F, 2) then you have to pick a NameDropDown, here you cannot repeat the same name & gender combination.


In my case instead of babies, its for billing for task hours at work,

  • Project: Mobiletracker,
  • Billing could be Dev or testing, or staging (you can only select it one time in the table)

You are not allowed to double bill. You can only bill for one Project with one billing/budget code, So the combination cannot be repeated, each selection has to be unique

Table: You have to bill your time, in the table, each row has a DropDownProject and DropDownBillingCode you can select one billing code, but must not repeat the billing code selection again in other rows, and keep it unique - how to prevent duplicate value selections. //// ---Col 1 --- Col 2 --- Col 3

  • Row1: DropDownProject | DropDownBillingCode | Hours & Rate
  • Row2: DropDownProject | DropDownBillingCode | Hours & Rate **// SHOULD NOT REPEAT, previous select combination of Project & Code **

My problem is that when I set disable on an option, it does not POST the dropdownlist value to the server. It would be simply supered and godly if you can give me an option to say


Just an idea

DropDownConfiguration
   DropDownCss:   ProjectsDropDownCss // name of the DropDown to track onChange event
   UniqueValuesInEachRow: ture;  // boolean true or false
   ScopeDivID: myDivIdTable        // what is the scope, i.e. inside which Div Container, here its a table with id - myDivIdTable        

Once I pick a BillinCode in one Project, I cannot repeat that combination again. below is similar concept with picture.. hope it helps.

image

weedkiller avatar Aug 15 '17 04:08 weedkiller