Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
269 views
I am trying (once again) to use LoadOnDemand and still highlight matches to text typed by the user in the list. I've tried to use sender.highlightAllMatches(sender.get_text()) but I can not figure out how to call it AFTER the control is loaded. It seems like I need some kind of client side event after load to connect it to. Is there any solution that will allow me to fill the combobox in code and still highlight the matches without having to parse and highlight the match string in each item?
Eric Smith
Top achievements
Rank 1
 answered on 31 Jan 2013
2 answers
50 views
Hello

We just converted to this version of Telerik and are having problems with all of our reports that use subreports.
I have looked at several options that people have suggested but so far no luck. 

Can someone please help?

Here is the code that we are using --

We set SubReportDS with
  MainReport report1 = new MainReport();
  report.SubReportDS = MyData;

and define SubReprtDS with --

public object SubReportDS
{
   set {  

 

 

    MainReport report1 = new MainReport();

 

 

    Telerik.Reporting.

 

SubReport subReport1 = 
        (Telerik.Reporting.
SubReport)report1.Items.Find("subReport", true)[0];

 

    Telerik.Reporting.

 

InstanceReportSource = 
        (Telerik.Reporting.
InstanceReportSource) subReport1.ReportSource;

 

    Telerik.Reporting.

 

Report sub2 = (Telerik.Reporting.Report)irs.ReportDocument;

 

    sub2.DataSource =

 

value;
    }
}

The end result of this is a report that contains that main section which is populated.  It also
subReport sections but none of the subReport sections have data in them. 

Any help will be appreciated.
Thank you - Raka.

 

Raka
Top achievements
Rank 1
 answered on 31 Jan 2013
2 answers
214 views
Dear,

I'm using the Telerik Grid for one of my webprojects.
The grid show data for a purchase order. For a line 2 subgrids can optionally contain data.
When loading the grid for the first time, it works fine.
When I edit a row, i do this with a server postback that shows a modal popup.
If the user saves changes for a line, another server postback happens and the grid is reloaded.
With this reload, only data in the main grid is shown. The subgrids don't show any data.
The need_datasource event is not even fired this time. However the code is exactly the same, so I don't understand what can be wrong.

Can someone help me with this weird issue?
Many thanks in advance!

Best regards, Koen

UI:
<telerik:RadGrid ID="RadGridOrderLines" AutoGenerateColumns="false" AllowPaging="false" runat="server">
    <MasterTableView HierarchyDefaultExpanded="true" DataKeyNames="PurchaseOrderDetailID">
        <Columns>
            <telerik:GridButtonColumn ImageUrl="~/Images/edit_16x16.gif" CommandName="editline" ButtonType="ImageButton" ></telerik:GridButtonColumn>
            <telerik:GridBoundColumn HeaderText="ITE" DataField="ArticleITECode" SortExpression="ArticleITECode"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Article %>' DataField="ArticleName" SortExpression="ArticleName"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Status %>' DataField="PurchaseOrderDetailStatusDescription" SortExpression="PurchaseOrderDetailStatusDescription"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Price %>' DataField="ArticleUnitPrice" DataFormatString="{0:F2}" SortExpression="ArticleUnitPrice"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Quantity %>' DataField="PurchaseOrderDetailQuantity" DataFormatString="{0:F0}" SortExpression="PurchaseOrderDetailQuantity"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Remark %>' DataField="PurchaseOrderDetailRemarks" SortExpression="PurchaseOrderDetailRemarks"></telerik:GridBoundColumn>
        </Columns>
        <NestedViewTemplate>
            <asp:Panel CssClass="pad5" runat="server" ID="panelDeliveries">
                <asp:Label runat="server" ID="lblDeliveries" Text='<%$ Resources:CommonTerms, Deliveries %>'></asp:Label> 
                <asp:Label runat="server" ID="lblDeliveriesCount"></asp:Label><br />
                <telerik:RadGrid ID="RadGridDelivery" AutoGenerateColumns="false" AllowPaging="false" runat="server">
                    <MasterTableView>
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="ITE" DataField="ArticleITECode" SortExpression="ArticleITECode"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Article %>' DataField="ArticleName" SortExpression="ArticleName"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Status %>' DataField="PurchaseDeliveryStatus" SortExpression="PurchaseDeliveryStatus"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Price %>' DataField="ArticleUnitPrice" DataFormatString="{0:F2}" SortExpression="ArticleUnitPrice"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Quantity %>' DataField="PurchaseDeliveryQuantity" DataFormatString="{0:F0}" SortExpression="PurchaseDeliveryQuantity"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Remark %>' DataField="PurchaseDeliveryRemarks" SortExpression="PurchaseDeliveryRemarks"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </asp:Panel>
            <asp:Panel runat="server" ID="panelAssets" CssClass="pad5">
                <asp:Label runat="server" ID="lblAssets" Text='<%$ Resources:CommonTerms, Assets %>'></asp:Label> 
                <asp:Label runat="server" ID="lblAssetsCount"></asp:Label><br />
                <telerik:RadGrid ID="RadGridAssets" AutoGenerateColumns="false" AllowPaging="false" runat="server">
                    <MasterTableView HierarchyDefaultExpanded="true" DataKeyNames="PurchaseDeliveryAssetID">
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="Asset" DataField="AssetType" SortExpression="AssetType"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Quantity %>' DataField="PurchaseDeliveryAssetQuantity" DataFormatString="{0:F0}" SortExpression="PurchaseOrderDetailQuantity"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Price %>' DataField="AssetUnitPrice" DataFormatString="{0:F2}" SortExpression="ArticleUnitPrice"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText='<%$ Resources:CommonTerms, Currency %>' DataField="Currency" SortExpression="ArticleName"></telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </asp:Panel>
 
        </NestedViewTemplate>
    </MasterTableView>
