Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
UltraWebGrid Dropdown column madness!
posted

Ok let me start by saying 2 things...

#1

I am working on a very large project, with many people at my current place of employment. This project is our flagship product and has been around for about 4 years now. It is written in .net 2.0 and uses Infragistics 8.1.

I can copy samples of what I am trying to do into my posts but I cannot upload a copy of the whole project because it is too large and it would be too difficult for anyone not at our company to get it working.

#2

I know what I am about to ask my not be technically correct or good/best design practice but I have to do it this way. I have many smothering requirements I have to comply with for this project.

Here it goes anyways...

I have an UltraWebGrid in a user control I am designing.

One of the columns for my grid is a drop down, and right now I am using the column's value list to make that happen.

We use this technique in many many other places in this project but this is the first time a developer on this project has to code a grid with a dropdown column and have the dropdown contain different values on a per-row basis.

Now I know that the value list is a column-based attribute, and i've spent a week+ reading everything (AND I MEAN EVERYTHING!) on the net containing the words Infragistics, Dropdown, Column, javascript, and ValueList.

All I see are people saying that you cannot have different valuelists per row, and if you need that, then do a templatedcolumn.

And I cannot use a webcombo instead of the valuelist, because i need the dropdown to look like all the other dropdowns in the app

I considered that approach but I cannot use it because of one of the project requirements. The dropdown should only appear in the cell when in edit mode, otherwise it should look like a normal cell. Templating the column makes it look like it contains a dropdown all the time. Then I tried to edit each individual valuelist in the Init_Row event and that didn't work.

Then I hooked into the BeforeEnterEditMode event, and now i can get the drop down to show the different lists based on the type of row i am editing...but when the page first loads, if 2 rows already exist and there is 1 type of each, I see the correct displayText in one, but the other shows the datavalue, not the display text.

So basically I am looking for the quickest, easiest answer, and i will take any suggestion.

I can use as much javascript as i want (woo hoo {sarcasm!}) to get it done but I can't see to get it right.

Should I have one big value list for all the different row types and filter it to only show the required options in the dropdown? If so....how?

If not, then could someone please spell it out for me?

I'll copy and paste whatever you need to see, just let me know!