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

HI,

I have to implement Autocomplete functionality on RadComboBox, functionality is working fine. But on page load, I am facing Javascript error. Like ‘Telerik.Webcontrols.RadComboBox’ is null or not an object.

I am currently using IE7 with VS2008. And Version 2010.3.1317.35 of Telerik.Web.UI.dll file.

 

RadComboBox Declaration:
<RadCmbBox:RadComboBox HighlightTemplatedItems="true" ID="radComboSelectBaseModule"

Skin="WindowsXP_IT" Height="100px" Width="200px" runat="server" SkinsPath="~/RadControls/Combobox/Skins"

AllowCustomText="true" MarkFirstMatch="true" AutoPostBack="true" Enabled="true"

Visible="true" TabIndex="1" OnSelectedIndexChanged="radComboSelectBaseModule_SelectedIndexChanged"

enableitemcaching="True" enableloadondemand="True" onitemsrequested="radComboSelectBaseModule_ItemsRequested" >

 Javascript added for functionality:

<script type="text/javascript">

   

    var prototype = Telerik.WebControls.RadComboBox.prototype;

    var set_text = prototype.set_text;

    var propertyChange = prototype._onInputPropertyChange;

 

    prototype.set_text = function (value) {

        this._skipEvent = 0;

        set_text.call(this, value);

    };

 

    prototype._onInputPropertyChange = function () {

        if (!event.propertyName)

            event = event.rawEvent;

        if (event.propertyName == "value") {

            this._skipEvent++;

            if (this._skipEvent == 2)

                return;

            propertyChange.call(this);

        }

    };

    </script>

Please suggest if there is any other way to complete this functionality with version 2010.3.1317.35.

Thanks.

Nencho
Telerik team
 answered on 12 Dec 2012
5 answers
95 views
hello 
after a lot of hours i was finnaly created my custom skin to my menu.
but still i cant rid this grey strip on sub menus
someone can help me with that?
regards maor
p.s i attached picture of the menu and the style that i have created.
  <style type="text/css">
        .new
        {
             azimuth :#b0c4ff!important;
             background-color: #b0c4ff!important;
              border-color: rgb(176, 196, 255);
           background-image: url('Menu/rmSprite.png') !important;
           
        }
          
        .new:hover
        {
              
            background-color: #b0c4ff!important;
           background-image: url('Menu/rmSprite.png') !important;
             background-position: 100% -313px !important;
            border-bottom-width 0 0 0 0;
                border-color: rgb(176, 196, 255);
               
        }
        .new .rmRootGroup
      {
          background: Transparent !important;
           border-bottom-width 0 0 0 0;
                border-color: rgb(176, 196, 255);
      }
     
 
        .new a.rmLink:hover,
.new .rmGroup a.rmFocused,
.new .rmGroup a.rmSelected,
.new .rmGroup a.rmExpanded
{
    background-color :rgb(176, 196, 255);
    background-position: 0 -168px;
     
}
.new a.rmExpanded,
.new a.rmExpanded:hover
{
     background-color :rgb(176, 196, 255);
    background-position: 0 -168px;
     
}
.new .rmGroup .rmvertical
{
       
  
      }
 
        div.new {
 
     
 
}
          
    </style>
Kate
Telerik team
 answered on 12 Dec 2012
2 answers
101 views
Hello there,
does anybody know which controls have HtmlEncode?
I need that for a Dokumentation i make.
Thanks in advance,
Torben
Torben
Top achievements
Rank 1
 answered on 12 Dec 2012
2 answers
95 views
Hello,
it would be great to have a Control Overview where you can get a List of all Controls which match a sepcific parameter.
For example i am currently searching for a List of Controls which have the "HtmlEncode" field.
(If somwhere exists such a list i would be thankfull if someone could post a link to that.)
So if someone needs an overview of Controls which match a criterion, that nobody else would think of he or she could just use that Site.
Torben
Top achievements
Rank 1
 answered on 12 Dec 2012
