Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
142 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
184 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
505 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
156 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
124 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
227 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
127 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
5 answers
789 views

Hi,

i want to open popup when user click on view hyperlink in radgrid.
please let me know how to achieve this functionality in RadGrid control.

something like this...

<

 

a href="#" onclick="openWindowEdit('<%# DataBinder.Eval(Container.DataItem, "VersionId") %>'); return false;"

 

 

id="lnkPWindow" style="font-weight:bold;z-index: 104; left: 237px; position: absolute; top: 90px">[VIEW/EDIT]</a>

this is done on link button on page....and samething i want in grid.
or some other way to achieve this type of functionality in Grid.

waiting for your reply.

 

Sagar
Top achievements
Rank 1
 answered on 30 May 2014
1 answer
229 views
Hi everyone,

I have 3 ​PivotGridAggregateField, the first is a quantity, second is a price, and third is a ​CalculationExpression, a multiplication between quantity and price. The problem i have, is in Grand Total Column, because the first and second grand total columns are ok, but third grand total column not, the result in this grand total column, is a multiplication between quantity grand total column and price grand total column. Can i edit this values or hide any grand total column or failing, edit aggregate functions in grand total columns?...

Thks.....

Best regards. 
Kostadin
Telerik team
 answered on 30 May 2014
1 answer
199 views
I have a modal that gets dynamically loaded when a user clicks a button on a grid. The modal content is populated from an ascx user control. It has to be inside the update panel as the values change dynamically when the user clicks the grid.

I add the following to display the modal:

Me.LoadMyUserControl("~/controls/Log.ascx", Panel1)
Dim MessageScript As String = "$('#modal-interact').modal('toggle');"
ScriptManager.RegisterStartupScript(Me, GetType(Page), "UniqueID1", MessageScript, True)


The problem is, when i submit the modal since the modal is ajax-y it does a partial postback causing the modal not to close.

I've tried using an onclientclick to close the modal then postback via javascript but the postback does not occur. 

This will close the modal, but not fire the postback:

<script type="text/javascript">
    function confirmthis()
    {
        $('#modal-interact').modal('hide');
        return true;
}
    </script>

Then of course removing the onclientclick and just handling the onclick triggers the postback, but does not hide the modal. 
Radoslav
Telerik team
 answered on 30 May 2014
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?