Posted 52 minutes ago (permalink)
| imports Telerik.WebControls |
| Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As |
| Telerik.WebControls.GridItemEventArgs) |
| 'Check for GridHeaderItem if you wish tooltips only for the header cells |
| If TypeOf e.Item Is GridHeaderItem Then |
| Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem) |
| headerItem("CreditRating").ToolTip = "CreditRating" |
| headerItem("PreferredVendorStatus").ToolTip = "PreferredVendorStatus" |
| headerItem("ActiveFlag").ToolTip = "ActiveFlag" |
| End If |
| End Sub |
| Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) |
| 'Check for GridHeaderItem if you wish tooltips only for the header cells |
| If TypeOf e.Item Is GridHeaderItem Then |
| Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem) |
| headerItem("CreditRating").ToolTip = "CreditRating" |
| headerItem("PreferredVendorStatus").ToolTip = "PreferredVendorStatus" |
| headerItem("ActiveFlag").ToolTip = "ActiveFlag" |
| End If |
| End Sub |
| <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucReportList.ascx.cs" |
| Inherits="uc_reporting_ucReportList" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <br /> |
| <div id="ReportLIstDiv"> |
| <asp:UpdatePanel ID="UpdatePanel3" runat="server"> |
| <ContentTemplate> |
| <table id="ContentTable"> |
| <tr> |
| <td colspan="3"> |
| <telerik:RadGrid ID="RadGridReportInbox" runat="server" Skin="Vista" OnSelectedIndexChanged="RadGridReportInbox_SelectedIndexChanged" |
| GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" PageSize="5" |
| AutoGenerateColumns="False" OnPageIndexChanged="RadGridReportInbox_PageIndexChanged" EnableLinqExpressions="False" GroupingSettings-CaseSensitive="false"> |
| <HeaderContextMenu EnableTheming="True"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </HeaderContextMenu> |
| <MasterTableView> |
| <Columns> |
| <telerik:GridButtonColumn CommandName="Select" Text="Select" UniqueName="Select"> |
| </telerik:GridButtonColumn> |
| <telerik:GridBoundColumn DataField="Name" FilterControlWidth="150px" HeaderText="Name" |
| UniqueName="Name"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Extension" FilterControlWidth="150px" HeaderText="Extension" |
| UniqueName="Extension"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="CreationTime" FilterControlWidth="150px" HeaderText="Creation Time" |
| UniqueName="Creation Time"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <NoRecordsTemplate> |
| No Records Found. |
| </NoRecordsTemplate> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| </MasterTableView> |
| <ClientSettings AllowColumnsReorder="True"> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| </telerik:RadGrid> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:UpdatePanel ID="UpdatePanel4" runat="server"> |
| <ContentTemplate> |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Vista" EnableDragAndDrop="True" |
| OnNodeDrop="RadTreeView1_NodeDrop"> |
| </telerik:RadTreeView> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </td> |
| <td> |
| |
| </td> |
| <td> |
| <asp:UpdatePanel ID="UpdatePanel1" runat="server"> |
| <ContentTemplate> |
| <asp:Panel ID="PanelRealTime" runat="server" BorderColor="#0000CC" |
| BorderStyle="Dotted" ToolTip="Drag and Drop Desired Report" Width="250px"> |
| Execute Real-Time Report |
| <br /> |
| <asp:Label ID="LabelSelectedReport" runat="server" Text=""></asp:Label> |
| </asp:Panel> |
| </ContentTemplate> |
| </asp:UpdatePanel> |
| </td> |
| <td> |
| </td> |
| </tr> |
| </table> |
| </ContentTemplate> |
| </asp:UpdatePanel> </div> |
| <telerik:RadComboBox ID="ComboDepartment" runat="server" |
| DataSourceID="CCentres" DataTextField="CC_desc" |
| DataValueField="CC_desc" SelectedValue='<%# Bind("department") %>'> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
| <asp:ObjectDataSource ID="CCentres" runat="server" SelectMethod="GetData" TypeName="CC2TableAdapters.Cost_centresTableAdapter"> |
| <SelectParameters> |
| <asp:SessionParameter DefaultValue="1" Name="Empid" SessionField="empid" Type="String" /> |
| </SelectParameters> |
| </asp:ObjectDataSource> |
the one that is not working is the following
| <telerik:RadComboBox ID="ComboStatus" SelectedValue='<%#Bind("status") %>' runat="server"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </telerik:RadComboBox> |
the combo status is being built using the following code from within the formview_onload Event.
| Protected Sub FormView1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.Load |
| If FormView1.CurrentMode = FormViewMode.Insert And Not IsPostBack Then |
| Dim Status As RadComboBox = FormView1.FindControl("ComboStatus") |
| Status.DataSource = functions.NameValues("status") |
| Status.Items.Add(New RadComboBoxItem("Select")) |
| Status.AppendDataBoundItems = True |
| Status.DataTextField = "Name" |
| Status.DataValueField = "Value" |
| Status.DataBind() |
| end if |
| End Sub |
My preference is to populate the boxes from code but still them bound to the formview.. is this possible?
thanks
mac
<
telerik:RadComboBox ID="cmbNewShortcut" runat="server" Width="100%"
Skin="Gray" MarkFirstMatch="false" HighlightTemplatedItems="True"
ShowToggleImage="True" CloseDropDownOnBlur="true" AllowCustomText="false" OnClientBlur="CloseDropdown" EnableLoadOnDemand="false">
<ItemTemplate>
<div>
<img src='Images/<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt="" />
<span ><%# DataBinder.Eval(Container, "Text") %></span>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem ImagePath="customer.jpg"
Text="Customer" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="contacts.png"
Text="Contact" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="supplier.jpg"
Text="Supplier" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="contract.jpg"
Text="Contract" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="product.png"
Text="Product" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="order.jpg"
Text="Order" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="admin.jpg"
Text="People" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="serialno.ico"
Text="Serial No" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="Cases.png"
Text="Case" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="task.jpg"
Text="Task" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="document.gif"
Text="Document" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="invoice.png"
Text="MRN" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="dc.png"
Text="Delivery Challan" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="installation.png"
Text="Installation" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="invoice.png"
Text="Invoice" Value="1002">
</telerik:RadComboBoxItem>
</Items>
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>