Aspose.Cells.GridWeb.Examples.CSharp.GridWebBasics.ApplyPresetStyle.DropDownList1_SelectedIndexChanged C# (CSharp) Метод

DropDownList1_SelectedIndexChanged() защищенный Метод

protected DropDownList1_SelectedIndexChanged ( object sender, System e ) : void
sender object
e System
Результат void
        protected void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
         
            // Changes the preset style using built in style thats The Aspose.Cells.GridWeb provides.
            switch (DropDownList1.SelectedValue) {
                case "Standard" :
                    //Applying Standard style on the GridWeb control
                    GridWeb1.PresetStyle = PresetStyle.Standard;
                    break;
                case "Colorful1":
                    // ExStart:ApplyPresetStyle
                    // Applying Colorful1 style on the GridWeb control
                    GridWeb1.PresetStyle =PresetStyle.Colorful1;
                    // ExEnd:ApplyPresetStyle
                    break;
                case "Colorful2":
                    // Applying Colorful2 style on the GridWeb control
                    GridWeb1.PresetStyle= PresetStyle.Colorful2;
                    break;
                case "Professional1":
                    // Applying Professional1 style on the GridWeb control
                    GridWeb1.PresetStyle = PresetStyle.Professional1;
                    break;
                case "Professional2":
                    // Applying Professional2 style on the GridWeb control
                    GridWeb1.PresetStyle = PresetStyle.Professional2;
                    break;
                case "Traditional1":
                    // Applying Traditional1 style on the GridWeb control
                    GridWeb1.PresetStyle = PresetStyle.Traditional1;
                    break;
                case "Traditional2":
                    // Applying Traditional2 style on the GridWeb control
                    GridWeb1.PresetStyle = PresetStyle.Traditional2;
                    break;
                default:
                    GridWeb1.PresetStyle = PresetStyle.Standard;
                    break;           
                
            }

     
        }