Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hi guys,

I am using a RadListBox inside the ItemTemplate of a RadListBox. Sometimes when selecting, reordering or deleting an Item from the inner ListBox, a javascript error is thrown: "Microsoft JScript runtime error: 'f.getItem(...)' is null or not an object".

This happens in the Telerik javascript line: 

d.each(

this._selectedIndices,function(){if(this!=e){f.getItem(this)._setSelected(false);

What it seems to me, is that it is trying to deselect an item from the outer RadListBox, which does not exist.

Short of me adding a null check to your javascript library, can you suggest a way to resolve this problem?

NOTE: I am using Q1 2010 release.

Thanks,

Ben.

My code is:

 

 

<telerik:RadListBox ID="lbSelectedTeamStaff"

 

 

Width="300px"

 

 

runat="server"

 

 

AllowDelete="True"

 

 

AllowReorder="True"

 

 

AutoPostBackOnReorder="True">

 

 

 

 

 

<ButtonSettings ReorderButtons="Common" />

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<div class="ComboTemplate">

 

 

 

 

 

<strong>

 

 

 

 

 

<asp:Label ID="lblSelectedTeamName" runat="server"></asp:Label>

 

 

 

 

 

</strong>

 

 

 

 

 

<br />

 

 

 

 

 

<div id="rosterSelectedStaff" class="ComboDetails">

 

 

 

 

 

<telerik:RadListBox ID="lbSelectedStaff" runat="server" AllowDelete="True"

 

 

AllowReorder="True" BorderStyle="None" BorderWidth="0px"

 

 

EnableDragAndDrop="true" >

 

 

 

 

 

<ButtonSettings ReorderButtons="Common" ShowDelete="true" ShowReorder="False" />

 

 

 

 

 

 

</telerik:RadListBox>

 

 

 

 

 

</div>

 

 

 

 

 

</div>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:RadListBox>

 

Yana
Telerik team
 answered on 25 Mar 2010
2 answers
267 views
Hello,
In the codebehind we disabled the ComboBox and set a selected item. Via JavaScript we want to change the selected item via:
function winDialogCallbackControleren(radWindow, returnValue) {  
  if (returnValue != "-1") {  
    var combobox = $find("<%=rcbDocumentStatus.ClientID %>");  
    var item = combobox.findItemByValue(returnValue);  
    if (item) {  
      item.select();  
    }  
  }  
} 
But it didn't succeed. The already selected item (from the codebehind) remains unchanged. What are we doing wrong?
With friendly greetings,
Pieter
From The Netherlands
Pieter
Top achievements
Rank 1
 answered on 25 Mar 2010
1 answer
120 views
I have a splitter pane which contains a loading pane and ajaxified asp.net panel. The panel contains some length content. I want the loading panel to cover the asp.net panel when an ajax update occurs. This works, but the loading panel appears to display outside of the splitter pane. (it extends below the bottom edge of the splitter pane) My markup is as follows:

<telerik:RadSplitter ID="rsReport"   
                                                                runat="server"   
                                                                Width="100%" 
                                                                Height="100%" 
                                                                Orientation="Horizontal"   
                                                                ResizeWithParentPane="False"   
                                                                ResizeWithBrowserWindow="True" 
                                                                BorderSize="0" 
                                                                VisibleDuringInit="False" 
                                                                Skin="Windows7"   
                                                                HeightOffset="8" 
                                                                 >   
                                                                     
                                                <telerik:radpane runat="server" id="rtbPane" Scrolling="None" Width="100%" Height="32" Locked="True">  
                                                    toolbar which initiates ajax updates of pnlReport                                                </telerik:radpane> 
                                                <telerik:radpane runat="server" id="rcPane" Scrolling="both" Width="100%" Height="100%"   
                                                    <telerik:RadAjaxLoadingPanel id="lpReport" Runat="server" Transparency="8" BackColor="#DFE9F5"><asp:Image id="Image340" runat="server" AlternateText="Loading..." BorderWidth="0px" ImageUrl="~/global/images/loading2.gif" style="margin-top:200px;"></asp:Image></telerik:RadAjaxLoadingPanel> 
                                                    <asp:Panel id="pnlReport" runat="Server" style="padding:4px;">  
                                                        my lengthy content                                                    </asp:Panel> 
                                                </telerik:radpane> 
                                            </telerik:RadSplitter>  

Anyone know how to keep the loading panel contained within the splitter pane?
Dimo
Telerik team
 answered on 25 Mar 2010
1 answer
134 views
Hi. I'm using the AutoGenerateHierarchy to create some nested tables. I've basically copied the example in the demos section and everything is working great. I'm wanting to hide and format some columns but don't know the names of the nested grids because they are automatically generated. How do I hide or format a specific column in a specific nested grid? Thanks.

Daniel
Shinu
Top achievements
Rank 2
 answered on 25 Mar 2010
1 answer
104 views
Hi,

Here i got error..
I had create Treeview using Component Art but once i right click to add or delete the node the error will come out like this.
----"Error: 'null' is null or not an object"---

Thanks

Bibi
Daniel
Telerik team
 answered on 25 Mar 2010
1 answer
139 views
Hi,
I'm using a RadTreeView:

<telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="CompetitionID" 
            DataTextField="Description"  
            DataValueField="CompetitionID"  
            CheckChildNodes="True"> 
</telerik:RadTreeView> 

I filled in all the root nodes
When I try to expand a node in order to populate that node "on demand", I want to have to node in order to find out its id and its position in the tree:

Protected Sub RadTreeView1_NodeExpand1(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeExpand 
        PopulateNodeOnDemand(e, TreeNodeExpandMode.ServerSideCallBack) 
End Sub 
 


I see that the RadTreeNodeEventArgs "e" is empty. No nodes in.


Can someone tell me what's the problem?
Thanks in advance
Veronica
Telerik team
 answered on 25 Mar 2010
1 answer
125 views
My situation is that I have a RadListView with RadDataPager, to display a bunch of calendars. I set the datasource of the RadListView in the code-behind and everything loads correctly. The problem is that the paging functionality does not work. I've created test page that replicates my issue.

My ASPX page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
        <telerik:RadListView ID="lvItems" runat="server" AllowPaging="true"> 
            <LayoutTemplate> 
                <telerik:RadDataPager ID="dpTopPager" runat="server" PagedControlID="lvItems" PageSize="7" 
                    Skin="Office2007"> 
                    <Fields> 
                        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="10" /> 
                    </Fields> 
                </telerik:RadDataPager> 
                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder> 
            </LayoutTemplate> 
            <ItemTemplate> 
                <div> 
                    <%#DataBinder.Eval(Container, "DataItem.Value") %> 
                </div> 
            </ItemTemplate> 
        </telerik:RadListView> 
    </div> 
    </form> 
</body> 
</html> 
 

The code-behind:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
public partial class Test : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            Dictionary<int, int> items = new Dictionary<int, int>(); 
 
            for (int i = 0; i < 23; i++) 
            { 
                items.Add(i, i); 
            } 
 
            lvItems.DataSource = items.ToList(); 
            lvItems.DataBind(); 
        } 
    } 
} 
 

It's a simple demo, it just renders numbers. Now I notice that because I only bind my results on the first load that the paging doesn't work. I noticed that the normal asp.net DataPager control acts the same way, so is it just not possible to enable paging if I don't rebind the RadListView every time the page is changed or am I doing something wrong.?

Thanks.
Rosen
Telerik team
 answered on 25 Mar 2010
1 answer
138 views
Hi folks,

i was using RowState and DataControlRowState in my datagridview.

I have migrated it into Radgrid. Can any one tell wht can be the alternative code for the below code with respect to RadGrid
Dim grdrow as GridViewRow 
 
For Each grdrow In gvProductBOM.Rows 
                If ((grdrow.RowState And DataControlRowState.Edit) <= 0) And Not (isBOMFirstRow) 
:-
Awaiting for your response.


Thanks
Satya

Yavor
Telerik team
 answered on 25 Mar 2010
1 answer
133 views

I have a RadTimePicker as one of the template columns in RadGrid. When i call the OnSelectedDateChanged event of the RadTimePicker it is not fired. I have set AutoPostBack also to true. But its not fired.

I have added the event handler to the control's declaration. Still it doesn't work. The control is inside the grid. So is there any other way to handle this?

My code:

        <EditItemTemplate >
            <telerik:RadTimePicker ID="txtStartTime" runat="server" OnSelectedDateChanged ="CheckDuration" AutoPostBack ="true" >
            </telerik:RadTimePicker>
        </EditItemTemplate>

    Protected Sub CheckDuration(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs)

    End Sub

 

Yavor
Telerik team
 answered on 25 Mar 2010
1 answer
170 views
I get this error message "Error Creating Template groups. Reason: System.InvalidCastException " when I drag RadGrid(Q3 2009 SP2) to default.aspx which is using a master page. Couly someone hwlp me please.Thanks in advance. Error Attached.


Shinu
Top achievements
Rank 2
 answered on 25 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?