Hi
I'm using the telerik RadGrid. What I want to do is to add a row in the header of the grid to group the columns which has checboxes in it.
Currently I have the columns as GridCheckbox column in the masterview table.
Example:
<MasterTableView >
<Columns>
<telerik:GridCheckBoxColumn DataField="1" HeaderText="1" />
<telerik:GridCheckBoxColumn DataField="2" HeaderText="2" />
<telerik:GridCheckBoxColumn DataField="3" HeaderText="3" />
All I want to do is just add a customer header that show two or more column headers grouped togeather. I don't need to group any data.
like
header 1: group Header
header 2: 1 2 3
and then the values of the columns 1 2 and 3 in check boxes
How can i do this?
Does anyone have any idea?
<telerik:RadAjaxLoadingPanel ID="LocationsLoadingPanel" runat="server" Transparency="30" Skin="Vista"></telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="LocationsPanel" runat="server" LoadingPanelID="LocationsLoadingPanel"> <telerik:RadTreeView ID="LocationsTreeView" runat="server" EnableDragAndDrop="true" MultipleSelect="true" EnableDragAndDropBetweenNodes="true" AllowNodeEditing="true" OnContextMenuItemClick="LocationsTreeView_ContextMenuItemClick" OnClientContextMenuItemClicking="onClientContextMenuItemClicking" OnClientContextMenuShowing="onClientContextMenuShowing" OnNodeEdit="LocationsTreeView_NodeEdit" OnNodeDrop="LocationsTreeView_NodeDrop" OnClientNodeDropping="onNodeDropping" OnClientNodeDragging="onNodeDragging"> <ContextMenus> <telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server"> <Items> <telerik:RadMenuItem Value="Rename" Text="Rename ..." Enabled="true" ImageUrl="images/icons/edit_48.png" PostBack="false"> </telerik:RadMenuItem> <telerik:RadMenuItem IsSeparator="true"> </telerik:RadMenuItem> <telerik:RadMenuItem Value="addLocation" Text="Add Location" ImageUrl="images/icons/add_16.png"> </telerik:RadMenuItem> <telerik:RadMenuItem Value="editDetails" Text="Edit Details" PostBack="true" /> </Items> <CollapseAnimation Type="none" /> </telerik:RadTreeViewContextMenu> </ContextMenus> </telerik:RadTreeView> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Vista" DecoratedControls="All" /> <telerik:RadWindow ID="editDetails_RadWindow" runat="server" Modal="true" Behaviors="Close" Width="300px" Height="150px" DestroyOnClose="true" VisibleStatusbar="false" > <ContentTemplate> <table> <tr> <td><asp:Label ID="editDetailsIDlbl" Text="ID: " runat="server" /></td> <td><telerik:RadTextBox ID="editDetailsIDtxt" runat="server" Enabled="false"/> <asp:Label ID="InjectScript" runat="server" /></td> </tr> <tr> <td><asp:Label ID="editDetailsCostCtrLbl" Text="Cost Center:" runat="server" /></td> <td><telerik:RadTextBox ID="editDetailsCostCtrTxt" runat="server" EmptyMessage="Enter Cost Center" /> </td> </tr> <tr> <td><asp:Label ID="editDetailsAuxLocLbl" Text="Aux Location: " runat="server" /></td> <td><telerik:RadTextBox ID="editDetailsAuxLocTxt" runat="server" EmptyMessage="Enter Aux Location" /></td> </tr> <tr> <td colspan="2"><telerik:RadButton ID="editDetailsUpdateBtn" runat="server" Text="Update" CommandArgument="LocationID" OnClick="editDetailsUpdateBtn_Click" /></td> </tr> </table> </ContentTemplate> </telerik:RadWindow> <telerik:RadWindowManager ID="locationRadWindow" runat="server" /> </telerik:RadAjaxPanel>protected void LocationsTreeView_ContextMenuItemClick(object sender, RadTreeViewContextMenuEventArgs e) { RadTreeNode clickedNode = e.Node; switch (e.MenuItem.Value) { case "addLocation": RadTreeNode newLocation = new RadTreeNode(string.Format("New Location")); newLocation.Selected = true; newLocation.ImageUrl = clickedNode.ImageUrl; clickedNode.Nodes.Add(newLocation); clickedNode.Expanded = true; //update the number in the brackets if (Regex.IsMatch(clickedNode.Text, unreadPattern)) clickedNode.Text = Regex.Replace(clickedNode.Text, unreadPattern, "(" + clickedNode.Nodes.Count.ToString() + ")"); clickedNode.Font.Bold = true; //set node's value so we can find it in startNodeInEditMode // Add Location Record to Database string ParentID = clickedNode.Value; Guid ID = Guid.NewGuid(); string LocationID = ID.ToString(); // Used for naming the node after adding it newLocation.Value = LocationID; startNodeInEditMode(newLocation.Value); string Name = newLocation.Text; LocationsTreeView_AddLocation(ParentID, LocationID, Name); break; case "editDetails": // Get the location of the item were editing string LocID = clickedNode.Value; string CostCtr = ""; string AuxLoc = ""; // Get Cost Center and Aux Location if it exists SqlCommand locationDetailsCmd = new SqlCommand("SELECT CostCenter, AuxLocationID FROM dbo.Locations WHERE ID='" + LocID + "'", connection); connection.Open(); SqlDataReader rdr = locationDetailsCmd.ExecuteReader(); while (rdr.Read()) { if (!rdr.IsDBNull(0)) CostCtr = rdr.GetString(0).ToString(); if (!rdr.IsDBNull(1)) AuxLoc = rdr.GetString(1).ToString(); } connection.Close(); editDetails_RadWindow.VisibleOnPageLoad = true; // Set the RadWindow TextBox Values editDetailsCostCtrTxt.Text = CostCtr; editDetailsAuxLocTxt.Text = AuxLoc; editDetailsIDtxt.Text = LocID; locationRadWindow.Windows.Add(editDetails_RadWindow); break; } }protected void editDetailsUpdateBtn_Click(object sender, EventArgs e) { string AuxLocation = editDetailsAuxLocTxt.Text; string CostCenter = editDetailsCostCtrTxt.Text; string LocationID = editDetailsIDtxt.Text; SqlCommand editDetailsUpdateCmd = new SqlCommand("UPDATE dbo.locations SET CostCenter='" + CostCenter + "', AuxLocationID='" + AuxLocation + "' WHERE ID ='" + LocationID + "'", connection); connection.Open(); editDetailsUpdateCmd.ExecuteNonQuery(); connection.Close(); }<telerik:RadEditor runat="server" ID="CntntRadEditor" Height="500px" Width="100%" style="z-index:1000;" Content='<%# DataBinder.Eval( Container, "DataItem.Cntnt") %>' ToolsFile="~/Common/Controls/RadEditor/xml/CustomFullSetOfToolsForSecureTables.xml"> <Modules> <telerik:EditorModule Visible="false" /> </Modules> <ImageManager ViewPaths="~/P/Design/Contents/Guide" UploadPaths="~/P/Design/Contents/Guide" DeletePaths="~/P/Design/Contents/Guide" /> <DocumentManager ViewPaths="~/P/Design/Contents/Guide" UploadPaths="~/P/Design/Contents/Guide" DeletePaths="~/P/Design/Contents/Guide" /> </telerik:RadEditor>function onSaveNotificationPanel_Updating(sender, args) { var callbackresult = Sys.Serialization.JavaScriptSerializer.deserialize(args.get_content()); //Put the content into the panel args.set_cancel(true); args.set_content(callbackresult.Message);
}I can't seem to get a background of 100% width and height and a 30% opacity around the notification control. Is it even possible to do this? I realize it's just like a modal popup, but that's that point. I would love it if my notification controls could match the site more. Here is my code:
<style type="text/css"> .notificationContent { display: inline-block; zoom: 1; *display: inline; width: 160px; vertical-align: bottom; } .newBackground { width: 100%; height: 100%; background-color:#666; filter:alpha(opacity=30); opacity:0.7; -moz-opacity:0.7; } </style> <div class="newBackground"><telerik:RadNotification ID="RadNotification1" runat="server" Position="Center" Width="240" Height="100" OnClientShowing="OnClientShowing" OnClientHidden="OnClientHidden" LoadContentOn="PageLoad" AutoCloseDelay="60000" Title="Continue Your Session" TitleIcon="" Skin="Office2007" EnableRoundedCorners="true" Animation="Fade" CssClass="newBackground"> <ContentTemplate> <div class="notificationContent"> Time remaining: <span id="timeLbl">60</span> <telerik:RadButton Skin="Office2007" ID="continueSession" runat="server" Text="Continue Your Session" Style="margin-top: 10px;"> </telerik:RadButton> </div> </ContentTemplate> </telerik:RadNotification></div>
Public Sub RadTreeView1_NodeClick1(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick e.Node.Expanded = True e.Node.Enabled = False 'e.Node.ForeColor = Drawing.Color.Aqua If (e.Node.Value > 9000) Then Session("Page1ToNavigate") = e.Node.Text Response.Redirect("~/Page1.aspx") Else Session("Page2ToNavigate") = e.Node.Value Response.Redirect("~/Page2.aspx") End If End Sub
<telerik:RadPanelItem Text="Company View" Expanded="false" Font-Bold="true"> <Items> <telerik:RadPanelItem > <ContentTemplate> <telerik:RadTreeView ID="RadTreeView1" runat="server" DataSourceID="SqlDataSource4" DataFieldID="UserID" DataFieldParentID="ParentID" DataValueField="UserID" DataTextField="DisplayName" Skin="Outlook" > </telerik:RadTreeView> </ContentTemplate> </telerik:RadPanelItem>
