Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
Hi there,

I have a Radgrid with server-side databinding and an onneeddatasource-event. 
I want to change the pagesize dynamically in addiction to the mastertableview-size.
All looks good but when the TableView was updated with the new pagesize, i can't select the rows anymore...

The Script:
<script type="text/javascript">
    function GridCreated(sender, eventArgs) {
            //gets the main table scrollArea HTLM element  
            var scrollArea = document.getElementById(sender.get_element().id + "_GridData");
            var tvHeight = scrollArea.offsetHeight;
            var size = Math.floor(tvHeight / 64);
            //alert(size);
            var tableView = $find("<%= RadGridView.ClientID %>").get_masterTableView();
            tableView.set_pageSize(size);
    }
</script>

HTML-Code:
<telerik:RadGrid ID="RadGridView" AutoGenerateColumns="False" onitemdatabound="RadGridViewItemDataBound" OnItemCreated="RadGridViewItemCreated" AllowSorting="True" AllowPaging="True" EnableViewState="True" OnPageIndexChanged="RadGridPageIndexChanged" OnNeedDataSource="RadGridView_NeedDataSource" runat="server">
<PagerStyle Mode="NextPrev" Position="Bottom" AlwaysVisible="True" CssClass="RadGridPager" PagerTextFormat="Seite blättern: {4} Seite {0} / {1} - Einträge {2} - {3} / {5}"/>
<ClientSettings>
    <Selecting AllowRowSelect="true" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
    <ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
<MasterTableView TableLayout="Fixed" Font-Size="18px" ClientDataKeyNames="IsBlueLight,IsFailure,IsStopped,OrderNr,ObjectNr" DataKeyNames="OrderNr">
    <NoRecordsTemplate>
        <div>
            Keine Einträge
        </div>
    </NoRecordsTemplate>
    <Columns>
         .........
</telerik:RadGrid>

Code-Behind:
....
protected void RadGridView_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    RadGridView.DataSource = Session[Constants.ORDERLIST] as List<Auftrag>;
}
....


thanking you in anticipation

Best regards,
Markus 
Tsvetina
Telerik team
 answered on 19 Sep 2012
1 answer
190 views
I have purchased lartest Telerik and updated to the latest patch  (Q2 2012 SP2). I'm using the RadEditor in default configuration without any mofdification or custom providers.

The Image Editor Dialog loads with the blank image when I folow the steps as mentioned below.

1. Click on "Image Manager" button in the toolbar of the editor
2. Image Manager dialog opens and selec an image from the list hich pushes the image to the right hand side pane (im.jpg)
3. Click on the "Image Editor" at the top of the pane as described in 2 above
4. Image Editor dialog opens up with a balnk image (ie.jpg)

Screen shots are attached to show my case and the code snippet is also given below.
Pleas help!


<telerik:RadEditor
    runat="server"
    AllowScripts="true"
    DialogsCssFile="~/_Global/css/RadEditor_Skin.css"
    ToolsFile="~/_Global/modules/telerik_editor/ToolsFile.xml"
    TableLayoutCssFile="~/_Global/css/TableLayoutCss.css"
    Skin="Outlook"
    ID="radEdtContent"
    width="100%"
    Height="500px">
    <CssFiles>
      <telerik:EditorCssFile Value="~/_Global/css/RadEditor_Skin.css" />
    </CssFiles>
</telerik:RadEditor>

string[] sImagePath = new string[] { "~/_Global/" + ModuleProperties.SiteID + "/img/content" };
 radEdtContent.ImageManager.ViewPaths = sImagePath;
 radEdtContent.ImageManager.UploadPaths = sImagePath;
Rumen
Telerik team
 answered on 19 Sep 2012
3 answers
153 views
Hi all

 I have a  RadComboBox in asp.net and i have used  AllowCustomText="true" . so that way if user does not want to select the pre enter value he/she can enter his own value in radcombo box . but when a user can enter any element such like <b>,<br> mean any html tag and press enter button for submitting data it show error . i have create a java script code that removed <> before any text on blur event and it working fine to me but when i click to save the document it show error page . How can i solve this problem ?



Thanks all 

Sushobhit Raman
Princy
Top achievements
Rank 2
 answered on 19 Sep 2012
3 answers
595 views
Hi,

 

Setup Information:

 

·         Visual studio v2005

·         .NET Framework v2.0

·         Reference for following dlls is added in the Project:

o   System.Web.Extensions.dll

            Path: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\System.Web.Extensions.dll

o   Telerik.Web.UI.dll

            Path: C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Bin\ Telerik.Web.UI.dll