1 answer
195 views
Hi,
I have added the "GridCalculatedColumn" in rad grid. where there are items in the grid, the calculated column is working fine. However when there are no items in grid, the gridcalculated column is giving the error as "operator * cannot be applied between string and string.".
Below is the code i have:

<telerik:GridTemplateColumn DataField="OrderQuantity" HeaderText="Order Quantity"
                    UniqueName="OrderQuantity" Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadTextBox ID="RadtxtOrderQuantity" runat="server" Text="">
                        </telerik:RadTextBox>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="RadtxtOrderQuantity" runat="server" Text='<%# Eval("OrderQuantity") %>'>
                        </telerik:RadTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <telerik:RadTextBox ID="RadtxtOrderQuantity" ReadOnly="true" runat="server" Text='<%# Eval("OrderQuantity") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
  
                <telerik:GridTemplateColumn DataField="UnitPrice" HeaderText="Unit Price" UniqueName="UnitPrice"
                    Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadNumericTextBox ID="RadtxtUnitPrice" runat="server" >
                        </telerik:RadNumericTextBox>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadNumericTextBox ID="RadtxtUnitPrice" runat="server" Text='<%# Eval("UnitPrice") %>'>
                        </telerik:RadNumericTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <telerik:RadNumericTextBox ID="RadtxtUnitPrice" Type="Currency" ReadOnly="true" runat="server" Text='<%# Eval("UnitPrice") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
  
                  
  
 <telerik:GridCalculatedColumn DataFormatString="{0:C}" DataType="System.Double" HeaderText="Extended Price"
                    UniqueName="ExtendedPrice" DataFields="OrderQuantity,UnitPrice" Expression="{0}*{1}"
                    FooterText="Total : " Aggregate="Sum">
                </telerik:GridCalculatedColumn>


How to modify the code to use when the grid has no items?
Thanks

Tsvetoslav
Telerik team
 answered on 12 Dec 2012
1 answer
49 views
When i set width of radgrid and set property AllowScroll="true" so it works Fine in Firefox and Chrome but in IE8 width is not set.
Code is below :

<telerik:RadGrid ID="grdAssetsIn" runat="server" OnLoad="grdAssetsIn_OnLoad" OnNeedDataSource="grdAssetsIn_NeedDataSource"
                                    SkinID="CR" GridLines="None" AllowPaging="True" EnableViewState="false" AutoGenerateColumns="False" OnItemDataBound="grdAssetsIn_ItemDataBound"
                                    AllowMultiRowSelection="true" Width="600px">
                                    <MasterTableView EnableViewState="true" Width="600px"  PageSize="10" EnableNoRecordsTemplate="true"
                                        DataKeyNames="AssetID" ClientDataKeyNames="AssetID" >
                                        <NoRecordsTemplate>
                                            <div style="text-align: left; >
                                                <asp:Label ID="lblEmptyMsg" runat="server" meta:resourcekey="lblEmptyMsg2Resource1"></asp:Label></div>
                                        </NoRecordsTemplate>
                                    </MasterTableView>
                                    <PagerStyle AlwaysVisible="True" />
                                    <ClientSettings EnableRowHoverStyle="true">
                                        <Selecting AllowRowSelect="True" />
                                        <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                                        <ClientEvents OnGridCreated="GridCreated" />
                                        <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
                                    </ClientSettings>
                                </telerik:RadGrid>
Pavlina
Telerik team
 answered on 12 Dec 2012
1 answer
50 views
HI,
I have added a GridCalculated column as below:
<telerik:GridCalculatedColumn DataFormatString="{0:C}" DataType="System.Double" HeaderText="Extended Price"
                    UniqueName="ExtendedPrice" DataFields="OrderQuantity,UnitPrice" Expression="{0}*{1}"
                    FooterText="Total : " Aggregate="Sum">
                </telerik:GridCalculatedColumn>

In the footer "Total : "  footer text is shown for the first time, when some postback happens the footer text is getting disappered. However the total amount is shown.  Only the the "Footer text" is not shown.

How to fix this?
Thanks
Pavlina
Telerik team
 answered on 12 Dec 2012
