or
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Text; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using Telerik.Web.UI; |
| namespace Elevate.UI.WebControls |
| { |
| [ToolboxData("<{0}:SearchAjax runat=server></{0}:SearchAjax>")] |
| public class SearchAjax : Control, INamingContainer |
| { |
| #region private properties |
| private Unit _width; |
| #endregion |
| #region public accessors |
| public Unit Width |
| { |
| set { _width = value; } |
| } |
| #endregion |
| protected override void OnInit(EventArgs e) |
| { |
| base.OnInit(e); |
| RadScriptManager scriptManager = new RadScriptManager(); |
| Controls.Add(scriptManager); |
| } |
| protected override void CreateChildControls() |
| { |
| RadAjaxManager radAjaxManager = new RadAjaxManager(); |
| AjaxSetting ajaxSetting = new AjaxSetting(); |
| ajaxSetting.AjaxControlID = "button1"; |
| AjaxUpdatedControl ajaxUpdatedControl = new AjaxUpdatedControl(); |
| ajaxUpdatedControl.ControlID = "simplePanel"; |
| ajaxUpdatedControl.LoadingPanelID = "ajaxLoadingPanel"; |
| ajaxSetting.UpdatedControls.Add(ajaxUpdatedControl); |
| radAjaxManager.AjaxSettings.Add(ajaxSetting); |
| Controls.Add(radAjaxManager); |
| RadAjaxLoadingPanel radAjaxLoadingPanel = new RadAjaxLoadingPanel(); |
| radAjaxLoadingPanel.ID = "ajaxLoadingPanel"; |
| Controls.Add(radAjaxLoadingPanel); |
| Panel simplePanel = new Panel(); |
| simplePanel.ID = "simplePanel"; |
| simplePanel.Width = _width; |
| simplePanel.Attributes.Add("style", "padding:50px;height:300px;"); |
| Label lblTest1 = new Label(); |
| lblTest1.Text = "Panel 1"; |
| simplePanel.Controls.Add(lblTest1); |
| simplePanel.Controls.Add(new LiteralControl("<br /><br />")); |
| Button button1 = new Button(); |
| button1.ID = "button1"; |
| button1.Text = "Press Me"; |
| button1.Click += new EventHandler(button1_Click); |
| simplePanel.Controls.Add(button1); |
| Controls.Add(simplePanel); |
| } |
| void button1_Click(object sender, EventArgs e) |
| { |
| System.Threading.Thread.Sleep(2000); |
| } |
| } |
| } |
<
telerik:RadTreeView ID="RadTreeView1" Runat="server" Skin="Office2007" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" >
<ContextMenus>
<telerik:RadTreeViewContextMenu Skin="Office2007" ID="MainContextMenu" runat="server" >
<Items>
<telerik:RadMenuItem Value="Expand" Text="Expand Descendants"></telerik:RadMenuItem>
<telerik:RadMenuItem Value="Collapse" Text="Collapse"></telerik:RadMenuItem>
</Items>
</telerik:RadTreeViewContextMenu>
</ContextMenus>
</telerik:RadTreeView>
| If e.Item.ToString <> "Telerik.Web.UI.GridEditFormItem" And e.Item.ToString <> "Telerik.Web.UI.GridPagerItem" And e.Item.ToString <> "Telerik.Web.UI.GridHeaderItem" And e.Item.ToString <> "Telerik.Web.UI.GridFooterItem" And e.Item.ToString <> "Telerik.Web.UI.GridFilteringItem" Then |
| Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) |
| Select Case tmp_comp_report_ID |
| Case 5 |
| If e.Item.Cells(3).Text = " " Then |
| e.Item.BackColor = System.Drawing.Color.Aqua |
| Else |
| e.Item.HorizontalAlign = HorizontalAlign.Right |
| End If |
| Case 6 |
| If e.Item.Cells(3).Text <> " " And e.Item.Cells(4).Text = " " Then |
| e.Item.BackColor = System.Drawing.Color.Aqua |
| Else |
| e.Item.HorizontalAlign = HorizontalAlign.Right |
| End If |
| End Select |
| End If |
| <telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" Visible="false" MasterTableView-EnableNoRecordsTemplate="true" |
| AllowSorting="True" GridLines="both" Skin="Telerik" |
| PageSize="100" ShowStatusBar="true" AllowPaging="True" |
| runat="server" OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" |
| OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated"> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <ClientSettings EnableRowHoverStyle="true"> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <MasterTableView Summary="testing" ></MasterTableView> |
| </telerik:RadGrid> |
dt.Load(rs)
RadGrid1.DataSource = dt
please help if you have anything. thanks alot
