Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
102 views
I looked at the grid demo here

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectrowwithcheckbox/defaultcs.aspx

Unfortunately it references "ToggleRowSelection" in the ASP page for the row on CheckedChange.
When you look at the code demo, ToggleRowSelection does not exist. 

The code for when you select the header does indeed exist.

protected void ToggleSelectedState(object sender, EventArgs e)
        {
            CheckBox headerCheckBox = (sender as CheckBox);
            foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
            {
                (dataItem.FindControl("CheckBox1") as CheckBox).Checked = headerCheckBox.Checked;
                dataItem.Selected = headerCheckBox.Checked;
            }
        }


So what I am trying to find out,  what is the code for checking that individual row?

What should be in ToggleRowSelection
Jack Voss
Top achievements
Rank 1
 answered on 04 Apr 2012
1 answer
143 views
Hello,

We use the Editor in our CMS for our responsive sites. It's impossible to use px sizes as width and height of images. We are wondering if its possible to change the Image Manager tool to be able to set the width and height of images in % rather than px. 

Thanks for your help!

Josh
Rumen
Telerik team
 answered on 04 Apr 2012
4 answers
258 views
I have this tiny project where I'm trying to get "Select Item" to work in RadListView. However, I am not having any luck with it. The RadListView loads and populates correctly, but when I click on an object, it does not change to the "SelectedItem" template for the object. What am I doing wrong?

Thank you for any help,
Andrey

Default.aspx:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="ListViewTest._Default" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ObjectDataSource ID="m_oDataSource" runat="server" SelectMethod="GetData"
        EnablePaging="true" StartRowIndexParameterName="iStartRecord" MaximumRowsParameterName="iMaxRecords"
        SortParameterName="sSortColumns" DataObjectTypeName="System.String" TypeName="ListViewTest._Default"
        OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource>
    <telerik:RadListView runat="server" ID="m_oListView" DataSourceID="m_oDataSource">
        <ItemTemplate>
            <fieldset title="Item">
                <asp:Label runat="server" Text="Not Selected" />
            </fieldset>
        </ItemTemplate>
        <SelectedItemTemplate>
            <fieldset title="Selected Item">
                <asp:Label runat="server" Text="Selected" />
            </fieldset>
        </SelectedItemTemplate>
    </telerik:RadListView>
</asp:Content>

Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace ListViewTest
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object senderEventArgs e)
        {
 
        }
 
        public IList<StringGetData(string sSortColumnsint iMaxRecordsint iStartRecord)
        {
            IList<StringoList = new List<String>();
 
            for (int i = 0i < 10i++)
            {
                oList.Add(i.ToString());
            }
            return oList;
        }
    }
}

Site.Master:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ListViewTest.SiteMaster" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <div class="page">
        <div class="header">
            <div class="title">
                <h1>
                    My ASP.NET Application
                </h1>
            </div>
            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
                    </Items>
                </asp:Menu>
            </div>
        </div>
        <div class="main">
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="footer">
        
    </div>
    </form>
</body>
</html>

Web.config:
<?xml version="1.0"?>
 
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
 
<configuration>
  <appSettings>
    <add key="webpages:Version" value="1.0.0.0" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <add key="Telerik.Skin" value="Windows7" />
  </appSettings>
  <connectionStrings>
    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
  </connectionStrings>
 
  <system.web>
    <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx"
           type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Culture=neutral, Version=4.0.0.0, PublicKeyToken=31bf3856ad364e35"
           validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
    <compilation debug="true" targetFramework="4.0" />
 
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>
 
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" />
      </providers>
    </membership>
 
    <pages>
      <controls>
        <add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" />
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
        <add tagPrefix="telerik" namespace="Telerik.Charting" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
 
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
 
    <roleManager enabled="false">
      <providers>
        <clear/>
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
      </providers>
    </roleManager>
 
  </system.web>
 
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd"  verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>
Andrey
Top achievements
Rank 1
 answered on 04 Apr 2012
1 answer
276 views
Hi Guys, 

