Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
60 views
I have a RadComboBox and other controls, including an ASP Repeater within a RadAjaxPanel.  
The contents of the combo box are fairly typical, a list of numbers with -1 and blank text indicating that nothing has been selected.
The repeater displays a list of bound RadButton check boxes.

If the combo box has a valid value (> 0) selected, the server-side selected index changed event of the combo box calls a routine to repopulate the repeater, 

If the combo box is set to -1 what I would like to happen is for the post back to be canceled and the most recent collection of controls in the repeater (and their checked values) to be retained, and the combo box itself to retain its -1 value.

Is this possible?
Boris
Top achievements
Rank 1
 answered on 30 May 2014
3 answers
96 views
Hi,

I'm using Telerik 2011 Q2 ( file version 2011.2.712.0,  size: 2029840 bytes)


I have the following problem: When the Telerik CDN is enabled  AsyncUpload  fail to show (seems to try to load silverlight even SL plugin is not available), using embedded scripts works fine (load flash when no SL available) but lose CDN benefits.

Comparing the AsyncUpload js file embeded on Telerik dll with the hosted on Telerik CDN both files are different. I was believe will be the identical but not.

Why the file hosted on CDN is different and have errors? 

Where is hosted the right file for my Telerik build? and how force ScriptManager to use it?


Please any advice is welcome.


CDN version:
http://aspnet-scripts.telerikstatic.com/ajaxz/2011.2.712/AsyncUpload/RadAsyncUploadScripts.js

Embeded file:  
https://mega.co.nz/#!NZ0VEQJK!1kSwpohH28IdWrien1PHP6xA9TG0gJZeOnCIhS-96Ls

cannot attach zip files...




Boyan Dimitrov
Telerik team
 answered on 30 May 2014
2 answers
247 views
I am using RadGrid which has both Filter and Pager.
When filtered 3 pages after that I clicked on page 2 then radgrid show page 2 of all data (filter not working at this time)
Sometimes, Filter also did not work properly. I don't know why. Can someone help me now?
_fileRadGrid.MasterTableView.FilterExpression always = empty so I have to use _fileStatusPendingRadGrid.MasterTableView.GetColumnSafe("Status").CurrentFilterValue to check HasFilter.

When I reload the page then pager and filter are not working properly. (I also code for another web app with filter and pager are working fine)
Please tell me why that code not working? the version of telerik is 2014.1.225.45

Inline:
<telerik:RadGrid ID="_fileRadGrid" runat="server" AutoGenerateColumns="False" AllowSorting="False"  
        AllowPaging="true" AllowFilteringByColumn="True" EnableAJAX="True" EnableViewState="True" ViewStateMode="Enabled"
        EnableEmbeddedSkins="False" EnableEmbeddedBaseStylesheet="False" Skin="NitroCleo" PageSize="10" EnableLinqExpressions="False"
        OnNeedDataSource="FileNeedDataSource"
        OnItemDataBound="FileItemDataBound">        
        <ClientSettings>
            <clientevents ongridcreating="OnGridCreated"/>
        </ClientSettings>
        <MasterTableView DataKeyNames="FileIdentifier" ClientDataKeyNames="FileIdentifier"
            NoMasterRecordsText="No file" AllowFilteringByColumn="True" >
            <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="6" />
            <Columns>
                <telerik:GridTemplateColumn HeaderStyle-Width="25px" AllowFiltering="False">
                    <ItemTemplate>
                        <asp:Label ID="_iconLabel" runat="server"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Status" UniqueName="Status" DataField="Status" AutoPostBackOnFilter="True"
                    CurrentFilterFunction="Contains">
                    <ItemTemplate>
                        <asp:HyperLink runat="server" ID="_statusLink"></asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

Code Behind:
        protected void FileNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            BindFileGrid(true);            
        }

        private void BindFileGrid(bool needDataBind = false)
        {
            var listFile = new List<FileItem>();
            int virtualItemCount = 0;
            int pageSize = 0;
            int pageIndex = 0;

            try
            {
                if (!HasApplyFilter())
                {
                    pageSize = _fileRadGrid.PageSize;
                    pageIndex = _fileRadGrid.CurrentPageIndex;
                }
                _fileRadGrid.AllowCustomPaging = !HasApplyFilter();

                listFile = GetDataSourceForFile(pageIndex, pageSize, out virtualItemCount);
            }
            catch (Exception ex)
            {
                Log.Error(String.Format("An error while get file. Error: {0}", ex.Message));
            }
            
            _fileRadGrid.MasterTableView.PagerStyle.AlwaysVisible = virtualItemCount == 0 ? false : true;    

            if (listFile != null)
            {
                _fileRadGrid.DataSource = listFile;
                _fileRadGrid.VirtualItemCount = virtualItemCount;

                if (!needDataBind)
                {
                    _fileRadGrid.DataBind();
                }
            }
        }

