Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views

I'me tring to use the Combobox with Treeview functionality.

The first time I choose an item from the tree everything goes smoothly. But if I open again the combox to select the tree I get an javascript error: Message: 'null' is null or not an object. Thus the issue happens only if I choose a node and  after I try to open again the combobox

I've checked the javascript and the error is in the follwoing code:
function OnClientDropDownOpenedHandler(sender, eventArgs) {
            var tree = sender.get_items().getItem(0).findControl("rvt1");
            var selectedNode = tree.get_selectedNode();
            if (selectedNode) {
                selectedNode.scrollIntoView();
            }
        }
The findControl returns a null and when we call the get_selectedNode() we got the exception.
What may be causing this behaviour?

Here is our code:

<script type="text/javascript">
 
        function nodeClicking(sender, args) {
            var comboBox = $find("<%= combo1.ClientID %>");
  
            var node = args.get_node()
            comboBox.set_text(node.get_text());
  
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_text(node.get_text());
            comboBox.get_items().getItem(0).set_value(node.get_value());
  
            comboBox.commitChanges();
  
            comboBox.hideDropDown();
  
            // Call comboBox.attachDropDown if:
            // 1) The RadComboBox is inside an AJAX panel.
            // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node.
            // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel.
  
            //comboBox.attachDropDown();
        }
  
        function StopPropagation(e) {
            if (!e) {
                e = window.event;
            }
  
            e.cancelBubble = true;
        }
  
        function OnClientDropDownOpenedHandler(sender, eventArgs) {
            var tree = sender.get_items().getItem(0).findControl("rvt1");
            var selectedNode = tree.get_selectedNode();
            if (selectedNode) {
                selectedNode.scrollIntoView();
            }
        }
    </script>
  
  
<telerik:RadComboBox ID="combo1" runat="server" CausesValidation="false"
    EnableEmbeddedSkins="false" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
    EmptyMessage="select please" MaxHeight="200px"  ShowToggleImage="True"
  
    Width="50%" AllowCustomText="True">
    <ItemTemplate>
        <div id="div1">
            <telerik:RadTreeView ID="rvt1" runat="server" Width="100%" Height="250px"
                DataSourceID="ds1" DataFieldID="ID" DataValueField="ID"
                DataFieldParentID="ParentID" DataTextField="Name" OnClientNodeClicking="nodeClicking" >
                <DataBindings>
                    <telerik:RadTreeNodeBinding Expanded="true" />
                </DataBindings>
            </telerik:RadTreeView>
        </div>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem Text="" />
    </Items>
</telerik:RadComboBox>
<asp:ObjectDataSource ID="ds2" runat="server"
    EnablePaging="True" OnSelecting="dds2_Selecting"
    SelectMethod="GetList" TypeName="BLL">
    <SelectParameters>
        <asp:Parameter Name="p1" Type="Int32" />
        <asp:Parameter Name="p2" Type="Int32" />
        <asp:Parameter Name="p3" Type="Boolean"  DefaultValue="True" />
    </SelectParameters>
</asp:ObjectDataSource>
Helen
Telerik team
 answered on 26 May 2011
6 answers
126 views
Hi all,

I am trying to load a content file into the menu using  LoadContentFile but keep getting an error. I downloaded the latest exe on the 19/032008 with the TelerikWeb.UI.dll version beeing 2007.3.1425.35.

I have succesfully got this working with the old controls so I know the method works but just cant get it to work with the new Prometheus menu control.

My code is as follows:

Menu Control:
<telerik:RadMenu ID="rmTopMenu" runat="server" Skin="Outlook"></telerik:RadMenu>

Code behind:
rmTopMenu.LoadContentFile("~/Auth/Common/Controls/Menus/Contents/DefaultMenu.xml");

XML Structure:
<?xml version="1.0" encoding="utf-8" ?>
<
Menu>
    <
Group Flow="Horizontal">
        <
Item Text="Item 1"></Item>
        <
Item Text="Item 2"></Item>
        <
Item Text="Item 3"></Item>
   </
Group>
</
Menu>


Error Message:
System.InvalidOperationException: <Group xmlns=''> was not expected.

Any ideas on this would be much appreciated.

Thanks

Craig
Helen
Telerik team
 answered on 26 May 2011
1 answer
80 views
In the following  I'm selecting the third page and saving the state for user1 and then selecting the fifth page and saving the state for user 2. Now if I load the user1 settings the page is not showing as 3 but the same 5 which was saved for user2.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx

