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
90
Two value list in an ultragrid
posted

Hi everyone , as the Subject say im working with two value list inside my ultragrid, one of then has static values that i set on the load event and the other one will take its values depending on the value selected on the first one , they are my columns "Type" and "Subtype" im trying to do that using the "after cell list close up" even of the ultragrid(not sure if its the righ one) i have the next code on said event:

 

            ValueList lista = new ValueList();
           
            switch (e.Cell.SelText)
            {
               
                case "Factura":
                    lista.ValueListItems.Add(1, "Factura");
                    lista.ValueListItems.Add(2, "Adelanto");
                    lista.ValueListItems.Add(3, "Avance");
                    lista.ValueListItems.Add(4, "Retencion");
                    break;
                case "Intereses":
                    lista.ValueListItems.Add(1, "Interes");
                    break;
                case "Letra de Cambio":
                    lista.ValueListItems.Add(1, "Letra de Cambio");
                    break;
                case "Nota de Débito":
                    lista.ValueListItems.Add(1, "Nota de Debito");
                    break;
                case "Otro Débito":
                    lista.ValueListItems.Add(1, "Otro Debito");
                    break;

            }
            UGridDetalle.DisplayLayout.Bands[0].Columns["Subtipo"].ValueList = lista;

and its working just fine except that it also trigger when the user select any value on the subtype and i want it to trigger only when the user select a value from the type list, i have tired using activerow to select the header or something to be able to know whats the source of my event but i havent been able to find a way