I am currently using the Radtoolbar to launch Item Commands from Radgrids.  Everything works great, opening Radwindows to load new ASPX pages etc.  

I have now come across a situation where some of our customers shouldn't see some of the buttons.  In our system we use a DB table called Parameters set with Values like YES or NO.  What I am trying to do, is from Javascript, check to see if a buttons parameter is set to YES or NO and then display or not display the button.

In VB this is quite easy, however with the Radtoolbar using Javascript Im unsure how I can implement similar functionality.  

Cheers
Joel
Kate
Telerik team
 answered on 04 Apr 2012
6 answers
723 views
Before using Telerik, I used script managers and script manager proxies.
Now, if I use a master page, I put a RadScriptManager on the master page, but I don't see the corresponding RadScriptManagerProxy control. How do I accomplish the code below on a content page using the Rad Controls?

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">  
        <Scripts> 
            <asp:ScriptReference Path="~/Scripts/Common.js" /> 
            <asp:ScriptReference Path="~/Scripts/Uploads.js" /> 
        </Scripts> 
    </asp:ScriptManagerProxy>      
Thanks ... Ed
Iana Tsolova
Telerik team
 answered on 04 Apr 2012
3 answers
154 views
Hello everyone,

I would like to know if it is possible to right click on a radTreeView, WITHOUT slecting a node, and show a menu.
So far, I've only seen code that show a menu when a node is selected.
Is it possible?

Thank you
Shirya
Shirya
Top achievements
Rank 1
 answered on 04 Apr 2012
2 answers
1.0K+ views
i have Json oblect contains Keys and values
what i want is bind grid with this JsonObject
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Apr 2012
1 answer
114 views
Hi,

I am having a Visual Webpart showing certain data from a list. I am showing this data as per my required format. Now I need to auto refresh this data at a regular interval say every 2 minutes. It seems RadAjaxManager, RadAjaxPanel and a Timer can be useful to achieve this.

However I am new in using Telerik controls in SharePoint (the version that I am using is SharePoint 2010). Can any one please explain me the steps to follow to build this. It would be really helpful if any sample is provided along with the steps.

Thanks in advance.

Regards,
Kishore
Maria Ilieva
Telerik team
 answered on 04 Apr 2012
0 answers
216 views

Hi Telerik Team,


When we scroll the scrollable RadMenu  by using Mouse wheel (moving downwards) till the end, RadMenu popup height is reducing, Due to this effect, only few items are visible in the top of the menu.