1 answer
113 views
Hi,

I calling this function from other page (gridview editclick event) .
 So then EditValue(refer code) has some value and binding in to treeview .

Private Sub BindTreeView(ByVal dt As DataTable, ByVal EditValue As String, ByVal searchedColumn As String)
        Try
            Dim siteData As New List(Of TreeViewCheckbox)()
            If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
 
                Dim i As Integer = 0
                Do While (i < dt.Rows.Count)
                    Dim row As DataRow = dt.Rows(i)
                    Dim srColumn As String = row(searchedColumn)
                    i = (i + 1)
                    siteData.Add(New TreeViewCheckbox(i + 1, 1, srColumn))
                Loop
            End If
 
            If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If
 
            tvChkSearchResult.DataTextField = "Text"
            tvChkSearchResult.DataFieldID = "ID"
            tvChkSearchResult.DataFieldParentID = "ParentID"
            tvChkSearchResult.DataSource = siteData
            tvChkSearchResult.DataBind()
 
            If (siteData.Count = 0) Then
                RadWindowManager1.RadAlert("No results found,Please try again.", 330, 100, Nothing, Nothing)
            Else
                tvChkSearchResult.ExpandAllNodes()
                HideControls(True)
            End If
        Catch ex As Exception
            RadWindowManager1.RadAlert(ex.Message, 330, 100, Nothing, Nothing)
        End Try
 
    End Sub

Here adding in to siteData ...
If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If

Once datasource set by sitedata then I need to call event to fillup other 3 textboxes values that based on node value selected(edit value).

How I can do fill up textboxes ? please help me on this.

Thanks in advance ..
Boyan Dimitrov
Telerik team
 answered on 12 Dec 2012
1 answer
94 views
Hi,

I have added treeview in my aspx page like this..
  <asp:TableCell CssClass="dfv">
   <telerik:RadTreeView ID="tvChkSearchResult" runat="server" OnNodeClick="tvChkSearchResult_NodeClick"
    AutoPostBack="True" Width="300px" Height="200px" CheckBoxes="True" TriStateCheckBoxes="true"
 CheckChildNodes="true">
  </telerik:RadTreeView>
</asp:TableCell>

and binding here ...
Dim siteData As New List(Of TreeViewCheckbox)()
            If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
 
                Dim i As Integer = 0
                Do While (i < dt.Rows.Count)
                    Dim row As DataRow = dt.Rows(i)
                    Dim srColumn As String = row(searchedColumn)
                    i = (i + 1)
                    siteData.Add(New TreeViewCheckbox(i + 1, 1, srColumn))
                Loop
            End If
 
            If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If
 
            tvChkSearchResult.DataTextField = "Text"
            tvChkSearchResult.DataFieldID = "ID"
            tvChkSearchResult.DataFieldParentID = "ParentID"
            tvChkSearchResult.DataSource = siteData
            tvChkSearchResult.DataBind()


Now I would like to fill up values in to textboxes that is based on selection on treeview.

but these events are not firing..

Protected Sub tvChkSearchResult_NodeCheck(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvChkSearchResult.NodeCheck
       If tvChkSearchResult.SelectedNode.Checked Then
           Dim s As String = ""
       End If
   End Sub
 
   Protected Sub tvChkSearchResult_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvChkSearchResult.NodeClick
       If tvChkSearchResult.SelectedNode.Checked Then
           Dim s As String = ""
       End If
   End Sub

Please help me on how to fire events ?

Thanks in advance..
Boyan Dimitrov
Telerik team
 answered on 12 Dec 2012
1 answer
89 views
So for instance when someone selects an action that is handled by the server side node edit handler it works fine right then.  But if you susbsequently click refresh in the browser (IE8, IE9) it fires the exact same event again.  Not a very desirable behavior.

I've tried resetting the __EVENTTARGET and __EVENTARGUMENT values, but that doesn't work.  I've seen references to using $.ajaxSetup({cache:false});  to prevent that, but I'm not sure what Telerik's equivalent is.
Bozhidar
Telerik team
 answered on 12 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?