Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
144 views
Hello,
Filtering in a grid is not working for me. Possibly i'm missing a script, but when i filter, the page returns a blank grid. Here is my .aspx code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm.aspx.cs" Inherits="Adroit_Sandbox.WebForm" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!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>
</head>
<body>
    <form runat="server" id="mainForm" method="post">
    <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" />
    </Scripts>
    </telerik:RadScriptManager>
        <!-- content start -->
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1"   />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
 
            <telerik:RadCodeBlock runat="server" ID="radCodeBlock">
            <script type="text/javascript">
                function showFilterItem() {
                    $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
                }
                function hideFilterItem() {
                    $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
                }
            </script>
        </telerik:RadCodeBlock>
 
            <telerik:RadGrid
                ID="RadGrid1"
                OnSortCommand="RadGrid1_SortCommand"
                OnPageIndexChanged="RadGrid1_PageIndexChanged"
                Width="97%"
                OnPageSizeChanged="RadGrid1_PageSizeChanged"
                AllowFilteringByColumn="true"
                AllowSorting="True"
                PageSize="100"
                AllowPaging="True"
                AllowMultiRowSelection="True"
                runat="server"
             Height="700"
                Gridlines="None">
              <MasterTableView Width="100%" Summary="RadGrid table" /> 
              <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" FrozenColumnsCount="1">
                </Scrolling>
              </ClientSettings>
              <PagerStyle Mode="NextPrevAndNumeric" />
            </telerik:RadGrid>
        <!-- content end -->
    </form>
</body>
</html>

Help would be greatly appreciated!
Thanks
Pete
Princy
Top achievements
Rank 2
 answered on 14 Oct 2010
4 answers
154 views
I have a tabstrip that I add tabs on the client side dynamically.

<telerik:RadTabStrip ID="RadTabStrip1" ScrollChildren="true" ScrollButtonsPosition="Right" Orientation="HorizontalTop"
                        SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" OnClientTabUnSelected="ontabUnselected"
                        OnClientTabSelected="ontabselected" Skin="Office2007">

I need to have a scroller when the width of the tabs are too long for the page to handle. Currently, what happens is that the last tab that does not fit the length of the page creates a second level of tabs below the original tabs.

If the length of the tabs are too long on page load, the scrolling works. But if the length of the tabs does not require a scroller on page load, the scroller does not come up even when a lot of tabs are already added.

How do I set the scrolling to true at the client side when needed?
dick
Top achievements
Rank 1
 answered on 14 Oct 2010
2 answers
176 views

Hi, Telerik:

    RadSplitter heigth 100% work fine on my develop environment, but when I deployed it to server, it worked nothing!

What's wrong with my code?

splitterInWindowX.aspx:

01.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="splitterInWindowX.aspx.cs" Inherits="__TEST__splitterInWindowX" %>
02.  
03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
04.  
05.<html xmlns="http://www.w3.org/1999/xhtml">
06.<head runat="server">
07.    <title></title>
08.    <style type="text/css">
09.        .iframe      { width:100%; height:100%; overflow:hidden; }
10.    </style>
11.    <telerik:RadCodeBlock ID="_codeBlock" runat="server">
12.        <script language="javascript" type="text/javascript">
13.            // <Procedure | | >
14.            function setIFrameHeight(oIFrame) {
15.                try {
16.                    var nHeight = 400;
17.                    if (typeof window.innerHeight != 'undefined') { nHeight = window.innerHeight - 90; }
18.                    else if (typeof document.documentElement != 'undefined') { nHeight = document.documentElement.clientHeight - 90; }
19.                    if (oIFrame.style.heihgt != nHeight) oIFrame.style.height = nHeight;
20.                }
21.                catch (e) { window.status = e.Description; }
22.            }
23.            // <Event | | >
24.            function bodyResize() { setIFrameHeight($get("iframeContent")); }
25.        </script>
26.    </telerik:RadCodeBlock>
27.</head>
28.<body onresize="bodyResize();">
29.<form id="_frmSplitterInWindowX" runat="server">
30.    <telerik:RadScriptManager ID="_managerScript" runat="server" />
31.    <telerik:RadSkinManager   ID="_managerSkin"   runat="server" Skin="Web20" />
32.    <div style="height:52px">
33.        <telerik:RadMenu ID="_menubar" runat="server" />
34.    </div>
35.    <asp:Panel ID="_pnlIFrame" runat="server">
36.        <iframe id="iframeContent" runat="server" class="iframe" frameborder="0" src="splitterInWindowM.aspx" />
37.    </asp:Panel>
38.</form>
39.</body>
40.</html>