When we are using the Telerik context menu control on our page, we are getting the following error:
'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager You will be automatically directed to the previous page in 5 seconds.

We also  added all the suggested nodes in the Web.Config file, but the error is still there.

Also note that when we are using Telerik 3.5 dll with VS2008, everything is working fine.

Waiting eagerly for your response,
Abhishek

Mohammad
Top achievements
Rank 1
 answered on 19 Sep 2012
0 answers
58 views
Dear ALL,

We are developing project using asp.net.here we have grid to display list of user details and there is option to edit their details.an d also edit page is seperate page.
My Question is,
  • when click edit page navigation link my edit page will be display as lightbox, How do build Lightbox for that.

Thanks in Advance..!

Susi
Top achievements
Rank 1
 asked on 19 Sep 2012
11 answers
550 views
Is there a straight forward way to make the rad-button appear the same for both standard and link buttons? I want the control appearance to remain the same as the standard button even when using link button functionality.
Bozhidar
Telerik team
 answered on 19 Sep 2012
1 answer
187 views
I am trying to hide a menu item from the client, but after the menu is hidden it reappears.
What am I doing wrong?

Here's the sample code:
<%@ 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>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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">
      function ClientClicked(sender, args) {
        var menu = $find("<%= treeMenu.ClientID %>");
  
        var items = menu.get_items();
        items.getItem(2).hide();
      }
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Simple">
    </telerik:RadSkinManager>
    <div>
<telerik:RadMenu Runat="server" ID="treeMenu">
  <Items>
    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">
    </telerik:RadMenuItem>
    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2">
    </telerik:RadMenuItem>
    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3">
    </telerik:RadMenuItem>
  </Items>
    </telerik:RadMenu><br />
    </telerik:RadMenu><br />
    <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" 
      OnClientClicked="ClientClicked">
    </telerik:RadButton>
   
    </div>
    </form>
</body>
</html>
Shinu
Top achievements
Rank 2
 answered on 19 Sep 2012
3 answers
116 views
How to cancal file uplading and alert a message if the uploaded file size is zero?
Plamen
Telerik team
 answered on 19 Sep 2012
1 answer
252 views
I have a radgrid with a combobox contained in an edit form template.  On opening up a jquery popup I want to populate that combobox using a radgrid selectedindexchanged event. 

I cannot get a reference to the item being edited, I have managed to use:
GridEditFormItem item = RadGrid2.MasterTableView.GetItems(GridItemType.EditFormItem)[0] as GridEditFormItem;
which gets me the first item being edited if its open, but no other items - I get a null object reference.  I believe its due to the [0] index. 
Is there a way to traverse the radgrid to find which item is currently being edited and access the Edit Form template that way?

I have tried:
foreach(GridDataItem gri in RadGrid2.EditItems)

which was suggested by another user but no good.

thanks.
Morgan
Top achievements
Rank 2
 answered on 19 Sep 2012
3 answers
337 views
Hi I am trying to create an edit form modal popup mode and that the grid remains disabled and gray.
I have the following code and it works fine, just not the grid is disabled me.
any suggestions?

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebAppNueva._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>




<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <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>
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">


            <script type="text/javascript">
                function RowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
            </script>


        </telerik:RadCodeBlock>


            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />


    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateDeleteColumn="True"
        AutoGenerateEditColumn="True" CellSpacing="0" GridLines="None" 
        ShowStatusBar="true"
        OnNeedDataSource="RadGrid1_NeedDataSource"
        OnUpdateCommand="RadGrid1_UpdateCommand"
        OnInsertCommand="RadGrid1_InsertCommand" 
        OnPreRender="RadGrid1_PreRender"
        OnDeleteCommand="RadGrid1_DeleteCommand" 
        OnItemCreated="RadGrid1_ItemCreated"
        OnEditCommand="RadGrid1_EditCommand" 
        OnItemDataBound="RadGrid1_ItemDataBound"
        >
        
        <MasterTableView EditMode="PopUp" CommandItemDisplay="Top"  DataKeyNames="idPersona">
         <EditFormSettings UserControlName="WebUserControlEditPersona.ascx" 
         EditFormType="WebUserControl">
           </EditFormSettings>
           
        </MasterTableView>
         <ClientSettings>
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>


    </telerik:RadGrid>
   <asp:PlaceHolder ID="PlaceHolder1" runat="server">
    </asp:PlaceHolder>
</asp:Content>

Shinu
Top achievements
Rank 2
 answered on 19 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?