Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
87 views
I am wondering if there is any way to iterate through all the controls created by Ajax call using server code. I need to go through them and add attributes to those controls.

Thanks
Daniel Cai
Top achievements
Rank 1
 answered on 22 Jul 2008
2 answers
144 views
Hello, I am doing a news site. In the homepage I have a RadTabStrip and a RadMultiPage. In code behind, I am calling business logic to get the news categories, and then I add one tab and one pagview to show the news for each category.  I don't have problems with creating the tabs and pageviews.  They are created ok, I even added a Textbox to each one of the pageviews showing the category titile. 

My problem is that I want to add a ListView, but I don't know how to create the ListView's childs programatically (layouttemplate, itemtemplate, etc), as a matter of fact it would seem a little bit odd to create those programmatically as they contain html markup.

I tried to create the ListView as a User Control in an ascx file, but then when I call it from my codebehind like this:

Dim

LVEstudios As ListView = Page.LoadControl("~/Resources/ListViewParaMultiPageEstudios.ascx")

I am getting this error in the line shown above:
Unable to cast object of type 'ASP.resources_listviewparamultipageestudios_ascx' to type 'System.Web.UI.WebControls.ListView'.

How can I tell the ascx file to be of type ListView ?  I think that would solve my problem.

My ascx file looks like this:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ListViewParaMultiPageEstudios.ascx.vb" 
    Inherits="Resources_ListViewParaMultiPageEstudios" %> 
 
<asp:ListView runat="server" ItemPlaceholderID="AquiVanItems">  
    <LayoutTemplate> 
        <asp:PlaceHolder ID="AquiVanItems" runat="server"></asp:PlaceHolder> 
    </LayoutTemplate> 
    <ItemTemplate> 
        <%#Eval("Nombre")%> 
        <br /> 
        <%#Eval("Orden")%> 
    </ItemTemplate> 
</asp:ListView> 
 

and its code behind:

 
Partial Class Resources_ListViewParaMultiPageEstudios  
    Inherits System.Web.UI.UserControl  
 
 
End Class 


Any ideas?  I hope I made myself clear.

Pablo
Top achievements
Rank 1
 answered on 22 Jul 2008
6 answers
129 views
Hello,

I was wondering if you could provide me a walkthrough if it is possible to populate a RadMenu with multiple datasources. The parent from one table, a child from another table and another child level from another table. The tables are all linked by [category_id]

Thanks,

Ryan
Ryan Pope
Top achievements
Rank 1
 answered on 22 Jul 2008
3 answers
198 views
Hi Folks,
Having a problem getting the client to display the new nodes once I expand the node.
I'm assuming that since I just started today with telerik controls, that I'm missing the container or control that does the the async callback display update stuff?
I just don't know what it is, and I didn't see it in any of the samples.

I'm positive that the nodes are being added. Code followed by the .aspx

Select Case e.Node.Level

Case 0 ' category

For Each thisCategory As nPOSCategory In CType(GetAnEntity(GetType(nPOSStoreType), e.Node.Value), nPOSStoreType).Categories

Dim thisNode As New RadTreeNode(thisCategory.CategoryName, thisCategory.Id)

If thisCategory.Items.Count > 0 Then

thisNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack

End If

RadTreeView1.Nodes.Add(thisNode)

Next

e.Node.Expanded =

True

Case 1 ' item

End Select

*******************************************************
Here are the .aspx bits:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">

</telerik:RadScriptManager>

<div>

</div>

<telerik:RadSplitter ID="RadSplitter1" runat="server" Items-Capacity="4" LiveResize="True" Skin="WebBlue" SplitBarsSize="">

<telerik:RadPane ID="RadPane1" runat="server">

<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="WebBlue">

<CollapseAnimation Duration="100" Type="OutQuint" />

<ExpandAnimation Duration="100" />

</telerik:RadTreeView>

</telerik:RadPane>

<telerik:RadSplitBar ID="RadSplitBar1" runat="server" />

<telerik:RadPane ID="RadPane2" runat="server">

<telerik:RadSplitter ID="RadSplitter2" runat="server" Orientation="Horizontal" Skin="WebBlue">

<telerik:RadPane ID="RadPane3" runat="server">