splitterInWindowMaspx:

01.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="splitterInWindowM.aspx.cs" Inherits="__TEST__splitterInWindowM" %>
02.  
03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
04.  
05.<html xmlns="http://www.w3.org/1999/xhtml">
06.<head runat="server">
07.    <title></title>
08.    <telerik:RadCodeBlock ID="_codeBlock" runat="server">
09.        <script language="javascript" type="text/javascript">
10.            function _btnPopup_OnClientClick() {
11.                var oWin = radopen("./splitterInWindowD.aspx", "_windowSplitter");
12.                oWin.maximize();
13.                return false;
14.            }
15.        </script>
16.    </telerik:RadCodeBlock>
17.</head>
18.<body>
19.<form id="_frmSplitterInWindowM" runat="server">
20.    <telerik:RadScriptManager ID="_managerScript" runat="server" />
21.    <telerik:RadSkinManager   ID="_managerSkin"   runat="server" Skin="Black" />
22.    <telerik:RadWindowManager ID="_managerWindow" runat="server" VisibleStatusbar="false">
23.        <Windows>
24.            <telerik:RadWindow ID="_windowSplitter" runat="server" />
25.        </Windows>
26.    </telerik:RadWindowManager>
27.    <asp:Button ID="_btnPopup" runat="server" Text="popup" OnClientClick="return _btnPopup_OnClientClick();" />
28.</form>
29.</body>
30.</html>

splitterInWindowD.aspx:

