Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["ColorScheme"] != null)
            {
                selectedScheme = (ColorScheme)Enum.Parse(typeof(ColorScheme), Request.QueryString["ColorScheme"]);
            }

            foreach (ColorScheme scheme in Enum.GetValues(typeof(ColorScheme)))
            {
                ListItem item = new ListItem(scheme.ToString(), scheme.ToString());
                DropDownList1.Items.Add(item);
                if (scheme == selectedScheme)
                {
                    item.Selected = true;
                }
            }

            CommonGridView4.ColorScheme = CommonGridView1.ColorScheme = selectedScheme;
            CommonGridView.ApplyStyle(Table1, selectedScheme);
            CommonGridView.ApplyStyle(Table2, selectedScheme);

            CommonGridView4.DataBind();

            //GridView1.EmptyDataText = "No Data Found.";
            //GridView1.DataBind();

            if (Micajah.Common.Configuration.FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Micajah.Common.Pages.MasterPageTheme.Modern)
            {
                SelectHolder.Visible = false;
            }
        }

        //CommonGridView1.Columns[0].Visible = (!CommonGridView1.Columns[0].Visible);

        HyperLink1.Text = "Gooooooogle!";
        //MyOwnedLink.NavigateUrl = "javascript:alert('1');";
    }
Example #2
0
 protected void GridView1_DataBound(object sender, EventArgs e)
 {
     CommonGridView.ApplyStyle(GridView1, selectedScheme);
 }