Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
137 views
I copied and pasted the demo code to do various tasks on the sliding panes because I could not get it to work.

Every thing I try gives me a javascript error saying method is not supported.  Below is your code which I used.  My guess is that my version and the version used in the Demo are different, but I can't find what version that demo is for.    My Telerik.Web.UI is version 2009.3.1314.35

Any help would be appreciated.




<script type="text/javascript">
                  
                /***********************************************
                            Sliding Zone examples
                ***********************************************/
                function GetZoneState ()
                {
                    var slidingZone = $find("SlidingZone1");
                    var zoneState = slidingZone.get_clientState();
                    alert(zoneState);
                }
                  
                /***********************************************
                            Pane examples
                ***********************************************/
              
                function ToggleEnableResize(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
  
                    if (!pane) return;
                    pane.set_enableResize(!pane.get_enableResize());
                    slidingZone.collapsePane(pane.get_id());
                    slidingZone.expandPane(pane.get_id());
                      
                }
                  
                function ToggleEnableDock(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
  
                    if (!pane) return;
                      
                    pane.set_enableDock(!pane.get_enableDock());
                    slidingZone.undockPane(pane.get_id());
                    slidingZone.collapsePane(pane.get_id());
                    slidingZone.expandPane(pane.get_id());
                      
                }
                  
                function GetPaneState(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
  
                    if (!pane) return;
                      
                    var paneState = pane.get_clientState();
                    alert(paneState);
                }
              
                function ToggleExpandPane(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var expandedPaneId = slidingZone.get_expandedPaneId();
                      
                    if (expandedPaneId == null || expandedPaneId != paneID) 
                    {
                        slidingZone.expandPane(paneID);
                    
                    else
                    {
                        slidingZone.collapsePane(paneID);
                    }
                }
                  
                function ToggleDockPane(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var dockedPaneId = slidingZone.get_dockedPaneId();
                      
                    if (dockedPaneId == null || dockedPaneId != paneID) 
                    {
                     slidingZone.collapsePane(paneID);
                        slidingZone.dockPane(paneID);
                    
                    else
                    {
                        slidingZone.undockPane(paneID);
                    }
                }
                  
                function TogglePaneTabVisibility(paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
                    if (pane.isTabDisplayed())
                    {
                        pane.hideTab();
                    
                    else 
                    {
                        pane.showTab();
                    }
                }
                  
                function ChangePaneContent (paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
                    if (!pane) return;
                      
                    pane.setContent('This is the NEW pane content ...');
                    slidingZone.collapsePane(pane.get_id());
                    slidingZone.expandPane(pane.get_id());
                }
                  
                function ChangePaneWidth (paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
                    if (!pane) return;
                      
                    var newWidth = (pane.get_width() == 200) ? 100 : 200 ;
                      
                    pane.set_width(newWidth); // set the width
                    slidingZone.collapsePane(pane.get_id());
                    slidingZone.expandPane(pane.get_id());
                }
                  
                function ToggleClickToOpen ()
                {
                    var slidingZone = $find("SlidingZone1");
                    slidingZone.set_clickToOpen(!slidingZone.get_clickToOpen());
                    alert("'ClickToOpen' property set to [" + slidingZone.get_clickToOpen() + "]");
                }
                  
                    function ToggleDockOnOpen (paneID)
                {
                    var slidingZone = $find("SlidingZone1");
                    var pane = slidingZone.getPaneById(paneID);
                    if (!pane) return;
                    pane.set_dockOnOpen(!pane.get_dockOnOpen());
                    alert("'DockOpen' property set to [" + pane.get_dockOnOpen() + "]");
                }
                  
    </script>
Adam Heeg
Top achievements
Rank 1
 answered on 22 Jul 2010
3 answers
157 views
Hello,

I've got a RadAjaxPanel, which contains a RadGrid, which contains some ASP buttons inside its CommandItemTemplate, including an Export To Excel button, which exports that grid's data.  The button itself works fine and the excel file is returned.  But after exporting, if I click my Update button elsewhere on the page, after the postback, the Excel file pops up again! 

I've tested with different scenarios and found that any of my buttons in that panel are getting re-called if they're called once and then a subsequent button is clicked.  I tried moving the buttons outside of the grid, and the same thing happened.  I moved the buttons outside of the panel, and the problem went away... but of course then the buttons no longer use AJAX and are not nicely placed in the grid where they belong. =)

So any idea what would cause the button's click event to happen even when it wasn't that button that was clicked?  It's almost like it's stored that a click should happen and it keeps clicking the button on every postback, no matter what actually caused it.

It's on a very complex page, but here are some code snippets that might be applicable.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AttorneyPanel" />
                <telerik:AjaxUpdatedControl ControlID="ButtonsPanel" />
                <telerik:AjaxUpdatedControl ControlID="DocumentsPanel" />
                <telerik:AjaxUpdatedControl ControlID="FundingsPanel" />
                <telerik:AjaxUpdatedControl ControlID="CaseCountsPanel" />
                <telerik:AjaxUpdatedControl ControlID="RemindersPanel" />
                <telerik:AjaxUpdatedControl ControlID="ReductionPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="AttorneyPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="FundingsPanel" />
                <telerik:AjaxUpdatedControl ControlID="DocumentsPanel" />
                <telerik:AjaxUpdatedControl ControlID="CaseCountsPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ButtonsPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="FundingsPanel" />
                <telerik:AjaxUpdatedControl ControlID="DocumentsPanel" />
                <telerik:AjaxUpdatedControl ControlID="CaseCountsPanel" />
                <telerik:AjaxUpdatedControl ControlID="RemindersPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxPanel ID="CaseListPanel" runat="server" ClientEvents-OnRequestStart="requestStart" EnableAJAX="true" OnAjaxRequest="CaseListPanel_AjaxRequest">
 
    <div class="box" style="width:95%;" align="center">
        <div class="boxheader">Attorney Case List</div>
        <telerik:RadGrid ID="CaseListGrid" runat="server" AllowSorting="True" AllowPaging="False"
                         OnNeedDataSource="CaseListGrid_NeedDataSource" OnPreRender="CaseListGrid_PreRender"
                         OnItemDataBound="CaseListGrid_ItemDataBound"
                         Skin="Oasis" EnableEmbeddedSkins="false" Width="100%" AllowFilteringByColumn="true" SortingSettings-EnableSkinSortStyles="false" OnItemCreated="CaseListGrid_ItemCreated" >
        <ClientSettings AllowColumnsReorder="true" >
            <Scrolling AllowScroll="False" UseStaticHeaders="True" />
            <Resizing AllowColumnResize="true" />
            <ClientEvents OnGridCreated="GridCreated3" /> 
        </ClientSettings>
          
        <MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False" AllowFilteringByColumn="true"
                         TableLayout="Auto" CommandItemDisplay="Top" ClientDataKeyNames="CaseId">
            <CommandItemTemplate>
                <asp:Button ID="DownloadPDF" runat="server" Text="Create Pdf" OnCLick="downloadPdf_Click" />
                <asp:Button ID="DownloadExcel" runat="server" Text="Create Excel" OnClick="downloadXLS_Click" />
                <asp:Button ID="showsum" Text="Show All" OnClick="show_all_Click" runat="server" />
            </CommandItemTemplate>

protected void downloadXLS_Click(object sender, EventArgs e)
{
    CaseListGrid.MasterTableView.ExportToExcel();
}
Veli
Telerik team
 answered on 22 Jul 2010
1 answer
97 views
any body help me.. the combobox takes too time while search items ... any solution ?

<

telerik:RadComboBox ID="ddlCustomer" runat="server" EnableVirtualScrolling="true"

 

 

ItemsPerRequest="10" Width="245px" TabIndex="1" EnableTextSelection="False"

 

 

AutoPostBack="true" Filter="StartsWith"

 

 

onselectedindexchanged="ddlCustomer_SelectedIndexChanged1">

 

 

</telerik:RadComboBox>

thanks,
Jagdish

Cori
Top achievements
Rank 2
 answered on 22 Jul 2010
1 answer
36 views
If this name sounds familair to another thread, it is. http://www.telerik.com/community/forums/aspnet-ajax/editor/prohibition-of-new-folder-creation.aspx.  That thread was answered and the solution does work, but introduces another problem.

I have two projects.  One where they use they need the ability to create a folder and the other where they want to prohibit this.  So, my option is to edit the file between compiles and deployments, which obviously isn't practicle or to override this somehow.

So, is there a way to copy FileBrowser.ascx and have one project refer to that instead of the stock one?  If so, can I have some step by step instructions? 
Gary
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
130 views

I am using the RadChart control to display a pie chart on my page.

However, it seems to be ignoring the LegendDisplayMode and StartAngle that I am setting on the series.

The RadChart is added to the page with the following:

1.<telerik:RadChart ID="ComplianceActionsChart" runat="server" SkinsOverrideStyles="true"
2.  ChartTitle-TextBlock-Text="Compliance Actions Pie Chart" AutoLayout="True" Skin="DeepRed"
3.  Width="330px" Height="200px" PlotArea-EmptySeriesMessage-TextBlock-Text="There is no data available yet."
4.  DefaultType="Pie">
5.</telerik:RadChart>

The code to create the series is:

1.ChartSeries dataSeries = new ChartSeries("Current Data", ChartSeriesType.Pie);
2.dataSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
3.dataSeries.Appearance.StartAngle = -90;
4. 
5.ChartSeriesItem free = new ChartSeriesItem(aCurrentData.Item1);
6.free.Name = "Item 1";
7.free.Label.TextBlock.Text = "#%";
8.dataSeries.AddItem(free);
I have 4 more items which are added to the chart.

When it displays, the legend only contains "Current Data" instead of the item names and the pie chart has the default rotation.

I tried creating the series in the aspx file with the appearance values set, but this produced the same result.

Is there anything I am missing in setting this up?

Mark Cheeseborough
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
237 views

Take the following (simple) datasource for a grid:

Restaurant    Food

------------------------

joe's pizza       pizza

taco bell          salad

mcdonalds      burger

mcdonalds      salad

taco bell          tacos

 

Now, I want each restaurant to display only once in a radgrid with only a single column (restaurant name), but I also want to programatically filter on 'food'. I've written a simple function to go through every row in a radgrid and 'hide' rows that have duplicate entries for the 'restaurant' column:

Public Sub RemoveDuplicateGridRows(ByVal grid As Telerik.Web.UI.RadGrid, ByVal columnIndex As String)
 
    'Array of column items to compare against for duplicates
    Dim aColumns As New ArrayList
    Dim value As String
 
    Dim gridRows As GridDataItemCollection = grid.MasterTableView.Items
    For Each row As GridDataItem In gridRows
        value = row.Cells(columnIndex).Text
        If Not aColumns.Contains(value) Then
            aColumns.Add(value)
        Else
            row.Visible = False
        End If
    Next
End Sub

This function works perfectly. The issue is that the paging feature on the RadGrid will still count the 'hidden' rows (where row.visible=false) when it generates the 'pager'. For example, if the paging is set to 10 items, but on page1 there are 4 rows 'hidden', it will only show 6 rows on the page. The 'alternating' line theme gets all messed up as well.

I've attached a screenshot of what the end result looks like. Completely removing the rows altogether is not an option, since I would not be able to get the desired result if i applied a filter for 'salad' and the 'mcdonalds' entry had been deleted since it was the 2nd 'mcdonalds' row.

Clayton
Top achievements
Rank 1
 answered on 22 Jul 2010
5 answers
133 views
Hi all!
I use Telerik 2009.3.1221.35 and dont have problem...

The new client has given me new design(CSS) of a site, I have shifted the my product on this new design and problems have begun... Here part of my code...

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

....

<
telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
 <asp:Panel ID="Panel1" runat="server">
  
  
            <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true" OnTextChanged="CheckValues">
        <Items>
            <telerik:RadComboBoxItem runat="server" Text="some1" Value="s1" />
            <telerik:RadComboBoxItem runat="server" Text="some2" Value="s2" />
            <telerik:RadComboBoxItem runat="server" Text="some3" Value="s3" />
            <telerik:RadComboBoxItem runat="server" Text="some4" Value="s4" />
         </Items>
    </telerik:RadComboBox>
  
  
 </asp:Panel>
</telerik:RadAjaxPanel>


Well, what is interesting in Mozilla FireFox all works good, but in Internet Explorer or Opera not work!

In Internet Explorer, i select in ComboBox something value, and ComboBox reset again to initial value.
I dont understand whats is can be, i searched for similar problems at your forums but have not found.
Please help!

 

Serial Killer
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
117 views
Hi, i have a grid built from values in database tables. The data is stored vertically
Partial NeedDataSource is:

foreach

 

(DataRow oDR in oStructureDT.Rows)

 

{

oNormalDT.Columns.Add(

new DataColumn(oDR["ColumnName"].ToString(),

 

ConvertType(oDR[

"DataType"].ToString())));

 

 

}

The DataType field is in the db as date, time, varchar and so on...
I'm trying to get the RadTimePicker to display in the edit form for a time DataType but all i can get is the calendar
I have AutoGenerateColumns = true, so i may have to rethink that. Can any one confirm?
I'm guessing i need to make the adjustment in itemdatabound, but not sure how to go about it.

Regards
Rod

Rod Barrand
Top achievements
Rank 1
 answered on 22 Jul 2010
5 answers
269 views
Hello,
My application is built on telerik ajax platform. I keep on getting following error at random on telerik tab strip control that have dynamic page view which loads user control. The sequence is random and occurs on any tab. If i set enableajax=false than i never get error and everything works great. Is there a way i can figure out where the error orginates from?
Once i get error the page hangs and user has to refresh the page causing loss of data.

 Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500  Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8f393b2b-3315-402f-b504-cd6d2db001f6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3acf630f82-0e77-4618-bf5c-22b81f4ec1c5%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3a8e6f0d33%3aaa288e2d%3aa7e79140%3a6a6d718d%3a874f8ea2%3a19620875%3a33108d14%3a8674cba1%3ab7778d6c%3ac08e9f8a%3aa51ee93e%3a59462f1, line 6 character 84093

Secondly i have robust error handling mechanism on server side (elmah), log4net at middle tier and database logger.
Can i implement some centralized error handling for ajax erros?

This error is driving me crazy

Line: 6
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'Telerik.Web.UI 2010.'.

Mac P
Top achievements
Rank 1
 answered on 22 Jul 2010
1 answer
199 views

 

<telerik:RadGrid ID="rgHourlyPeople" runat="server"

 

 

onneeddatasource="rgHourlyPeople_NeedDataSource" GridLines="None" AllowPaging="True"

 

 

AutoGenerateColumns="False" AllowSorting="True"

 

 

onselectedindexchanged="rgHourlyPeople_SelectedIndexChanged">

I have set AllowSorting="True" for the grid, buton only the bound column get sorted, the GridButtonColumn column ( when ButtonType="LinkButton") sort function won't work.

Anynow knows how to sort GridButtonColumn column?

Thanks,
Jessie

 

Radoslav
Telerik team
 answered on 22 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?