01.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="splitterInWindowD.aspx.cs" Inherits="__TEST__splitterInWindowD" %>
02.  
03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
04.  
05.<html xmlns="http://www.w3.org/1999/xhtml">
06.<head runat="server">
07.    <title></title>
08.    <style type="text/css">
09.        HTML, BODY, FORM { width:100%; height:100%; margin:0px; padding:0px; }
10.        SPAN.rmText { font-size:12pt; }
11.  
12.        DIV.rspSlideTitle { font-size:12pt !important; }
13.  
14.        .paneEditItem  { position:relative; }
15.        TABLE.editItem { width:100%; }
16.        SPAN.eiTitle M { font-size:medium; width:80px; }
17.        SPAN.eiTitle S { font-size:small; }
18.  
19.        LI.rcbItem, LI.rcbHovered, .rtbText, .RadListBox span.rlbText { font-size:12pt; }
20.    </style>
21.    <telerik:RadCodeBlock ID="_codeBlock" runat="server">
22.        <script language="javascript" type="text/javascript">
23.            function _editor_OnClientLoad(oSender, oArgs) { m_oEditor = oSender; _paneEditor_OnClientResized(); }
24.            function _splitter_OnClientLoad(oSender, oArgs) { _paneEditor_OnClientResized(); }
25.            function _paneEditor_OnClientResized(oSender, oArgs) {
26.                var oPane = oSender ? oSender : $find("<%= _paneEditor.ClientID %>");
27.                if (!oPane || !m_oEditor) return;
28.                var nWidthEditor = parseInt(oPane.get_width()) - 5;
29.                var nHeightEditor = parseInt(oPane.get_height()) - 5;
30.                if (isNaN(nWidthEditor) || nWidthEditor < 0) nWidthEditor = 0;
31.                if (isNaN(nHeightEditor) || nHeightEditor < 0) nHeightEditor = 0;
32.                m_oEditor.setSize(nWidthEditor, nHeightEditor);
33.            }
34.        </script>
35.    </telerik:RadCodeBlock>
36.</head>
37.<body>
38.<form id="_frmSplitterInWindowD" runat="server">
39.    <telerik:RadScriptManager ID="_managerScript" runat="server" />
40.    <telerik:RadSkinManager   ID="_managerSkin"   runat="server" Skin="Windows7" />
41.  
42.    <div>
43.        <telerik:RadSplitter ID="_splitterAll" runat="server" Width="100%" Height="100%" OnClientLoad="_splitter_OnClientLoad" Orientation="Horizontal">
44.            <telerik:RadPane ID="_pane2Bar" runat="server" Height="58" MaxHeight="58" MinHeight="58" Scrolling="None">
45.                <telerik:RadToolBar ID="_toolbar" runat="server" Width="100%" />
46.                <telerik:RadMenu    ID="_menubar" runat="server" Width="100%" />
47.            </telerik:RadPane>
48.  
49.  
50.            <telerik:RadSplitBar ID="_splitbarMenu" runat="server" EnableResize="false" />
51.  
52.  
53.            <telerik:RadPane ID="_paneMaster" runat="server">
54.                <telerik:RadSplitter ID="_splitterMaster" runat="server" Orientation="Vertical">
55.                    <telerik:RadPane ID="_paneLeft" runat="server" Width="22" Height="100%">
56.                        <telerik:RadSlidingZone ID="_zoneSlidingLeft" runat="server" SlideDirection="Right">
57.                            <telerik:RadSlidingPane id="_paneSlidingLeft" runat="server" Title="Info" Width="420" CssClass="paneEditItem" Scrolling="Both" DockOnOpen="true">
58.                            </telerik:RadSlidingPane>
59.                        </telerik:RadSlidingZone>
60.                    </telerik:RadPane>
61.                    <telerik:RadSplitBar ID="_splitbarLeft"  runat="server" />
62.  
63.  
64.                    <telerik:RadPane ID="_paneEditor" runat="server" Height="100%" OnClientResized="_paneEditor_OnClientResized">
65.                        <telerik:RadEditor ID="_editor" runat="server" EditModes="Design" Width="99%" Height="99%"
66.                                OnClientLoad="_editor_OnClientLoad">
67.                            <Content></Content>
68.                            <Modules>
69.                                <telerik:EditorModule Visible="false" />
70.                            </Modules>
71.                        </telerik:RadEditor>
72.                    </telerik:RadPane>
73.                </telerik:RadSplitter>
74.            </telerik:RadPane>
75.        </telerik:RadSplitter>
76.    </div>
77.</form>
78.</body>
79.</html>

ChainHome Yang
Top achievements
Rank 1
 answered on 14 Oct 2010
0 answers
134 views
I had to create a support ticket to find out how to override the save as function, because I needed to strip all special characters from the file name. There are demos that show creating a custom provider, but they involve a lot of code and methods, and I only wanted to override the file save.
Telerik gave me a great solution, so I thought I would pass it on. I am not sure why they don't make public the resolutions to these support tickets in some generic way, it seems like it would be useful to a lot of us out there.
anyways, here is the class file for the custom provider:
using System.IO;
using System.Web;
using Telerik.Web.UI;
using Telerik.Web.UI.Widgets;
  
namespace Blah.BlahBlah
{
    public class CustomFileSystemProvider : FileSystemContentProvider
    {
        public CustomFileSystemProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
            : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
        {
  
        }
  
        public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
        {
            string fileName = Helper.RemoveSpecialCharacters(file.GetName());
  
            string pathToSave = Path.Combine(Context.Server.MapPath(path), fileName);
            file.SaveAs(pathToSave);
  
            string virtualPath = VirtualPathUtility.Combine(path, fileName);
            return virtualPath;
        }
    }
}
And it is implemented on the individual control like so:
FileExplorer1.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;

Hopefully, this can be helpful to somebody.
Atlas
Top achievements
Rank 1
 asked on 14 Oct 2010
2 answers
76 views
Hey guys and gals,

First time posting here - but I'm thus far really liking all the products. In fact, I'll probably pick up the control pack if everything works out.

In any case, I'm a bit of a noob with all this and was looking for a solution to my issue. This situation:

I have a Stand-Alone Zone and a Datalist which has a Zone and Dock in each populated row. The end-all is that the user will populate the Stand-Alone with his/her selection from the Datalist.

