Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views
I have a ListView defined like this ...
<telerik:RadListView runat="server"
                     ID="RadListView1"
                     AllowMultiItemSelection="false"
                     ItemPlaceholderID="items"
                     ClientDataKeyNames="ContactId, Surname, Forename, Organisation, Email">
    <LayoutTemplate>
        <div id="listview"
             class="RadListView RadListView_#= owner.Skin #">
            <asp:Panel runat="server"
                       ID="items"
                       ScrollBars="Vertical"/>
        </div>
    </LayoutTemplate>
    <ClientSettings>
        <ClientEvents OnCommand="radListView1_OnCommand"/>
        <DataBinding>
            <ItemTemplate>
                <div class="item">
                    <div>
                        <strong>#= String.format("{0}, {1}", Surname, Forename) #</strong>
                    </div>
                    <div>#= Organisation #</div>
                    <div>#= Email #</div>
                </div>
            </ItemTemplate>
            <SelectedItemTemplate>
                <div class="item selected">
                    <div>
                        <strong>#= String.format("{0}, {1}", Surname, Forename) #</strong>
                    </div>
                    <div>Home: #= HomePhone #</div>
                    <div>Mobile: #= Mobile #</div>
                </div>
            </SelectedItemTemplate>
        </DataBinding>
    </ClientSettings>
</telerik:RadListView>

Simple.
When an item in the ListView is clicked, the following code runs...
listView.toggleSelection(index);
var clientDataValues = listView.get_clientDataKeyValue()[index];

Where index is the item index of the item clicked.

My problem is that clientDataValues is always empty. I know that the value of index is correct 'cos the items selected state toggles correctly. Even if I hard-code an index it's empty.

Am I supposed to cast a different spell if I'm client-side binding?

--
Stuart


Tsvetina
Telerik team
 answered on 30 May 2012
2 answers
81 views
Hello,

I’ve created a RadListView with paging (RadDataPager) which is working fine.

I’ve inserted a call to a userControl in the “itemTemplate”. It’s working fine for the first page, but is empty for the other pages. The parameters are not passed on to the control.

Could someone help me correct this, please ?
Evelyne Schreiner
Top achievements
Rank 1
 answered on 30 May 2012
1 answer
125 views
Quite simply put: When are CSS sprites going to be supported? I am currently working on a project which heavily uses the RadRibbonbar and therefore uses a lot of images. Loading all these images is currently whats dragging out the page load time to unacceptable levels, even with browser caching. (25+ images)

So ideally I want to replace these image urls by CSS sprites to reduce page load time.

Currently on version: 2011.3.1115.40
Ivan Zhekov
Telerik team
 answered on 30 May 2012
1 answer
99 views
The method toggleSelection() appears to be missing from the docs.

I only know it's there 'cos it's used in one of your demo pages.

What other goodies are we missing out on?

--
Stuart
Tsvetina
Telerik team
 answered on 30 May 2012
1 answer
96 views
I have a ListView that I'm populating client-side using a WebService.

I have been trying to get the data in my item template to change when I click on the item. I used code in ListViewBinding.js from this demo as the basis for the following code...
setTimeout(function ()
{
    $telerik.$(".item").click(function (e) { listView.toggleSelection($(this).index()); });
}, 500);

My problem is that if I click on an item, it toggle to the SelectedItemTemplate (which is fine) but clicking again doesn't change it back.

If I click on a 2nd item it switched to the SelectedItem template and the first item switches back. However once an item has been toggled once it won't toggle again.

--
Stuart
Tsvetina
Telerik team
 answered on 30 May 2012
