protected void AddRadPushButtonWithIcon(string ID, string IconName, string Skin, int?Height, int?Top, HtmlTable table, HtmlTableRow row) { HtmlTableCell cell = new HtmlTableCell(); RadPushButton RadPushButton1 = new RadPushButton() { ID = "RadPushButton1" + ID, Text = IconName, Skin = Skin, }; if (Height != null) { RadPushButton1.Height = Unit.Pixel((int)Height); } RadPushButton1.Icon.CssClass = IconName; if (Top != null) { RadPushButton1.Icon.Top = Unit.Pixel((int)Top); } cell.Controls.Add(RadPushButton1); row.Cells.Add(cell); table.Rows.Add(row); }
protected void AddRadPushButtonWithIcon(string ID, string IconName, string Skin, int? Height, int? Top, HtmlTable table, HtmlTableRow row) { HtmlTableCell cell = new HtmlTableCell(); RadPushButton RadPushButton1 = new RadPushButton() { ID = "RadPushButton1" + ID, Text = IconName, Skin = Skin, }; if (Height != null) RadPushButton1.Height = Unit.Pixel((int)Height); RadPushButton1.Icon.CssClass = IconName; if (Top != null) RadPushButton1.Icon.Top = Unit.Pixel((int)Top); cell.Controls.Add(RadPushButton1); row.Cells.Add(cell); table.Rows.Add(row); }
protected void RgvCourse_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem item = (GridDataItem)e.Item; Label lbOperation = item.FindControl("lbOperation") as Label; RadPushButton btnpushmodel = item.FindControl("btnpushmodel") as RadPushButton; string operation = string.Empty, btnname = string.Empty; operation = Convert.ToString(lbOperation.Text); if (operation == "I") { e.Item.Font.Bold = true; btnname = "Send to Blackboard"; } else if (operation == "U") { e.Item.Font.Bold = false; e.Item.BackColor = System.Drawing.ColorTranslator.FromHtml("#BFE491"); btnname = "Update to Blackboard"; } btnpushmodel.Text = btnname; } }