Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
297 views

Posted 52 minutes ago (permalink)

Hi,

I am learning the RADGrid control. The following code of page 459 does not work:

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 
 First, there's a problem with the namespace.  There is a squiggly line under the namespace explained as follows:

"Namespace or type specified in the Imports 'Telerik,WebControls' doesn't contain any public member or cannot be found.  Make sure the namespace or the type is defined and contains at least one public memeber.  Make sure the imported element name doesn't use any aliases."

So I guess that means that 'WebControls' is not a member of Telerik?

Next, Type 'GridHeaderItem' is not defined.

I deleted the 'Telerik.WebControls' namespace and used the 'Telerik.Web.UI' namespace.  I revised the code to:

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 

The application ran, but I can not see the Tool tips.  Is there a correction written somewhere for this?

Thanks!
Svetlina Anati
Telerik team
 answered on 16 Jan 2009
5 answers
371 views
Filtering not working on simple databind. Even when the filter tries to display it doesn't even show the no records template.  Code below.

<%@ 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> 
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    </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>  



Sebastian
Telerik team
 answered on 16 Jan 2009
2 answers
243 views
While outsourcing for a company (who has licenses for Telerik's Ajax components) I did some research on RadComboBox and some enhancement of its functionality to support Paging, Multi-select (using checkboxes & mouse dragging), limit list by "show selected only", "select all", item templates on Web Service calls, Sorting, etc.

Now that my term is now due with them, given that some of the work I did was "hacks" into the client-side javascript code and I'm concerned that newer versions will override my work (causing the customer to have to do some more "hacking"), I was wondering whether it was possible to share some of this work with Telerik so that some of the features will (hopefully) be part of the upcoming versions of the components.

See ComboBox1 Image for RadComboBox with Multi-select with dragging of mouse, paging.
See ComboBox2 Image for same RadComboBox with multiple items selected, showing in Tooltip the items that were selected.
See ComboBox3 Image for same RadComboBox, all items selected, with Hay skin.

All of the above use Web Service with Item Templates.
Yaron Golan
Yaron
Top achievements
Rank 1
 answered on 16 Jan 2009
1 answer
91 views
Hello,
I need to implement the :
  • RadGrid1 (Agencias) filtered by RabComboBox2 (Municipios)
  • RabComboBox2 (Municipios) filtered by RadComboBox1 (Provincias),
  • Finally, edit/Insert/delete the RadGrid1 (Agencias)
 
But I can't filter the RadGrid1 after having filtered the combobox2 from combobox1. I followed the example: Funtionality > Multiple ComboBox,

I need some help for impleting this. Urgent!!!

Thanks for your help,
Jorge Saa-Gerbier

P.S. I'm a beginner in ASP.Net
Shinu
Top achievements
Rank 2
 answered on 16 Jan 2009
3 answers
585 views
hi there.. I am a little confused on how/why some of my ctrls are able to use the SelectedValue = '<%# Bind() %>' and some are not.

The one that can bind is using an ObjectDataSource within the ascx:

 

<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 

 

Veselin Vasilev
Telerik team
 answered on 16 Jan 2009
1 answer
137 views
Like
DataGroupColumn -= *function to get group column*, group column returns EmployeeID

But after the DataBind() event, the DataGroupColumn becomes OrderID, (OrderID was the first column in the datatable).
Ves
Telerik team
 answered on 16 Jan 2009
1 answer
78 views
Is there a way to get text/value that user manually typed into DateInput box when the value is invalid date? Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 16 Jan 2009
0 answers
103 views
i have a page, which has been divided into 2 frames, in 1st frame i have placed RadComboBox. i want when whenever my focus is on 2nd frame (which doesn't contain Raddropdown),  RadDropdown(in 1st frame) should get automatically closed if opened, which is not happening (it remains open). i have tried CloseDropDownOnBlur, but still its not working as per my requirement. Code as follows:-

<

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>

 

Gitanjali
Top achievements
Rank 1
 asked on 16 Jan 2009
3 answers
117 views
I've successfully created custom skins for the RadGrid and Panel controls by following the great examples provided.

However, I can't seem to find any way to change the color/image of the green check mark in various controls such as the RadGrid select columns.

If anyone could provide an example, I'd appreciate it.

Rod
Martin
Telerik team
 answered on 16 Jan 2009
0 answers
107 views
Hi

Based on your example I add nodes to my RadTreeView on demand when clicking expand node. And this looks great.  But later i use GetAllNodes on my RadTreeView and it only loads the 3 first nodes. When i debug my add function and observing the RadTreeView it does not seem to grow though I see the new nodes on the webpage.

So it seems like I only add the nodes visually??
Jeppe
Top achievements
Rank 1
 asked on 16 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?