</telerik:RadGrid>

Code behind:
Private Sub FillPage(ByVal id As Int32)
 
    Dim order = Univeg.BL.PurchaseOrder.GetByID(id, SessionVars.CuCo)
 
    If order Is Nothing Then
        lblErrorPurchaseOrderNotFound.Visible = True
        Return
    End If
 
    Me.PurchaseOrderID = id
 
    lblNumber2.Text = order.PurchaseOrderNumber
    lblSupplierName.Text = order.SupplierCode & " - " & order.SupplierName
    lblSupplierCity.Text = order.SupplierZipCode & " - " & order.SupplierCity
 
    lblWarehouse.Text = order.WarehouseCode & " - " & order.WarehouseName
    lblOrderStatus.Text = order.PurchaseOrderStatusDescription
    lblDepartment.Text = order.DepartmentName
 
    Dim orderlines = Univeg.BL.PurchaseOrderDetail.GetLinesForOrder(id, SessionVars.CuCo)
    ' get delivery lines
    DeliveryLines = Univeg.BL.PurchaseDelivery.GetPurchaseLinesForOrder(id, SessionVars.CuCo)
    ' get delivery assets
    DeliveryAssetLines = Univeg.BL.PurchaseDeliveryAsset.GetListForOrder(id)
 
    RadGridOrderLines.DataSource = orderlines
    RadGridOrderLines.DataBind()
 
    Dim assets = Univeg.BL.PurchaseOrderAsset.GetListForOrder(id)
 
    lblAssetsCount.Text = assets.Count.ToString()
    RadGridAssets.DataSource = assets
    RadGridAssets.DataBind()
 
End Sub
 
Protected Sub RadGridDelivery_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
 
    Dim RadGridDelivery As Telerik.Web.UI.RadGrid = sender
    Dim nestedItem As GridNestedViewItem = DirectCast(TryCast(sender, RadGrid).NamingContainer, GridNestedViewItem)
    Dim PurchaseOrderDetailID As Int32 = nestedItem.ParentItem.GetDataKeyValue("PurchaseOrderDetailID")
 
    If DeliveryLines Is Nothing Then
        DeliveryLines = Univeg.BL.PurchaseDelivery.GetPurchaseLinesForOrder(Me.PurchaseOrderID, SessionVars.CuCo)
    End If
 
    If Not DeliveryLines Is Nothing Then
 
        Dim delivery = (From dl In DeliveryLines _
         Where dl.PurchaseOrderDetailID = PurchaseOrderDetailID _
         Order By dl.PurchaseDeliveryTHT _
         Select dl).ToList()
 
        If delivery.Count > 0 Then
            RadGridDelivery.DataSource = delivery
 
            Dim lblDeliveriesCount As Label = nestedItem.FindControl("lblDeliveriesCount")
            If Not lblDeliveriesCount Is Nothing Then
                lblDeliveriesCount.Text = delivery.Count.ToString()
            End If
        Else
            RadGridDelivery.Visible = False
            Dim panelDeliveries As Panel = nestedItem.FindControl("panelDeliveries")
            If Not panelDeliveries Is Nothing Then
                panelDeliveries.Visible = False
            End If
        End If
 
    End If
 
End Sub
 
Protected Sub RadGridAssets_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
 
    Dim RadGridAssets As Telerik.Web.UI.RadGrid = sender
    Dim nestedItem As GridNestedViewItem = DirectCast(TryCast(sender, RadGrid).NamingContainer, GridNestedViewItem)
    Dim PurchaseOrderDetailID As Int32 = nestedItem.ParentItem.GetDataKeyValue("PurchaseOrderDetailID")
 
    If Not DeliveryAssetLines Is Nothing Then
 
        Dim assets = (From da In DeliveryAssetLines _
         Where da.PurchaseOrderDetailID = PurchaseOrderDetailID _
         Order By da.AssetType _
         Select da).ToList()
 
        If assets.Count > 0 Then
            RadGridAssets.DataSource = assets
 
            Dim lblAssetsCount As Label = nestedItem.FindControl("lblAssetsCount")
            If Not lblAssetsCount Is Nothing Then
                lblAssetsCount.Text = assets.Count.ToString()
            End If
        Else
            Dim panelAssets As Panel = nestedItem.FindControl("panelAssets")
            If Not panelAssets Is Nothing Then
                panelAssets.Visible = False
            End If
        End If
 
    End If
 