Thanks for your reading!
Pavlina
Telerik team
 answered on 30 May 2014
4 answers
98 views
Hi,
I am adding a new menu to my RadGrid HeaderContextMenu :
        var newFilterItem = new Telerik.Web.UI.RadMenuItem();
        newFilterItem.set_text("Clear All Filters");
        newFilterItem.set_postBack(true);
        sender.get_items().insert(0, newFilterItem);

I expect that since postback is true, when menu is clicked, ItemClick event of HeaderContext menu should be fired.
Postback is happening but ItemClick event is not firing!! Is there any other event that gets fired when postback is true for Header Menu?
Tushar
Top achievements
Rank 1
 answered on 30 May 2014
2 answers
134 views
In the following code snippet I have a child grid that has a hyperlink in the CommandItemTemplate, how can I access this so that I can set the url for the hyperlink (It needs the id field from the parent row in it)? I've tried several places such as PreRender and OnItemDataBound but I haven't been able to find anywhere where FindControl doesn't return null.  

This was my last try in the Prerender event of the parent Grid.
protected void radPurchaseOrder_PreRender(object sender, EventArgs e)
    {
        foreach (GridDataItem item in radPurchaseOrder.Items)
        {
            if (item.Expanded)
            {
                HyperLink link = item.FindControl("linkDoInvoiceExport") as HyperLink;
                if (link != null)
                {
                        //do stuff here if the above ever isn't null
                }
 
 
            }
        }
 
 
    }


<telerik:RadGrid ID="radPurchaseOrder" runat="server" AllowPaging="True" ClientSettings-ClientEvents-OnGridCreated="GridCreated"
           AllowSorting="True" AutoGenerateColumns="False" enableajax="true" OnNeedDataSource="radPurchaseOrder_NeedDataSource"
           ShowGroupPanel="True" OnItemDataBound="radPurchaseOrder_ItemDataBound" HeaderStyle-HorizontalAlign="Center"
           OnDataBound="radPurchaseOrder_DataBound" OnDetailTableDataBind="radPurchaseOrder_DetailTableDataBind" AllowFilteringByColumn="True" GridLines="None" CellSpacing="0"  OnItemCreated="radPurchaseOrder_ItemCreated"
            OnPreRender="radPurchaseOrder_PreRender">
           <ExportSettings>
               <Pdf PageBottomMargin="" PageFooterMargin="" PageHeaderMargin="" PageHeight="11in"
                   PageLeftMargin="" PageRightMargin="" PageTopMargin="" PageWidth="8.5in" />
           </ExportSettings>
           <HeaderStyle HorizontalAlign="Center" />
           <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
               <ClientEvents OnGridCreated="GridCreated" />
               <Scrolling AllowScroll="True" UseStaticHeaders="true" />
               <Resizing AllowColumnResize="True" AllowRowResize="False" EnableRealTimeResize="True" />
           </ClientSettings>
           <MasterTableView Width="100%" TableLayout="Fixed" DataKeyNames="OrderNumber, LineItemNumber" HierarchyLoadMode="ServerOnDemand" Name="PoData">
               <RowIndicatorColumn>
                   <HeaderStyle Width="20px" />
               </RowIndicatorColumn>
               <ExpandCollapseColumn>
                   <HeaderStyle Width="20px" />
               </ExpandCollapseColumn>
               <DetailTables>
                   <telerik:GridTableView runat="server" TableLayout="Fixed" CommandItemDisplay="Top" Name="DistributionOrderDetail" DataKeyNames="OrderNumber,LineItemNumber" IsFilterItemExpanded="false" ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center">
                       <ParentTableRelation>
                           <telerik:GridRelationFields DetailKeyField="OrderNumber" MasterKeyField="OrderNumber" />
                           <telerik:GridRelationFields DetailKeyField="LineItemNumber" MasterKeyField="LineItemNumber" />
                       </ParentTableRelation>
                       <CommandItemTemplate>
                           <asp:HyperLink runat="server" ID="linkDoInvoiceExport" Text="Detail Report"></asp:HyperLink>
                       </CommandItemTemplate>
                       <Columns>
                           <telerik:GridHyperLinkColumn UniqueName="DistributionOrderNumber" DataNavigateUrlFields="DistributionOrderNumber" HeaderText="DO #"
                               DataNavigateUrlFormatString="~/search/DistributionOrder.aspx?@distributionOrderNumber={0}" DataTextField="DistributionOrderNumberFmt">
                           </telerik:GridHyperLinkColumn>
                           <telerik:GridHyperLinkColumn UniqueName="MajorDistributionOrderNumber" DataNavigateUrlFields="MajorDistributionOrderNumber" HeaderText="Major DO #"
                               DataNavigateUrlFormatString="~/search/DistributionOrder.aspx?@majorDistributionNumber={0}" DataTextField="MajorDistributionOrderNumberFmt">
                           </telerik:GridHyperLinkColumn>