Is there any work around for this?
Tsvetoslav
Telerik team
 answered on 26 May 2011
4 answers
111 views
I have a RadGrid bound to a collection, the collection has integer, strings and char datatypes.  I can group by all these nor problem and I can filter with the integer and strings however using the CHAR and equalto does not work.

I have one column that contains either a V or an O (for Vacant or Occupied) when I attempt to filter by V and EqualTo I still get both V and O items, I tried using O and greater then to just get the V no luck still get them all.  However I can drag the column to the group by bar and it groups the items correctly.

(I have set the datatype for the column to System.Char)

Svett
Telerik team
 answered on 26 May 2011
4 answers
248 views
Hi. I have a client that I've developed a solution for using RadUpload. We've discovered just recently that there seems to be a barrier somewhere around 30 megabytes. I flipped over to another solution I have that uses RadUpload (different server) and am experiencing the same thing. Both servers are Server 2008, and I've modified the web.config file on both servers as follows:

<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength=102400"
requestLengthDiskThreshold
="8192" executionTimeout="3600"/>

So both servers are configured for a maximum 100MB file and 60 minutes of upload.

I have tested files of various size between 1MB and 28MB and they upload fine - everything, including my ProgressArea, works. When i upload a file above 30 MB, though, my ProgressArea doesn't display, and after about 2 minutes (regardless of connection speed), I get redirected to a 404 or timeout page.

I've tested this on everything from a 512kb (up) connection to a 7mb (up) connection and the barrier seems to be right around 30 megabytes, consistently.

I am running these inside UpdatePanels using AJAX but have added a PostBackTrigger to my upload button to trigger a full page postback when it is clicked.

Hopefully that's enough info to get some help here. I've seen several people with issues related to the web.config settings and the ajax postback settings, but I think I have both of those dealt with. I'd appreciate your assistance.

Thanks,

Chet
Peter Filipov
Telerik team
 answered on 26 May 2011
3 answers
403 views
Hi all,

When i use the default drop down to change the Skin using the Rad Skin Manager then everything works fine.
But in my current application i want to change theme on the click of my theme buttons say Blue, Red , Green etc
So how can i do that using Rad Skin Manager.

Thanks,
Aashish Gupta

Maria Ilieva
Telerik team
 answered on 26 May 2011
1 answer
149 views
Hi,
I get via LINQ this data structur from a SQL Server:

Count Product Date
1 Product1  03.11.2009
2 Product1 04.11.2009
1 Product2 04.11.2009
3 Product1 05.11.2009
1 Product2 05.11.2009
1 Product3 05.11.2009
3 Product1 06.11.2009



As you can see I want to group my products by the the same date to visualize how many different products are counted on this day.
I want this to show as a line chart.
I attached a file with a image of what i mean.

How can I do this programmatically?
Ves
Telerik team
 answered on 26 May 2011
1 answer
32 views
Hello,

I have a problem with the scheduller. When I click on any option of the tool it refreshes the entire web page, not just the scheduller.

Should I change any property?

Thanks.
Peter
Telerik team
 answered on 26 May 2011
6 answers
248 views
I have a couple of pages on my site that dynamically add RadPanelItems to a RadPanelBar and apply header and content templates to them. I have recently noticed that when I navigate away from these pages when the site is debugging, I get a ScriptResource.asxd?d=LotsOfNumbersAnNdLetters..... error that reads like so...

Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

I can only assume this has something to do with the Templates that get applied, but cant work out whats wrong as the pages work exactly as they're meant to and don't produce any server or client side errors until this one. Again, this error ONLY occurs when navigating away from the page, not on postback.

The templates do have event handlers added to controls that are built in the templates and think it might have something to do with these, but when I comment these handlers and methods out, I still get the same error...

It's very puzzling and I have to get it fixed but have run out of ideas.
Dobromir
Telerik team
 answered on 26 May 2011
24 answers
915 views
Hi guys,

I am trying to upgrade my existing web project where I'm using the RadControls's 2007 Q2 RadAjaxManager to "Prometheus"'s RadAjaxManager.

I have followed instructions in documentation (Adding RadControls 'Prometheus' to an existing application), but I still receive this error when I open a page with "Prometheus" RadAjaxManager:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

What could be wrong?

Regards,
Alex
Sebastian
Telerik team
 answered on 26 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?