13 answers
299 views
Hey,
i have trouble with using the new RadRibbonBar control. If i set the width of the ribbonbar to 100%, items in one of the RibbonBarGroups are rendered incorrectly - they look like they have set size to medium although it is set to large in the aspx file. Everything goes back to normal if i resize the browser window. Another thing is the rendering of ribbonbarbuttons, please find the screen attached.
Second thing. If the ribbonbar is placed inside a fixed-height radpane, the RibbonBarMenu is overlayed by radpane.
I'm using Telerik.Web.UI 2011.2.712.40.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="All" EnableRoundedCorners="true" ControlsToSkip="Fieldset" />
    <telerik:RadSplitter runat="Server" ID="RadSplitter1" Width="100%" BorderSize="0" BorderStyle="None" PanesBorderSize="0" Height="100%" Orientation="Horizontal" VisibleDuringInit="false">
        <telerik:RadPane ID="topPane" runat="server" Height="60px">
            LOGO
            <telerik:RadToolBar runat="server" ID="navigationBar" Skin="Office2007">
                <Items>
                    <telerik:RadToolBarButton Text="Button 1" />
                    <telerik:RadToolBarButton Text="Button 2" />
                    <telerik:RadToolBarButton Text="Button 3" />
                    <telerik:RadToolBarButton Text="Button 4" />
                    <telerik:RadToolBarButton Text="Button 5" />
                    <telerik:RadToolBarButton Text="Button 6" />
                    <telerik:RadToolBarButton Text="Button 7" />
                    <telerik:RadToolBarButton Text="Button 8" />
                </Items>
            </telerik:RadToolBar>
        </telerik:RadPane>
        <telerik:RadPane runat="server" ID="contentPane" Scrolling="None">
            <telerik:RadSplitter runat="server" ID="splitter2" BorderStyle="None" PanesBorderSize="0">
                <telerik:RadPane runat="server" ID="leftPane" Width="220px" MinWidth="220" MaxWidth="220" Scrolling="None">
                    <telerik:RadSplitter runat="server" ID="radSplitter3" BorderStyle="None" PanesBorderSize="0" BorderWidth="0px" Height="100%" Orientation="Horizontal">
                        <telerik:RadPane runat="server" ID="topLeftPane" BorderStyle="None" BorderWidth="0px" PanesBorderSize="0">
                            top left
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
                <telerik:RadPane runat="Server" ID="rightPane" Scrolling="None" Height="100%" BorderStyle="None" BorderWidth="0px">
                    <telerik:RadSplitter runat="server" ID="RadDesk1" Width="100%" BorderSize="0" BorderStyle="None" PanesBorderSize="0" Height="100%" Orientation="Horizontal">
                        <telerik:RadPane runat="server" ID="RadPane1" Height="157px" EnableViewState="false" Scrollable="false" Scrolling="None">
                            <telerik:RadRibbonBar runat="server" ID="ribbonbar1" Width="100%" Skin="Windows7">
                                <telerik:RibbonBarTab Text="Bar 1" Selected="true">
                                    <telerik:RibbonBarGroup Text="New" EnableLauncher="false">
                                        <Items>
                                            <telerik:RibbonBarButton Size="Large" Text="Item 1" ImageUrl="~/img/new1.png" />
                                            <telerik:RibbonBarMenu Size="Large" Text="Item 2" ImageUrl="~/img/new1.png">
                                                <Items>
                                                    <telerik:RibbonBarMenuItem Text="menu item 1" />
                                                    <telerik:RibbonBarMenuItem Text="menu item 2" />
                                                    <telerik:RibbonBarMenuItem Text="menu item 3" />
                                                    <telerik:RibbonBarMenuItem Text="menu item 4" />
                                                </Items>
                                            </telerik:RibbonBarMenu>
                                        </Items>
                                    </telerik:RibbonBarGroup>
                                    <telerik:RibbonBarGroup Text="Edit" EnableLauncher="false">
                                        <Items>
                                            <telerik:RibbonBarButton Size="Large" Text="Item 1" ImageUrl="~/img/new1.png" />
                                            <telerik:RibbonBarButton Size="Large" Text="Item 2" ImageUrl="~/img/new1.png" />
                                        </Items>
                                    </telerik:RibbonBarGroup>
                                    <telerik:RibbonBarGroup Text="Export" EnableLauncher="true">
                                        <Items>
                                            <telerik:RibbonBarButton Size="Large" Text="Item 1" ImageUrl="~/img/new1.png" />
                                            <telerik:RibbonBarButton Size="Large" Text="Item 2" ImageUrl="~/img/new1.png" />
                                            <telerik:RibbonBarButton Size="Large" Text="Item 3" ImageUrl="~/img/new1.png" />
                                            <telerik:RibbonBarButton Size="Large" Text="Item 4" ImageUrl="~/img/new1.png" />
                                        </Items>
                                    </telerik:RibbonBarGroup>
                                    <telerik:RibbonBarGroup Text="Delete" EnableLauncher="false">
                                        <Items>
                                            <telerik:RibbonBarButton Size="Large" Text="Delete" ImageUrl="~/img/new1.png" />
                                        </Items>
                                    </telerik:RibbonBarGroup>
                                </telerik:RibbonBarTab>
                            </telerik:RadRibbonBar>
                        </telerik:RadPane>
                        <telerik:RadPane runat="server" ID="RadPane2" Scrolling="None">
                            content
                            <img src="img/new1.png" />
                        </telerik:RadPane>
                    </telerik:RadSplitter>
                      
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

Any suggestions?

regards,
Rafal
Ivan Zhekov
Telerik team
 answered on 30 May 2012
1 answer
101 views
I'm setting the Content property of my RadEditor in my code behind. I am then grabbing the content client side via get_html(). The content i set in the code behind is different than the content i pull with get_html().

It seems that the attributes of my html elements are getting reordered.

So, this:

<div class='foo' style='bar' />

Turns into this:

<div style='bar' class='foo' />

Why is this happening? Is there a way to stop the control from messing with my html?
Rumen
Telerik team
 answered on 30 May 2012
6 answers
141 views
When I press the download button I am getting sent to this page:
http://stylebuilder.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/ZipHandler.ashx
Which shows this error:

Sorry, we couldn't find the page you're looking for.


I am using Firefox 12 on Windows.

The download link is supposed to go here:
http://stylebuilder.telerik.com/ZipHandler.ashx?mode=get&suite=aspnet-ajax&skin=[MySkinName]
Bozhidar
Telerik team
 answered on 30 May 2012
0 answers
109 views
Dear all,
     I use a grid b in another grid a edit form. Now when a is edit status, I add new record to b,but I b's insertcommand don't work. why?
     Please help, thanks!
Y
Top achievements
Rank 1
 asked on 30 May 2012
3 answers
190 views
In file explorer, i would like to make a ajax call when i click a folder name
& using ajax call i would like to populate a radgrid from the database

a.    can this be achieved ?
a.    should i use the ajaxpanel or ajaxmanager for this

pl help

thanks

Dobromir
Telerik team
 answered on 30 May 2012
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?