Thanks
Bill
wdudek
Top achievements
Rank 1
 answered on 30 May 2014
7 answers
457 views
Hi,

We are using Telerik  RADControls for ASP.NET/AJAX and are looking to implement a Image galary with functionilty to change/maintain the sort order/item listing on products page of website  by simple drag and drop of Product images which we would be binded in ListView control.

Please refer the link with link with sample implementation using DHTM/AJAX - http://www.dhtmlgoodies.com/scripts/floating_gallery/floating_gallery.html

Do you have any sample/demo of ListView with this implementation?
Kostadin
Telerik team
 answered on 30 May 2014
3 answers
112 views
Greetings,

I have a radgrid where its datasource is bound from an XML output.  It has multiple hierarchy levels and has (auto genearted columns = true).  On the  2nd level of the hierarchy there are several details tables that automatically get binded. (Please reference image below).  However, there are columns which get auto generated displaying the ID's for the detail tables.  My goal is to programmatically hide all the ID's in all detail tables.   I can hide the CusomterID programmatically using the following code below: 

For Each item As GridDataItem In Radgrid_CRGList.Items        
               
       ''Root Level of Radgrid
         Radgrid_CRGList.MasterTableView.GetColumnSafe("OrderID").Visible = False        

     ''2nd Level of Radgrid - 1st Detail Table
      Radgrid_CRGList.MasterTableView.DetailTables(0).GetColumnSafe("CustomerID").Visible = False        
   
    ''2nd Level of RadGrid - 2nd Detail Table                                
'''  Place code here to hide EmployeeID ''

Next 


The issue is that I can't figure out the code to hide the EmployeeID in the 2nd details table on the same hierarchy level of the radgrid.  Please Help!









Aret
Top achievements
Rank 1
 answered on 30 May 2014
6 answers
95 views
In my case there seems to be a problem with the RadDropDownTree in which the DropDownTreeEntries collection is not properly managed by RadDropDownTree.  When RadAjaxManagerProxy is configured as shown in the following code example the Entries collection is always appended to, It never shrinks. If I comment out the line containing AjaxUpdatedControl then the RadDropDownTree begins working correctly again. I also tested this in a straight up ASP page with RadAjaxManager and found that RadDropDownTree works as expected. It seems that this problem only exists if using a RadAjaxManagerProxy on a Content page. Has anyone else seen this behavior and is there a workaround.    
  
 <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">       
        <AjaxSettings>           
            <telerik:AjaxSetting AjaxControlID="RadButton2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="MasterUpdatePanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>



Plamen
Telerik team
 answered on 30 May 2014
5 answers
185 views
Hi,
I have a form with pivotgrid and 2 htmlchart syncronized with the same data.
Pivotgrid's columns, rows and aggregates are customizable by the users.
I need to produce a report with the same pivotgrid layout/data and charts.

Is it possible?

I was thinking about to save session with RadPersistenceManager and use it in same way to create the report..

My real issue is to recreate the same pivotgrid layout..

Kostadin
Telerik team
 answered on 30 May 2014
1 answer
93 views
I'm following this:

http://demos.telerik.com/aspnet-ajax/menu/examples/programming/declarativedatasources/defaultvb.aspx

and first of all, the "flow" is vertical by default and I can't get it to change to horizontal no matter what I do. Also, the xml file in the example will not work with an xml data source when you choose "text" as the DataTextField - it says "Object of type System.Web.UI.Controls.XmlHierarchyData does not have a text property. It only works when I put a text property on the <Menu> tag like this: <Menu Text="Menu">

What gives? Why can't I get this to work in any kind of way?
Aneliya Petkova
Telerik team
 answered on 30 May 2014
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
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
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?