End Sub
 
Protected Sub RadGridOrderLines_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridOrderLines.ItemCreated
 
    If TypeOf e.Item Is GridNestedViewItem Then
 
        Dim RadGridDelivery As RadGrid = e.Item.FindControl("RadGridDelivery")
        Dim RadGridAssets As RadGrid = e.Item.FindControl("RadGridAssets")
 
        If Not RadGridDelivery Is Nothing Then
            AddHandler RadGridDelivery.NeedDataSource, AddressOf RadGridDelivery_NeedDataSource
        End If
 
        If Not RadGridAssets Is Nothing Then
            AddHandler RadGridAssets.NeedDataSource, AddressOf RadGridAssets_NeedDataSource
        End If
 
    End If
 
End Sub
Koen
Top achievements
Rank 1
 answered on 31 Jan 2013
2 answers
167 views
Please take a look at the two screenshots I've provided.  I don't know if you can tell but the fonts used by the RadComboBox are distinctly different.

Here's the thing: The two screenshots are of exactly the same RadComboBox in exactly the same app!  The only difference is that the first one is of the app being run in VS2012 on my development machine (Win 7 OS) and the second is the app running under IIS7 on a different Win 7 machine.

The font shown on my dev machine is the one I like and what I was expecting to see.  The one deployed to the server is peculiar and doesn't fit in with the rest of the fonts on the page.

I absolutely assure you that both copies are using exactly the same CSS file.  They should be identical but they're not.

So the obvious two questions are: Why is this happening?  How do I fix it?

Robert
Robert
Top achievements
Rank 1
 answered on 31 Jan 2013
5 answers
204 views
Hi!

We have defined this button:
<telerik:RadButton ID="radButtonNewPlacement" Text="New Placement" ToolTip="#" ButtonType="LinkButton" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" runat="server" CssClass="radButtonNoImage" OnClick="radButtonNewPlacement_Click" NavigateUrl="http://www.bing.com" />

...which results in this HTML:

<a id="radButtonNewPlacement" title="#" class="RadButton RadButton_Office2010Blue rbLinkButton radButtonNoImage" href="http://www.bing.com"><span class="rbText">New Placement</span><input id="radButtonNewPlacement_ClientState" name="radButtonNewPlacement_ClientState" type="hidden" /></a>

In IE, we would like the user to be able to right-click on this hyperlink and select 'Open In New Tab.' Unfortunately, this hyperlink does not work like a regular hyperlink. Why? And how can we make this behave?

Thanks!
Michael
Michael O'Flaherty
Top achievements
Rank 2
 answered on 31 Jan 2013
1 answer
115 views
We're looking at implementing the 'Insert External Video' in the toolbar of the RadEditor but wondered if it's possible to preset the defaults for width (leaving height to be variable depending on the ratio of the video). Is this possible? I've searched the forum and the documentation but couldn't find it mentioned anywhere.

Thanks in advance for any help.
Rumen
Telerik team
 answered on 31 Jan 2013
6 answers
491 views
I have a RadGrid with Template Column. The Template Column has a Textbox and ontextchanged, i have to search db for data. I want to show a loading panel while its searching and loading. Can someone tell me how I can do it?

Thanks,
Sri
Sravanthi
Top achievements
Rank 1
 answered on 31 Jan 2013
3 answers
281 views

Hello,

I need to wrap text around an image within the RAD Editor pane.
Can this be done without the HTML view switched on?

Thanks

Rumen
Telerik team
 answered on 31 Jan 2013
1 answer
96 views
Hi

I would like to upload duplicate files in to target folder with same name.

Example: 

File Name: TEST.PDF

If I upoad TEST.PDF second time 

file should uplaod like this TEST(1).PDF

How do I achive this ? 

Thanks for your advice.

Mani
Kate
Telerik team
 answered on 31 Jan 2013
1 answer
80 views
Hi Team

I have a RadTreeView and RadListBox.
Based on RadTreeview selection I need to load the RadListBox.  My problem is if I select any node from RadTreeview RadAjaxLoadingPanel is not dispaying and RadListBox is not populating with binded values.

Please help me to do this scenario. Please find the code here.

 <AjaxSettings>  
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1" >          
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadTreeView1" LoadingPanelID="RadAjaxLoadingPanel" />
               <telerik:AjaxUpdatedControl ControlID="RadListBox_Vehicles"  LoadingPanelID="RadAjaxLoadingPanel" />
          </UpdatedControls>
        </telerik:AjaxSetting>
   </AjaxSettings>


 protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        String selectedNode = e.Node.Value;
        PopulateListBox(selectedNode);
  }

My requirement is I need to show the refreshed listbox value on selection of Treeview node.

Thanks in advance

Sharan
Maria Ilieva
Telerik team
 answered on 31 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?