or
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //Do not display SelectedFilesCount progress indicator. RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount; } RadProgressArea1.Localization.Uploaded = "Total Progress"; RadProgressArea1.Localization.UploadedFiles = "Progress"; RadProgressArea1.Localization.CurrentFileName = "Please wait while updating database... "; }private void UpdateProgressContext() { RadProgressContext progress = RadProgressContext.Current; const int total = 100; progress.Speed = "N/A"; for (int i = 0; i < total; i++) { progress.PrimaryTotal = 1; progress.PrimaryValue = 1; progress.PrimaryPercent = 100; progress.SecondaryTotal = total; progress.SecondaryValue = i; progress.SecondaryPercent = i; progress.CurrentOperationText = "Step " + i.ToString(); if (!Response.IsClientConnected) { //Cancel button was clicked or the browser was closed, so stop processing break; } progress.TimeEstimated = (total - i) * 100; //Stall the current thread for 0.1 seconds System.Threading.Thread.Sleep(50); } }protected void RadButton1_Click(object sender, EventArgs e) { UpdateProgressContext(); //I assume this is how it call RetrieveData(); }<GroupFooterTemplate> <telerik:RadButton runat="server" ID="RadButton1" Text='<%# sDeleteButtonText %>' Value='<%# sCountryCode %>' OnClientClicked="if(!confirm('Are you sure you want delete this?')) return false;" > </telerik:RadButton></GroupFooterTemplate>Public Sub RadButton1_click(ByVal sender As Object, ByVal e As System.EventArgs) Dim button As RadButton = sender SqlDataSource1.DeleteParameters.Item("CurrencyTarget_CountryCode").DefaultValue = button.Value SqlDataSource1.Delete() RadGrid1.MasterTableView.Rebind() RadGrid1.CurrentPageIndex = 0protected void MyRadGrid_ItemCreated(object sender, GridItemEventArgs e) { if (e != null) { if (e.Item.IsInEditMode) { if (e.Item is GridHeaderItem) { e.Item.TabIndex = 1; } else if (e.Item is GridDataItem) { e.Item.TabIndex = 2; } else if (e.Item is GridFooterItem) { e.Item.TabIndex = 3; } else if (e.Item is GridCommandItem) { e.Item.TabIndex = 4; GridCommandItem item = e.Item as GridCommandItem; Button addNewRecord = (Button)item.FindControl("btnAddNewRecord"); Button deleteSelected = (Button)item.FindControl("btnDeletedSelected"); addNewRecord.TabIndex = 5; deleteSelected.TabIndex = 6; } } }<telerik:AjaxSetting AjaxControlID="rptPromotionPages"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rptPromotionPages" /> </UpdatedControls></telerik:AjaxSetting>.RadPanelBar_MySkin .rpImage{ padding-bottom: 10px !important;}
Posted 11 minutes ago (permalink)
<telerik:RadTabStrip ID="radTSCapabilities" runat="server" SelectedIndex="0" Skin="Default" MultiPageID="radMPCapabilities" /> <telerik:RadMultiPage ID="radMPCapabilities" runat="server" SelectedIndex="0" />Telerik.Web.UI.RadPageView tmpPageView = new Telerik.Web.UI.RadPageView();tmpPageView.ID = type.AbilityType.Name;radMPCapabilities.PageViews.Add(tmpPageView);//Add a Tab for the AbilityTypeTelerik.Web.UI.RadTab tmpTab = new Telerik.Web.UI.RadTab(type.AbilityType.Name, type.AbilityType.ID.ToString());tmpTab.PageViewID = tmpPageView.ID;radTSCapabilities.Tabs.Add(tmpTab);//Create and Load the Rad TreeTelerik.Web.UI.RadTreeView radTree = new Telerik.Web.UI.RadTreeView();radTree.Skin = "Default";radTree.CheckBoxes = true;radTree.TriStateCheckBoxes = true;radTree.CheckChildNodes = true;radTree.NodeDataBound += new Telerik.Web.UI.RadTreeViewEventHandler(radTree_NodeDataBound);radTree.ID = type.AbilityType.ID.ToString() + type.AbilityType.Name.Replace(" ", "_");radTree.DataTextField = "Name";radTree.DataValueField = "ID";radTree.DataFieldID = "ID";radTree.DataFieldParentID = "ParentID";//If there are multiple Ability Types in result set then go to the DB to get all Abilities for that typeif (distinctAbilityTypes.Count() != 1) radTree.DataSource = AbilityMgr.GetAbilitiesByAbilityTypeID(type.AbilityType.ID);else radTree.DataSource = tmpAbilities;//Bind the TreeradTree.DataBind();//Add a top borderLiteral tmpLiteral = new Literal();tmpLiteral.Text = "<div style='border-top:solid 1px #AAAAAA;'></div>";//Add the Literal and Tree to the associated PageViewradMPCapabilities.FindControl(type.AbilityType.Name).Controls.Add(tmpLiteral);radMPCapabilities.FindControl(type.AbilityType.Name).Controls.Add(radTree);