Hi,
We are binding the dataset to grid whose columns are auto generated (AutoGenerateColumns="true")
Column data format string can be either "$" or "%" which is depedent on combo selection format string is bound on column created event.
Initally data is shown with "%", changed the combo selection "$" on click of button format string is not changed to "$".
| protected void radMainGrid_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) |
| { |
| if (e.Column is GridBoundColumn) |
| { |
| GridBoundColumn boundColumn = e.Column as GridBoundColumn; |
| if (boundColumn.DataField.Equals("Name")) |
| { |
| if(radView.SelectedValue != "0") |
| boundColumn.FooterText = "Grand Total"; |
| } |
| else if(!boundColumn.DataField.Equals("ID")) |
| { |
| if (radView.SelectedValue != "0") |
| { |
| boundColumn.Aggregate = GridAggregateFunction.Sum; |
| boundColumn.DataFormatString = "{0:C0}"; |
| } |
| else |
| { |
| boundColumn.DataFormatString = "{0:P0}"; |
| } |
| } |
| } |
| } |
| <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Height="150px" Width="450px" TreePaneWidth="122px" VisibleControls="Toolbar,ContextMenus,Grid" |
| EnableCreateNewFolder="False" ExplorerMode="Default"></telerik:RadFileExplorer> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| //CONFIGURE EVERYTHING |
| RadFileExplorer1.Configuration.UploadPaths = new string[] { virtualPath }; |
| RadFileExplorer1.Configuration.ViewPaths = new string[] { virtualPath }; |
| RadFileExplorer1.Configuration.DeletePaths = new string[] { virtualPath }; |
| RadFileExplorer1.InitialPath = virtualPath; |
| //Remove some buttons |
| RadToolBarButton backBtn = null; |
| RadToolBarButton forwardBtn = null; |
| foreach (RadToolBarButton btn in RadFileExplorer1.ToolBar.Items) |
| { |
| if (btn.Value == "Back") |
| backBtn = btn; |
| else if (btn.Value == "Forward") |
| forwardBtn = btn; |
| } |
| if (backBtn != null) |
| RadFileExplorer1.ToolBar.Items.Remove(backBtn); |
| if (forwardBtn != null) |
| RadFileExplorer1.ToolBar.Items.Remove(forwardBtn); |
| //set the props for the upload control |
| SetUploadProperties(); |
| RadFileExplorer1.Grid.MasterTableView.NoDetailRecordsText = "Upload files using right mouse click or the upload button."; |
| } |
| } |
| private void SetUploadProperties() |
| { |
| string[] extensionsSearch = new string[XMLFileExtensions.AllowedFileTypes.Count]; |
| for (int x = 0; x < XMLFileExtensions.AllowedFileTypes.Count; x++) |
| { |
| extensionsSearch[x] = "*." + XMLFileExtensions.AllowedFileTypes[x].FileExtension; |
| } |
| RadFileExplorer1.Configuration.SearchPatterns = extensionsSearch; |
| RadFileExplorer1.Configuration.MaxUploadFileSize = 10485760; |
| } |
I have a RadRotator in a user control that is being loaded dynamically via Ajax postback. There is a lot more levels of complexity but I don't believe that they are relevent. For instance the rotator is in a dock within a dockzone within a splitter inside of another splitter All of this within a master/content page.
My first problem is that on Ajax postback I get a javascript error: htmlfile: Could not set the rel property. Invalid property value. in a piece of code that is apparently moving <Link> tags into the <head> element.
The code is:
| i.rel="stylesheet" |
| .rrClipRegion .rrItemsList |
| { |
| float: left; |
| padding: 0; |
| margin: 0; |
| list-style: none !important; |
| } |
| .rrClipRegion .rrItemsList li |
| { |
| float: left; |
| } |
| /* For vertical carousel, not set, width defaults to auto */ |
| /* Note if you explicitly set width to auto, this might cause */ |
| /* problems with Safari */ |
| .RadRotator ul.rrVerticalList |
| { |
| padding: 0; |
| margin: 0; |
| list-style: none !important; |
| } |
| .RadRotator .rrVerticalList li |
| { |
| float: none; |
| margin-bottom: 0px; |
| /* Force the LI to respect the HEIGHT specified */ |
| overflow: hidden; |
| display: block; |
| } |