Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
113 views

I have a problem with the onitemclick event.

It will not fire for some reason.

Below the control page

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="verticalmenu.ascx.vb" Inherits="Structures_verticalmenu" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<telerik:RadAjaxManagerProxy ID="ProxyRadMenuvert1" runat="server">  
</telerik:RadAjaxManagerProxy> 
 
<telerik:RadPanelBar runat="server" ID="panelmenu1" Width="100%" OnItemClick="RadPanelBar1_ItemClick" /> 
 
 
<asp:label Runat="server" ID="Label1" Text="Standard"></asp:label> 
 


Code behind it

Imports System  
Imports System.Data  
Imports System.Data.SqlClient  
Imports Telerik.Web.UI  
 
 
 
Partial Class Structures_verticalmenu  
    Inherits System.Web.UI.UserControl  
 
    Private Sub BindToDataSet()  
 
        Dim adapter As New SqlDataAdapter("SELECT * FROM TblPages", _  
            ConfigurationManager.ConnectionStrings("Varodb").ConnectionString)  
 
        Dim Menu As New DataSet()  
 
        adapter.Fill(Menu)  
 
        panelmenu1.DataTextField = "Pagename" 
        panelmenu1.DataFieldID = "ID" 
        panelmenu1.DataFieldParentID = "PageID" 
 
 
 
        panelmenu1.DataSource = Menu  
        panelmenu1.DataBind()  
 
    End Sub 
 
 
    Protected Sub RadPanelBar1_ItemClick(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadPanelBarEventArgs)  
 
        Label1.Text = "Clicked panel item - " + e.Item.Text  
    End Sub 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
 
        If Not Page.IsPostBack Then 
            BindToDataSet()  
        End If 
 
 
    End Sub 
 
End Class 
 

Anyone has a suggestion ?
David Blok
Top achievements
Rank 1
 answered on 04 Dec 2009
2 answers
89 views
HI, How could i implement merge columns header using telerik:gridboundcolumns 'cause i need the agreggate function of this kind of columns.

Regards
Gino
Shinu
Top achievements
Rank 2
 answered on 04 Dec 2009
1 answer
85 views
Hi there

Is there any possibility for the FastNavigation thing in the ASP.NET AJAX Calendar to look like the Silverlight calendar? I really like the way the Silverlight control is designed, and it looks like the one from the AjaxControlToolKit, which is much faster and more usable than the one in the current ASP.NET AJAX Calender control.

Sincerely
Kenneth
Dimo
Telerik team
 answered on 04 Dec 2009
1 answer
64 views
Hello,
I'm using RadGrid in my SharePoint web part. When i open the web part after changing the settings of the web part the skin for the grid looks plain without any skin. But if i refresh the page the skin is getting applied. I've been fighting with this for the past 4 days. Any help provided would be highly appreciated.

Thanks.
NLV
Top achievements
Rank 1
 answered on 04 Dec 2009
1 answer
126 views
I am using the Radlist view to hold our internal company's catalog. Within the catalog I have 3 buttons. One for adding to cart, viewing larger image, and seeing a components list. I am using the select command for cart, editing command for larger image, and update command for components list. 

If there is a better way please let me know.

My issue is when I select to see the larger image I cannot seem to use the .SelectValue to get the items ID within ItemEditing.  When I use the add to cart it works fine (Since this button is using the select command). What other way can I do this using VB and no javascript?

Thanks 
Iana Tsolova
Telerik team
 answered on 04 Dec 2009
3 answers
143 views
hi,

i have an approach to make my profile.aspx page faster. That page includes a panelbar with 6 different panelitems, each containing at least one grid gathering information from the database. I thought to make the page faster. i dont query the database for the grids and hold all panelitems collapsed except of the top/first panelitem.

so if the user wants to see the information of a panelitem, following mechanic comes into play:

the grid in the panelitem is still created in and configured as stated in my aspx code file. It just gets no DataSource:

protected void RadGridRelations_NeedDatasource(object source, GridNeedDataSourceEventArgs e) 
            RadPanelItem panelItem = panelBarProfile.FindItemByValue("relations"); 
 
            if (panelItem.Expanded) 
            { 
                RadGrid radGrid = source as RadGrid; 
                radGrid.DataSource = BLDocument.GetAllRelatedDocumentsMultipleTimes(CacheHelper.Instance.Document.id, _userId); 
                radGrid.MasterTableView.NoMasterRecordsText = LanguageHelper.GetText("noRelationsText"); 
            } 

