Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
163 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 Object, ByVal 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
589 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
983 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
125 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
4 answers
483 views
We want to have a drop down of 'equipment types'. This is a fairly big list so we would like to lazy load it. The issue we are having is if we do lazy load you can't restrict what they type.

Is there some kind of work around to get AllowCustomText =false with load on demand?
Simon
Telerik team
 answered on 04 Dec 2009
1 answer
105 views
hello..
i m using asp radio button with Rad controls.when i use RadFormDecorator On asp page.radio button disappear and when i remove Form Decorator it appear.for more detail see attached file.....
plz reply...
Georgi Tunev
Telerik team
 answered on 04 Dec 2009
6 answers
173 views
hello,

I have a multi-columns Radcombobox like  :
<telerik:RadComboBox  Width="556px"  ID="Exp_Code" runat="server" Height="190px" Skin="Sunset" 
                         MarkFirstMatch="true"  EnableLoadOnDemand="true" HighlightTemplatedItems="true" 
                        ItemRequestTimeout="1"  OnItemsRequested="Exp_Code_ItemsRequested" OnItemDataBound="Exp_Code_ItemDataBound" DataSourceID="SqlDataSource1" CollapseDelay="1" ExpandDelay="1">  
                        <HeaderTemplate> 
                            <ul> 
                             <li class="col1">Code</li> 
                             <li class="col2">Nom</li> 
                             <li class="col3">CP</li> 
                             <li class="col4">Ville</li> 
                             <li class="col5">Pays</li> 
                            </ul> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <ul> 
                             <li class="col1"><%# DataBinder.Eval(Container.DataItem, "Tiers") %></li>  
                             <li class="col2"><%# DataBinder.Eval(Container.DataItem, "Nom") %></li>  
                             <li class="col3"><%# DataBinder.Eval(Container.DataItem, "CP") %></li>  
                             <li class="col4"><%# DataBinder.Eval(Container.DataItem, "Ville") %></li>  
                             <li class="col5"><%# DataBinder.Eval(Container.DataItem, "Pays") %></li>  
                            </ul> 
                        </ItemTemplate> 
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
             </telerik:RadComboBox> 

In my function Page_Load(), I have this code :
Exp_Code.Text =  (Tiers + "      ").Substring(0, 12); 

I wish on the function Page_Load(), to go to search the corresponding item text like format in function Exp_Code_ItemDataBound :
protected void Exp_Code_ItemDataBound(object sender, RadComboBoxItemEventArgs e)  
        {  
            e.Item.Text = ((DataRowView)e.Item.DataItem)["Tiers"].ToString() + "        - " + ((DataRowView)e.Item.DataItem)["Nom"].ToString() + " - " + ((DataRowView)e.Item.DataItem)["Ville"].ToString();  
            e.Item.Value = ((DataRowView)e.Item.DataItem)["Tiers"].ToString() + "        - " + ((DataRowView)e.Item.DataItem)["Nom"].ToString() + " - " + ((DataRowView)e.Item.DataItem)["Ville"].ToString();  
        } 
Thank you for your help.

Angélique
Thierry Treunet
Top achievements
Rank 1
 answered on 04 Dec 2009
1 answer
271 views
Hi,

I have a listbox  that I am populating client side from a list of items that users entered. Initially there are no listbox items, but I set the height of the listbox to 200px. When I click inside the listbox when there are still no items , it displays a  javascript error 'undefined' is null or not an object.  I believe it happens on the _activateItem client side event  of the listbox, but Im not sure how to disable it when there are no items in the list.

Is there a way to trap the _activeitem event on client side or disable it when the list of items = 0 ?

Thanks,
rei
Genady Sergeev
Telerik team
 answered on 04 Dec 2009
1 answer
116 views
Hi,
 I have 9 tabs in TabStrip. It is not possible to display all the tabs in a single line. so i used 'ScrollChildres=true'. but i am facing problem that when last two tabs are selected they are not visible in view. i found javascript code to scroll tabs from http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/set-scrollposition-to-active-tab-on-page-load.aspx .
Just to test, i cerated a javascript function and calling on a button. but on clicking on the button it throws javascript error:
Error: 'getTab(...)' is null or not an object.

The code is given below:
I am using version 2009.2.826.35.

by default SelectedIndex is set to 7.

 <telerik:RadTabStrip ID="rdTab" runat="server" SelectedIndex="7" Width="930" ScrollChildren="true" 
            ScrollButtonsPosition="Right" AutoPostBack="true"> 
            <Tabs> 
                <telerik:RadTab Text="aaaaaaaaa 1111111" runat="server" /> 
                <telerik:RadTab Text="bbbbgggg 22222" runat="server" /> 
                <telerik:RadTab Text="ccccccc 9999999" runat="server" /> 
                <telerik:RadTab Text="dddddhhhhh 5555555" runat="server" /> 
                <telerik:RadTab Text="eeeeeeeeeeeee 22222222" runat="server" /> 
                <telerik:RadTab Text="ffffff 8888888" runat="server" /> 
                <telerik:RadTab Text="gggggggg Test 2222" runat="server" /> 
                <telerik:RadTab Text="hhhhhhh 111111" runat="server" /> 
                <telerik:RadTab Text="iiiiiiiiii 0000" runat="server" /> 
            </Tabs> 
        </telerik:RadTabStrip> 
        <input type="button" value="View" onclick="setSelectedTab()" /> 
 
        <script type="text/javascript"> 
            function setSelectedTab() 
            { 
                var obj = $find('<%= rdTab.ClientID %>'); 
                obj.get_selectedTab().scrollIntoView(); 
            }; 
        </script> 


Thanks,
Veselin Vasilev
Telerik team
 answered on 04 Dec 2009
2 answers
170 views
Hello,

I'm trying to create a drag / drop action that moves a string of text from a tree control to a radgrid.   The value from the tree control needs to be placed into a field in the datagrid, while the datagrid is in insert or edit mode.

I'm hoping for a simple client side solution.  I don't want to commit the row to the database especially in the event the user is not ready to save it yet.

I have hold of my tree value in a variable in javascript
    
            args.get_sourceNode().get_value()

I also have a hold of the control i want to update 

            var row = selectedRows[i];
            var cell = MasterTable.getCellByColumnUniqueName(row, "PageLink");
            alert(cell.innerHTML);

I just need the magic that will help me push the value into the cell.

Any ideas a MUCH appreciated.

Ralph


Sebastian
Telerik team
 answered on 04 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?