I loaded everything in, ran it, and got an error.

 """"The ID of RadDock with ID='RadDock1' is not unique to RadDockLayout with ID='RadDockLayout1'. Please, set the UniqueName property of RadDock with ID='RadDock1' with a value, which is unique to RadDockLayout with ID='RadDockLayout1'."""""

So - I'm pretty sure I'm just not adding a spot of code somewhere or something. Anyhoo - is there anyone out there who could give me a hand with the solution?

I greatly appreciate it!
Thanks in advance.

Regards,

Matt
Matt
Top achievements
Rank 1
 answered on 13 Oct 2010
7 answers
140 views
Hi, I am facing a strange issue with RadMenu.
I set an OnClientItemClicking javascript function that gets correctly called in FireFox but does nothing in IE8 (if I put an alert in there it is not shown).
Is there any way I can debug this issue?
Thanks
Luca
Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Oct 2010
5 answers
47 views
Hi,

I'm using RadChart in a SharePoint (MOSS 2007) enviroment.

The MOSS servers have sessionState disable. Thus I use the TempImageFolder property
Images of the charts are renderd. No problems here.

Now I started using Active Regions for drill down use of the graph.
And now I'm getting session state errors.

Is it not possible to have Active Regions without having sessionState on true ?

-----------------------------------------------------------------------------------------------------------
F.Y.I -> With Session state ON, the drill down function works.

Greetings
Erik
Erik
Top achievements
Rank 1
 answered on 13 Oct 2010
6 answers
144 views
I created a page for our internal site that uses the editor.   The end users are allowed to use this editor to add content to the site.  The problem is that when the content is in the editor the fonts appear much larger than when the content is displayed on the view page.  The view page is a totally seperate page from the editor page.

I looked at the HTML and the code is different between the two.  The editor uses <style> tags and the resulting html has <FONT> tags.

Is there some option I should be setting to get the output from the editor to use <style> tags?

Thank you
Alva
Top achievements
Rank 1
 answered on 13 Oct 2010
2 answers
197 views

hi,

i've recently encounter problem while working with radtreeview:

i've radtreeview with datasource (datatable) from database however when i click button i want to change that datasource 

(rebuild radtreeview) and load radtreeview with new nodes and roots; data from database are proper but assigning it to radtreeview 

doesn't work - old "state" radtreeview remains.

is there any way to do this ?

best regards

ksysiek

KRZYSZTOF
Top achievements
Rank 1
 answered on 13 Oct 2010
2 answers
117 views
I have an ajaxified grid that sits in a content page. The master page has a RadScriptManager tag and the content page has a ScriptManagerProxy tag. In the grid, I'm using the CommandItemSettings tag to display my Export to Excel buttons...

<CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordImageUrl="../../App_Themes/InfoSource/Images/ico_add_24.png"
    AddNewRecordText="Add a Request" ShowExportToExcelButton="true" ExportToExcelImageUrl="../../App_Themes/InfoSource/Images/ico_excel_24.png"
    ExportToExcelText="Export to Excel" ShowExportToPdfButton="true" ExportToPdfImageUrl="../../App_Themes/InfoSource/Images/ico_acrobat_24.png"
    ExportToPdfText="Export to PDF" ShowRefreshButton="true" RefreshImageUrl="../../App_Themes/InfoSource/Images/ico_refresh_24.png"
    RefreshText="Refresh" />

I understand that I need to turn Ajax off for these buttons so that the export actually works. I'm trying to turn them off from the code behind using the following code...

if (e.Item is GridCommandItem)
{
    ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
 
    Button btncmd = (e.Item as GridCommandItem).FindControl("ExportToExcelButton") as Button;
    scriptManager.RegisterPostBackControl(btncmd);
    btncmd = (e.Item as GridCommandItem).FindControl("ExportToPdfButton") as Button;
    scriptManager.RegisterPostBackControl(btncmd);
}

but I get an error:

Value cannot be null.
Parameter name: control

 
scriptManager.RegisterPostBackControl(btncmd);

I can't seem to figure out if I just don't have the name of the button's correct or if I have the ScriptManager setup wrong. Can you give me a hand with this? Thanks.
Philip Senechal
Top achievements
Rank 1
 answered on 13 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?