This scrollable RadMenu is working fine in (Telerik.Web.UI (2008)) , but it is not working fine in (Telerik.Web.UI (2011).

Design : Default.aspx
----------------------------

                      
                      
                        
                        <telerik:RadMenu ID="rmDisplay" runat="server"   CausesValidation="False"    ClickToOpen="true"   >
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="Display: Table"  Value="Table" PostBack="false" >
                                    <GroupSettings ExpandDirection="Up" Height="100px" OffsetX="0"  OffsetY="0" />
                                    
                                    <Items>
                                    
                                    <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                 <telerik:RadMenuItem runat="server" Text="Images"  Value="Table2">
                                    
                                </telerik:RadMenuItem>
                                
                                  <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                
                                
                                  <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                 <telerik:RadMenuItem runat="server" Text="Images"  Value="Table2">
                                    
                                </telerik:RadMenuItem>
                                
                                
                                  <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                 <telerik:RadMenuItem runat="server" Text="Images"  Value="Table2">
                                    
                                </telerik:RadMenuItem>
                                
                                
                                  <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                 <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                                
                                
                                 <telerik:RadMenuItem runat="server" Text="Images"  Value="Table2">
                                    
                                </telerik:RadMenuItem>
                                
                                
                                  <telerik:RadMenuItem runat="server" Text="Graph"  Value="Table1">
                                
                                </telerik:RadMenuItem>
                               
                                
                                
                                    
                                    
                                    </Items>
                                    
                                </telerik:RadMenuItem>
                                
                                 
                                
                            </Items>
                            <DefaultGroupSettings ExpandDirection="Up"     />
                            <CollapseAnimation Duration="200" Type="None"   />
                        </telerik:RadMenu>

---- code ends here ----------------



The code uses the theme file (menu.Agionet.css).


Theme file (menu.agionet.css)
------------------------------------------

/* r.a.d.menu Web 2.0 skin */

.RadMenu_Agionet
{
    /*background: #666666 url('Menu/Agionet/img/MenuItemBackground.gif');*/
    font: normal 9pt Arial, "Ms Sans Serif", "Ms Serif",sans-serif;
    margin: 0;
    padding: 0;
    z-index:3000;
    position: static !important;
}

.RadMenu_Agionet .rmRootGroup
{
     /*max-width: 130px;
    _width: 130px;*/
}
#Filter1_rmX,
#Filter1_rmX .rmText
{    
    /*resize X button */
    width: 14px !important; /* x */
    margin: 0;
    padding: 0;
}

.RadMenu_Agionet .rmLink,
.RadMenu_Agionet .rmLink:visited,
.RadMenu_Agionet .rmLink:active
{
    text-decoration: none;
    color: #004D6B;
    background: #FFFFFF url(Menu/Agionet/img/MainItemBackground.gif) repeat-x bottom center;
    line-height: 22px;
    border: 1px solid #004D6B;
    overflow:hidden;

}
.RadMenu_Agionet .rmLink:hover,
.RadMenu_Agionet .rmFocused,
.RadMenu_Agionet .rmExpanded
{
    color: #FF991A;
    border: 1px solid #FF991A;
    background: #FFFFFF url(Menu/Agionet/img/MainItemBackgroundHover.gif) repeat-x bottom center;
    cursor: hand;
    cursor: pointer;
    overflow:hidden
}
    
.RadMenu_Agionet .rmRootGroup .rmText
{
    /* line-height: 22px; */
    padding: 0 0 0 5px;
    cursor: hand;
    cursor:pointer;
    background-image:none;
    display:block !important; /* x */
    width:100% !important; /* x */
}

.RadMenu_Agionet .rmItem
{
    width:100% !important; /* x */
}

.RadMenu_Agionet .rmSlide
{
    margin-top:-1px;
    border: 0;
    width: 100% !important;
}

.RadMenu_Agionet .rmGroup
{
    
    border: 1px solid #FF991A;
    background: #FFE6C7 url(Menu/Agionet/img/rmGroup_bckgr.gif) repeat-x bottom;
    text-align: left;
    overflow-x:hidden !important;
    overflow-y:auto !important;     
}




.RadMenu_Agionet .rmVertical
{
    /* IE8 fix --- menu type and effekt */
    display: block !important;
    width:100% !important;
    background-color:#FFC884 !important;
    color:#004D6B !important;
    
}


.RadMenu_Agionet .rmGroup .rmLink
{
    background: none;
    border: 0px !important;
    border-bottom: solid 1px #000000;
    width:100% !important; /* x */

}

.RadMenu_Agionet .rmGroup .rmText
{
    background: none;
    margin-right: 0px !important;
    padding-left: 8px;
    padding-right: 8px;
    color: #004D6B;
    _display: inline !important;
    border: 0px !important;
    width:auto !important;
}
.RadMenu_Agionet .rmLeftImage
    {
    margin-right: 5px;
    /*margin: 2px 5px 2px 0;
    padding: 0;*/
    border: 1px solid;
    border-top-color: #5B5B5B;
    border-right-color: #606264;
    border-bottom-color: #CCCCCC;
    border-left-color: #EFEFEF;
    position:relative !important;
    padding:0 !important;
    margin:0 !important;     
    }
.RadMenu_Agionet .rmRightItem { padding: 2px 0;}
.RadMenu_Agionet .rmGroup .rmLink:hover,
.RadMenu_Agionet .rmGroup .rmFocused,
.RadMenu_Agionet .rmGroup .rmExpanded
{
    background: none;
    background-color:#FFC884;
    color: #004D6B;
    /*border-bottom: solid 1px #d8dde0;*/
}


.RadMenu_Agionet .rmHorizontal .rmExpandBottom,  
.RadMenu_Agionet .rmHorizontal .rmExpandTop  
{      overflow-x:hidden;
}

.RadMenu_Agionet .rmVertical .rmSeparator .rmText
{
    padding-top: 2px;
    background: #6788be;
    font-size: 1px;
}



/* mozilla only - disabled state */
.RadMenu_Agionet .rmLink.disabled,
.RadMenu_Agionet .rmLink.disabled:hover {
    color: #CCCCCC;
    border: solid 1px #CCCCCC;
    background-color: #FFFFFF;

}


/*right-to-left support*/

.RadMenu_Agionet_rtl,
.RadMenu_Agionet_rtl *
{
    text-align:right;
}

.RadMenu_Agionet_rtl .rmRootGroup .rmText
{
    padding: 0px;
    margin: 0;
    
}

.RadMenu_Agionet_rtl .rmGroup .rmText
{
    margin-left: 0 !important;

}

.RadMenu_Agionet_rtl .rmHorizontal .rmExpandBottom,  
.RadMenu_Agionet_rtl .rmHorizontal .rmExpandTop  
{  
  background-position:left center;  
}

.RadMenu_Agionet_rtl .rmVertical .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmExpandRight  
{  
  background: transparent url('Menu/Agionet/img/invertedGroupImageRTL.gif') no-repeat left center;
}

.RadMenu_Agionet_rtl .rmGroup .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmExpandRight  
{  
  background: transparent url('Menu/Agionet/img/groupImageRTL.gif') no-repeat 5px center;  
}

.RadMenu_Agionet_rtl .rmVertical .rmLink:hover .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmLink:hover .rmExpandRight,
.RadMenu_Agionet_rtl .rmVertical .rmFocused .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmFocused .rmExpandRight,
.RadMenu_Agionet_rtl .rmVertical .rmExpanded .rmExpandLeft,
.RadMenu_Agionet_rtl .rmVertical .rmExpanded .rmExpandRight
{
    background: transparent url(Menu/Agionet/img/invertedGroupImageRTL.gif) left center no-repeat;
}

.RadMenu_Agionet_rtl .rmGroup .rmLink:hover .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmLink:hover .rmExpandRight,
.RadMenu_Agionet_rtl .rmGroup .rmFocused .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmFocused .rmExpandRight,
.RadMenu_Agionet_rtl .rmGroup .rmExpanded .rmExpandLeft,
.RadMenu_Agionet_rtl .rmGroup .rmExpanded .rmExpandRight
{
    background: transparent url(Menu/Agionet/img/groupImageRTL.gif) 5px center no-repeat;
}

#Filter1_divSecondarySelection { margin-right: 1%}

/*#Control1_Help1_rmLogout .rmText,
#Control1_Help1_rmHelp .rmText */
.RadMenu_Agionet_center
{
    text-align:center;
    margin: 0 auto;
    width: 100px !important;
}


---- code ends here ------------



Please do the needful.


Thanks,

V. Raguraman.


Ragu
Top achievements
Rank 1
 asked on 04 Apr 2012
3 answers
122 views

Hi
i am using  raddatepicker in ascx page
<radCln:RadDatePicker ID="dtpDateOfBirthDriverDetail" Culture="(Default)" runat="server" Width="170px" EnableTyping="False">

 

<DateInput Skin="" ReadOnly="True">  

 

</DateInput>  

 

<Calendar runat="server" FastNavigationStep="12">  

 

</Calendar>  

 

<ClientEvents OnDateSelected="Driver_CalculateAge" />  

 

</radCln:RadDatePicker>
and its Culture is updated vai page_load of ascx.cs page  

System.Globalization.CultureInfo c = new System.Globalization.CultureInfo(sCulture); 

c.DateTimeFormat.CalendarWeekRule = System.Globalization.CalendarWeekRule.FirstFourDayWeek; 

c.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;
dtpDateOfBirthDriverDetail.Culture=c;

 

but its functinality is not working as expected for "week no"   or as working in other aspx pages
while it is working fine for aspx pages 

Milena
Telerik team
 answered on 04 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?