the grid is only allowed to load the data from the database if the panelitem got expanded.

hint: dont forget to ajaxify the panelbar and the grid.

another feature is that if the panelitem gets collapsed and expanded it gets the data from server again so its uptodate.

how u find it? please tell me if thats a good approach.

thx, mario
Veselin Vasilev
Telerik team
 answered on 04 Dec 2009
3 answers
155 views
How can i get a attribute from the database ?
I see in the manuels for manual custom attributes but none from a database.

Database bind :

 
        Dim adapter As New SqlDataAdapter("SELECT * FROM TblPages", _  
            ConfigurationManager.ConnectionStrings("Varodb").ConnectionString)  
 
        Dim Menu As New DataSet()  
 
        adapter.Fill(Menu)  
        RadMenu1.DataTextField = "Pagename" 
        RadMenu1.DataFieldID = "ID" 
        RadMenu1.DataFieldParentID = "PageID" 
 
        RadMenu1.DataSource = Menu  
        RadMenu1.DataBind() 

Call
Protected Sub Click(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadMenuEventArgs)  
        Label1.Text = "ItemClick: " + e.Item.Text  
    End Sub 

How can i Call the ID field on the database ?
David Blok
Top achievements
Rank 1
 answered on 04 Dec 2009
14 answers
574 views
Hello,

I have a TextBox which could be a RadTextBox or an asp:TextBox.
When it is a RadTextBox and I set it's value on clientside using myBox.value="newtext", the value is not refreshed on display.
How to force redraw independently of he fact it is rad or not.

Thank you fr help.
CS
CSurieux
Top achievements
Rank 2
 answered on 04 Dec 2009
2 answers
971 views
Because width with '%' is not support on ie6, so I want to set width of listbox on client, but It seem to listbox has no method to set width.
lin
Top achievements
Rank 1
 answered on 04 Dec 2009
1 answer
119 views
Hi

I'm having a bit of trouble getting the spell checker to update my checked controls with their proper spelling. I've noticed that the correct values don't display until I click on the controls themselves, and have read that I need to use updateDisplayValue() to make the control display the corrected spelling, but when I call this function, it seems to do nothing. I have also hooked up a handler to the CheckFinished event, and am automatically submitting the page (ie. doing a postback), and the incorrect spelling is still there. How would I go about fixing this?

<telerik:RadSpell ID="rsSpell" runat="server" Skin="Office2007" ButtonType="None" /> 
spellCheck();  
$find("<%= rsSpell.ClientID %>").add_clientCheckFinished(SendSMSAfterSpell); 
//here we create a simple text source for the RadEditor control - used to get/set the text  
        //to spellcheck  
        function EditorTextSource(editor) {  
            this._editor = editor;  
        }  
        EditorTextSource.prototype =  
            {  
                get_text: function() {  
                    var text = this._editor.get_html(true);  
                    return text;  
                },  
 
                set_text: function(text) {  
                    this._editor.set_html(text);  
                }  
            }  
        //this function creates a composite text source for the RadSpell control (using a RadEditor  
        //and a TextBox). The content of all controls is checked at the same time.  
        function spellCheck() {  
            var elements = [new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtSCSDetails.ClientID %>")),  
                            new Telerik.Web.UI.Spell.HtmlElementTextSource($get("<%= txtMessage.ClientID %>"))];  
            var spellSource = new Telerik.Web.UI.Spell.MultipleHtmlElementsSource(elements);  
            var spell = $find("<%= rsSpell.ClientID %>");  
            spell.spellCheck(spellSource);  
        }  
 
        function SendSMSAfterSpell(sender, args) {  
            args.suppressCompleteMessage = true;  
 
            var text;  
            text = $find("<%= txtMessage.ClientID %>");  
            text.updateDisplayValue();  
 
            text = $find("<%= txtSCSDetails.ClientID %>");  
            text.updateDisplayValue();  
 
            SendMessage(); // this does the postback, which still sees the controls as having incorrect spelling  
        } 

Georgi Tunev
Telerik team
 answered on 04 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?