| Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated |
| If e.Column.UniqueName = "Edit" Then e.Column.Visible = False |
| End Sub 'RadGrid1_ColumnCreated |
| function EnableBulkEdit(isEnabled) |
| { |
| var Toolbar = $find('<%= MainToolBar.ClientID %>'); |
| var BulkEditButton = Toolbar.findItemByText("Bulk Edit"); |
| var BulkApproveButton = Toolbar.findItemByText("Bulk Approve"); |
| if(isEnabled == true) |
| { |
| BulkEditButton.enable(); |
| if (BulkApproveButton != null) |
| { |
| BulkApproveButton.enable(); |
| } |
| } |
| else |
| { |
| BulkEditButton.disable(); |
| if (BulkApproveButton != null) |
| { |
| BulkApproveButton.disable(); |
| } |
| } |
| } |
| var currentCostCenters = new Array(); |
| function CostCenterSelected(sender, args) |
| { |
| // get the ID of the cost center from the rad grid row. |
| var ccID = args.getDataKeyValue("CostCenterItemID"); |
| var addToCollection = true; |
| // see if the item is already in the collection. Don't add it if already in collection. |
| for(i=0;i<currentCostCenters.length;i++) |
| { |
| if(currentCostCenters[i]==ccID) |
| { |
| addToCollection=false; |
| break; |
| } |
| } |
| // add the item to the selected cost centers |
| if(addToCollection == true) |
| { |
| var nextItem = currentCostCenters.length; |
| currentCostCenters[nextItem] = ccID; |
| } |
| EnableBulkEdit(currentCostCenters.length>0); |
| } |
| function CostCenterUnselected(sender, args) |
| { |
| // get the ID of the cost center from the rad grid row. |
| var ccID = args.getDataKeyValue("CostCenterItemID"); |
| for(i=0;i<currentCostCenters.length;i++) |
| { |
| if(currentCostCenters[i]==ccID) |
| { |
| currentCostCenters[i] = ''; // Set to an empty string |
| currentCostCenters.sort(); // Sort the array to place the string at the beginning |
| currentCostCenters.shift(); // Shift the array to remove the first element |
| break; |
| } |
| } |
| EnableBulkEdit(currentCostCenters.length>0); |
| } |
| <telerik:RadToolBar ID="MainToolBar" runat="server" Skin="Office2007" AutoPostBack="true"> |
| <ExpandAnimation Type="OutQuad" Duration="300" /> |
| <CollapseAnimation Type="OutQuad" Duration="300" /> |
| <Items> |
| <telerik:RadToolBarDropDown runat="server" Text="Permissions" ImageUrl="~/Images/lock.gif" |
| OnLoad="CheckForPortalAdmin"> |
| <Buttons> |
| <telerik:RadToolBarButton runat="server" Text="Funds" ToolTip="Set permissions for the various funds in the system." |
| ImageUrl="~/Images/fund.gif" CommandName="FundPermissions"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton runat="server" Text="Units" ToolTip="Set access permissions for units in the system." |
| ImageUrl="~/Images/unit.gif" CommandName="UnitPermissions"> |
| </telerik:RadToolBarButton> |
| </Buttons> |
| </telerik:RadToolBarDropDown> |
| <telerik:RadToolBarButton runat="server" Text="Users" ImageUrl="~/Images/users.gif" |
| CommandName="Users" OnLoad="CheckForPortalAdmin" /> |
| <telerik:RadToolBarButton runat="server" IsSeparator="True" OnLoad="CheckForPortalAdmin"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton runat="server" Text="Bulk Edit" PostBack="false" ToolTip="Allows you to apply changes to multiple cost centers at a time." /> |
| <telerik:RadToolBarButton runat="server" Text="Bulk Approve" PostBack="false" ToolTip="Allows you to approve multiple cost centers at a time." |
| OnLoad="CheckForPortalAdmin" /> |
| <telerik:RadToolBarButton runat="server" Text="Export" ImageUrl="~/Images/export.gif" |
| CommandName="Export"> |
| </telerik:RadToolBarButton> |
| </Items> |
| </telerik:RadToolBar> |
| <telerik:RadGrid ID="CurrentCostCentersGrid" runat="server" Skin="Office2007" AllowMultiRowSelection="True" |
| AllowMultiRowEdit="True" ShowGroupPanel="True" AllowPaging="True" DataSourceID="DataSourceUnits" |
| GridLines="Horizontal" AutoGenerateColumns="False" PageSize="50" ShowFooter="true" |
| Width="100%"> |
| <ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowColumnsReorder="true" |
| AllowExpandCollapse="true"> |
| <Selecting AllowRowSelect="true" /> |
| <ClientEvents OnRowSelected="CostCenterSelected" OnRowDeselected="CostCenterUnselected"/> |
| </ClientSettings> |
| <GroupPanel Enabled="true" Text="Groups"> |
| </GroupPanel> |
| <PagerStyle Mode="NextPrevAndNumeric" NextPageText="Next" PrevPageText="Previous" /> |
| <MasterTableView ShowGroupFooter="true" ShowFooter="true" DataSourceID="DataSourceUnits" |
| DataKeyNames="CostCenterItemID" CommandItemDisplay="None" ClientDataKeyNames="CostCenterItemID"> |
| <CommandItemTemplate> |
| <asp:Button ID="BulkApproveButton" runat="server" Text="Bulk Approve" /> |
| </CommandItemTemplate> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Visible="False"> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridClientSelectColumn> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> |
| </telerik:GridClientSelectColumn> |
| <telerik:GridBoundColumn HeaderText="Fund" DataField="FundID" AllowFiltering="true" |
| DataType="System.Int32" SortExpression="FundID" ReadOnly="True" UniqueName="FundID"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Unit" DataField="UnitID" AllowFiltering="true" |
| DataType="System.Int32" SortExpression="UnitID" ReadOnly="True" UniqueName="UnitID"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Line Item" DataField="LineItemID" AllowFiltering="true" |
| DataType="System.Int32" SortExpression="LineItemID" ReadOnly="True" UniqueName="LineItemID"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Category" EmptyDataText="&nbsp;" HeaderText="Category" |
| SortExpression="Category" UniqueName="Category"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="false" Width="115px" |
| Font-Size="10px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Description" DataField="LineItemName" SortExpression="LineItemName" |
| UniqueName="Description" ReadOnly="true" Groupable="false"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Wrap="true" Width="150px" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Previous Budget" DataField="PreviousBudget" |
| AllowFiltering="true" DataType="System.Decimal" SortExpression="PreviousBudget" |
| UniqueName="PreviousBudget" DataFormatString="{0:C}" ReadOnly="True" Aggregate="Sum" |
| FooterAggregateFormatString="{0:C}" Groupable="false"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> |
| <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Previous Actual" DataField="PreviousActual" |
| DataType="System.Decimal" SortExpression="PreviousActual" UniqueName="PreviousActual" |
| DataFormatString="{0:C}" Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> |
| <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Current Budget" DataField="CurrentBudget" DataType="System.Decimal" |
| SortExpression="CurrentBudget" UniqueName="CurrentBudget" DataFormatString="{0:C}" |
| Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> |
| <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Current YTD" DataField="CurrentYTD" DataType="System.Decimal" |
| SortExpression="CurrentYTD" UniqueName="CurrentYTD" DataFormatString="{0:C}" |
| Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> |
| <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Proposed Budget" DataField="ProposedBudget" |
| DataType="System.Decimal" SortExpression="ProposedBudget" UniqueName="ProposedBudget" |
| Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" DataFormatString="{0:C}"> |
| <ItemStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" Width="100px" /> |
| <FooterStyle VerticalAlign="Top" HorizontalAlign="Right" Wrap="false" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="StatusName" EmptyDataText="&nbsp;" HeaderText="Status" |
| SortExpression="StatusName" UniqueName="StatusName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn HeaderText="Modify Date" DataField="ModifyDate" DataType="System.DateTime" |
| SortExpression="ModifyDate" UniqueName="ModifyDate" Groupable="false" /> |
| </Columns> |
| <DetailTables> |
| <telerik:GridTableView DataSourceID="DataSourceHistory" AutoGenerateColumns="false" |
| ShowHeader="false" GroupsDefaultExpanded="false" NoDetailRecordsText="No notes currently exist for this item" |
| Width="100%" CommandItemDisplay="Top" Frame="Void"> |
| <CommandItemTemplate> |
| <telerik:RadToolBar ID="DetailsToolbar" runat="server" Skin="Office2007" Width="100%" |
| AutoPostBack="true" OnClientLoad="SetNestedToolbar"> |
| <ExpandAnimation Type="OutQuad" Duration="150" /> |
| <CollapseAnimation Type="InQuad" Duration="150" /> |
| <Items> |
| <telerik:RadToolBarButton Text="Make Request" CommandName="MakeRequest" ImageUrl="Images/request.gif"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton IsSeparator="true"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Approval" CommandArgument="Approval" OnLoad="CheckForPortalAdmin"></telerik:RadToolBarButton> |
| </Items> |
| </telerik:RadToolBar> |
| </CommandItemTemplate> |
| <ParentTableRelation> |
| <telerik:GridRelationFields MasterKeyField="CostCenterItemID" DetailKeyField="ItemID" /> |
| </ParentTableRelation> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <strong> |
| <%#Eval("CreateDate","{0:d}") %> <%#Eval("CreateDate","{0:t}") %> - <%#Eval("UserName")%>:</strong> <br /> |
| <br /> |
| <%#Eval("NoteText")%><br /> |
| <br /> |
| <strong style="color: Red">Requested Increase:</strong> |
| <%#Eval("RequestedBudget", "{0:C}")%> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </telerik:GridTableView> |
| </DetailTables> |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <PagerTemplate> |
| Item Description |
| </PagerTemplate> |
| </MasterTableView> |
| <FilterMenu EnableTheming="True" Skin="Gray"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |
<telerik:RadGrid id="RadGrid1" runat="server" RegClient="true"
AllowPaging="True" AllowSorting="True" AllowAutomaticUpdates="true" OnUpdateCommand="updateDrips" GridLines="None" PageSize="20" Width="100%" EnableEmbeddedSkins="false" Skin="Elevate" >
<ClientSettings AllowColumnHide="True" Selecting-AllowRowSelect="true" AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true">
<Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="true"></Resizing>
<Scrolling AllowScroll="true" />
<ClientEvents OnRowDblClick="editDrips" OnRowSelected="enableEdit" OnRowDeselected="disableEdit" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="false" ClientDataKeyNames="touchID, campaignID" EditMode="InPlace">
<PagerStyle Visible="false" />
<Columns>
<telerik:GridBoundColumn UniqueName="touchID" DataField="touchID" Display="false" />
<telerik:GridBoundColumn UniqueName="campaignID" DataField="campaignID" Display="false" />
<telerik:GridBoundColumn UniqueName="description" DataField="description" HeaderText="Touches">
<ItemStyle Wrap="false" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="date" DataField="date" HeaderText="Date" ItemStyle-Width="150" DataFormatString="{0:MM/dd/yyyy}" />
<telerik:GridBoundColumn UniqueName="daysOffset" DataField="daysOffset" HeaderText="Offset" ItemStyle-Width="150" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
.JS
function
editDrips(sender, args) {
editedRow = args.get_itemIndexHierarchical();
$find("<% RadGrid1.ClientID %>").get_masterTableView().editItem(editedRow);
}
body
{
font-family: Verdana !important;
font-size: 10pt !important;
}
In my code I have my RadEditor declared as follows:
<
telerik:RadEditor ID="RadHTMLContent" runat="server" Height="400" ToolbarMode="Default"
Font-Names="Verdana" Font-Size="11pt" EditModes="Design,Html" Skin="Office2007" ContentAreaCssFile="~/EditorContentAreaStyles.css"
StripFormattingOptions="AllExceptNewLines" Width="95%" ToolsFile="~/RadEditorMenu/RadToolBar.xml"
EnableViewState="False">
</telerik:RadEditor>

| protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| switch (e.CommandName) |
| { |
| case "New": hdnForceBlankShiftForEmployeeID.Value = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmployeeID"].ToString(); |
| RadGrid1.Rebind(); |
| Hashtable dictionary = new Hashtable(2); |
| dictionary.Add("EmployeeID",Convert.ToInt32(hdnForceBlankShiftForEmployeeID.Value)); |
| dictionary.Add("EmployeeShiftID",System.DBNull.Value); |
| GridDataItem[] myArray = RadGrid1.MasterTableView.FindItemsByKeyValues(dictionary); |
| if (myArray.Length> 0) |
| { |
| myArray[0].Edit = true; |
| } |
| break; |
| } |
| } |
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|

inserted into the html of my pages in Visual Studio 2008
I delete them and after a while they suddenly appear again for no reason. Heres the latest bunch !
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage id="RadMultiPage1" runat="server" SelectedIndex="1"> |
| <telerik:RadPageView id="Pageview1" runat="server"> |
| <telerik:RadTextBox ID="RadTextBoxArtistNotes" runat="server" Height="410px" |
| Skin="Vista" Width="550px"></telerik:RadTextBox></telerik:RadPageView> |
| <telerik:RadPageView id="Pageview2" runat="server"> |
| <telerik:RadTextBox ID="RadTextBoxArtistRider" runat="server" Height="410px" |
| Skin="Vista" Width="550px"></telerik:RadTextBox></telerik:RadPageView> |
| </telerik:RadMultiPage> |
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
</telerik:RadStyleSheetManager>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<input type="file" runat="server" id="inputFile"/>
<asp:button ID="buttonSubmit" runat="server" Text="Submit" OnClick="buttonSubmit_Click" CssClass="RadUploadButton" />
<telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
<telerik:RadProgressArea id="RadProgressArea1" runat="server" />