future

</telerik:RadPane>

<telerik:RadSplitBar ID="RadSplitBar2" runat="server" />

<telerik:RadPane ID="RadPane4" runat="server">

future

</telerik:RadPane>

</telerik:RadSplitter>

</telerik:RadPane>

</telerik:RadSplitter>

<asp:Button ID="btnReset" runat="server" Text="Reset Page" />

<telerik:RadAjaxManager runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadTreeView1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadTreeView1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

Bob
Top achievements
Rank 1
 answered on 22 Jul 2008
1 answer
82 views
I can't seem to remove the background color from the Dock Zones so the background will show through.  I figure there's an easy way to do this, but I'm not getting it.

Thanks
ataxia1
Top achievements
Rank 1
 answered on 22 Jul 2008
4 answers
133 views
I am using the ToolTipManager to provide on-demand content (via OnAjaxUpdate) for a ListView. The ListView and ToolTipManager are inside an UpdatePanel.

Everything works fine initially.

However, when a new row is added to the ListView, the on-demand content now shows content for the "old" rows. For example, row 1 now shows content for row 2 (the old row 1).

It appears that the ToolTipManager's TargetControls values are not being updated on the client after the partial postback. How can this be fixed? Thanks!
Rod
Top achievements
Rank 1
 answered on 22 Jul 2008
1 answer
114 views
Is there a way for RadUpload to upload to a specific folder based on the file extension?

If .jpg .gif .png
go to "~/Assets/Images/"

If .mov .avi .wmv
go to "~/Assets/Videos/"

If .mp3 .wma
go to "~/Assets/Music/"
Veselin Vasilev
Telerik team
 answered on 22 Jul 2008
4 answers
246 views
There's something strange with my RadGrid when I set it to use Filtering.  The filter icon is cut off.

Here's a link to a screen shot: http://www.kingwilder.com/forumposts/grid_with_theme.png

I tried testing the rendering even by removing all of the CSS in the css file in my theme folder and it still renders this way.

But, when I actually remove the theme attribute in the web.config/pages element:

Before:

<pages theme="MyTheme"> 
... 
</pages> 




After:

<pages> 
... 
</pages> 

... then the filter icon is viewed completely.

Here's a link to the screen shot of the correct filter icon: http://www.kingwilder.com/forumposts/grid_no_theme.png

Does anyone know why this is happening and how to fix this?

Thanks.


King Wilder
Top achievements
Rank 2
 answered on 22 Jul 2008
1 answer
135 views
Hi, sorry for my english

I'm using VS 2008, RadControl ASP.Net (Last release) and IE 7.0.6000.16681

I have a lot of trouble with Radgrid and skins

On a new projet I put, RadScriptManager, RadAjaxManager, RadUpdatePanel and RadGrid. I link my table on RadGrid, and choose a skin.

When I run the project I have some missing border at the bottom. I try to change the Skins but the problem still exist.

Look at this link for a image

I don't understand what is wrong.

Thanks for our help
Dimo
Telerik team
 answered on 22 Jul 2008
1 answer
138 views
Hi,

I'm extending the radcombobox. When i add a javascript in my class there is no problem:
public CheckedComboBox() 
{ 
    OnClientDropDownClosing = "DropDownClosingEventHandler"; 
} 
 
protected override void OnPreRender(EventArgs e) 
{ 
   string script = @"function DropDownClosingEventHandler(){alert(""test"");}"    
   Page.ClientScript.RegisterClientScriptBlock("DropDownClosingEventHandler", script, true); 
}             
 This way, my script is called.

But when i place the script in an external .js file, the combobox stays closed when clicked.

protected override void OnPreRender(EventArgs e)  
{  
    string path = ResolveClientUrl("CheckedComboBox.js");  
    ScriptManager.RegisterClientScriptInclude(this.Page,  
                getType(),"DropDownClosingEventHandler", path);  
    base.OnPreRender();  
}  
and the CheckedComboBox.js file:

function DropDownClosingEventHandler(sender, args) 
 {   
        alert("test");   
 }   

what am i doing wrong???

thx in advance,
Glenn
glenn
Top achievements
Rank 1
 answered on 22 Jul 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?