Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
1.0K+ views
Hello,

Is it possible to open/display a PDF document within the LightBox control?  If so, can you please provide a simple example.

Thanks!
Daniel
Telerik team
 answered on 18 Feb 2015
2 answers
236 views
I've been using the RadGrid's ExportToExcel function and I have one problem.

The setup is very simple.  The grid has only one option:    <Excel Format="Biff"/>

The dataset has field names like DocId and ClientID.  

When the Excel is created it's inserting spaces into the column headers (Doc ID, Client ID, etc).  

I'd like to prevent that.  So far I can't find any code that works.  

Suggestions?  (Haven't been able to get events like BiffExporting or ExcelExportCellFormatting to do anything.)
Boris
Top achievements
Rank 1
 answered on 18 Feb 2015
1 answer
100 views
Hello guys,
I've been trying to achive a task called Filtering in RadPivotGrid configurationPanel Allfields. What i need to achive is;
1. type a character or string in search box
2. as i type, in (configuration panel of RadpivotGrid) only those fields should come which start with given string in search box.

For example:
All fields: A, AA, AAB, BB,VB etc
Search query: A
result : A, AA, AAB

See screen shot for clarification...

P.S. It is very urgent, Please help me asap

Maria Ilieva
Telerik team
 answered on 18 Feb 2015
1 answer
100 views







Protected
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
       ProgramAreaCombobox.DataSource = GetListProgramAreasHasFeature()
       ProgramAreaCombobox.DataBind()
 
       '<---- EdtMode
       If Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) Then
 
           Dim a As Business.ReviewCommitteeAmendment = CType(_dataItem, Business.ReviewCommitteeAmendment)
           If Not a Is Nothing Then
               With AgreementAmendmentComboBox
                   .DataSource = GetAgreementAmendments(a.ProgramAreaId)
                   .DataBind()
                   .FindItemByValue(a.AmendmentId).Selected = True  '<-------- FIRES
                   .Enabled = True
               End With
           End If
 
       End If
       '<---- END EdtMode
 
   End Sub
<
MasterTableView CommandItemDisplay="Bottom" DataKeyNames="ID,AmendmentId,AgreementAmendmentID" EditMode="PopUp" >
            <EditFormSettings>
                    <PopUpSettings Modal="true" ZIndex="100010" />
            </EditFormSettings>           
</Columns>
                <EditFormSettings UserControlName="UserControls/ReviewCommittee/ReviewCommitteeAddEditAmendmentControl.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
     </MasterTableView>
 
USERCONTROL
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
    style="border-collapse: collapse;">
    <tr class="EditFormHeader">
        <td colspan="2">
            <b><%# GetTranslation("ReviewCommitteeAgreementAmendments", True)%></b>
        </td>
    </tr>
    <tr>
        <td>
            <table id="Table3" border="0">
                <tr>
                    <td><strong><%# GetTranslation("ProgramArea", True)%></strong>
                    </td>
                    <td>
                        <telerik:RadComboBox ID="ProgramAreaCombobox" runat="server" DropDownWidth="350"
                                        AutoPostBack="true" CausesValidation="false"
                                        SelectedValue='<%# DataBinder.Eval(Container, "DataItem.ProgramAreaId") %>'
                                        ZIndex="100011"
                                        EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250"
                                        LoadingMessage="Loading ...">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
 
 
 
                    <td colspan="2"> </td>
                </tr>
 
                <tr>
                    <td><strong><%# GetTranslation("Amendment", True)%></strong>
                    </td>
                    <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <telerik:RadComboBox ID="AgreementAmendmentComboBox" runat="server"
                                        DropDownWidth="500" ZIndex="100011"
                                        SelectedValue='<%# DataBinder.Eval(Container, "DataItem.AgreementAmendmentId") %>'
                                        EmptyMessage='<%#GetTranslation("PleaseSelect", False)%>' Width="250"
                                        LoadingMessage="Loading ..." Enabled="false">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="reqAgreementAmendment" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>'
                                ControlToValidate="AgreementAmendmentComboBox" ForeColor="Red" Font-Size="X-Small" Font-Bold="true" Display="Dynamic"  >
                        </asp:RequiredFieldValidator>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    </td>
                </tr>
 
                <tr>
                    <td colspan="2"> </td>
                </tr>
                <tr>
                    <td>
                        <strong><%# GetTranslation("ReviewOrder", True)%></strong>
                    </td>
                    <td>
                        <asp:TextBox ID="ReviewOrder" runat="server" Width="70" Text='<%# DataBinder.Eval(Container, "DataItem.Order") %>'></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqReviewOrder" runat="server" ErrorMessage='<%#GetTranslation("Required", False)%>'
                                ControlToValidate="ReviewOrder" ForeColor="Red" Font-Size="X-Small" Font-Bold="true"  Display="Dynamic" >
                        </asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
    <tr>
        <td colspan="2"></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td align="right" colspan="2">
            <asp:Button ID="btnUpdate" Text='<%#GetTranslation("Update", False)%>'  runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
            <asp:Button ID="btnInsert" Text='<%#GetTranslation("Insert", False)%>'  runat="server" CommandName="PerformInsert"
                Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
              
            <asp:Button ID="btnCancel" Text='<%#GetTranslation("Cancel", False)%>'  runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>

USERCONTROL

The Page Load fires, the Selected = tru Fires but when the page Loads, my Combos both say 'Please Select'.  If Not Page.IsPostback does not help as every click is a Postback.
I have the exact same probem here

Private Sub ProgramAreaCombobox_SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ProgramAreaCombobox.SelectedIndexChanged
 
        If Not String.IsNullOrWhiteSpace(e.Value) Then
            AgreementAmendmentComboBox.DataSource = GetAgreementAmendments(ProgramAreaCombobox.SelectedValue)
            AgreementAmendmentComboBox.DataBind()
            AgreementAmendmentComboBox.Enabled = True
        End If
 
    End Sub

becuase the code always sees e.value as nothing.

Ideas?

 
Tim
Top achievements
Rank 1
 answered on 18 Feb 2015
1 answer
986 views
Hey,

I have a Problem with following grid (trimmed down to the essential parts only). On a RadTextBox-Enter I want to call a JavaScript function, which calls the onClick function of  a button with ID "btnSearch". This it how it Looks like

<script type="text/javascript">
    function OnKeyPress(sender, args)
    {
        if (args.get_keyCode() == 13)
        {
            // find button "btnSearch" and click it
            var buttonTmp = $find("<%= btnSearch.ClientID %>");
            buttomTmp.click();
        }    
    }
</script>
 
<telerik:RadGrid runat="server" ID="grid1" GridLines="None" ShowFooter="False" Culture="de-DE">
    <MasterTableView AutoGenerateColumns="False" AllowMultiColumnSorting="True" CommandItemDisplay="Top">
        <CommandItemTemplate>
            <telerik:RadToolBar ID="radToolBar" Skin="Windows7" runat="server" AutoPostBack="true" Width="100%">
                <Items>
                    <telerik:RadToolBarButton Value="section1"  CssClass="rightAligned">
                        <ItemTemplate>
                            <telerik:RadButton runat="server" Skin="Windows7" Text="ButtonText1" CommandName="ButtonCommand1" OnClick="buttonAction1_Click"/>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton IsSeparator="True" />
                    <telerik:RadToolBarButton Value="section2">
                        <ItemTemplate>
                            <telerik:RadTextBox ID="textbox1" runat="server" Skin="Windows7"><ClientEvents OnKeyPress="OnKeyPress" /></telerik:RadTextBox>
                            <telerik:RadButton ID="btnSearch" runat="server" Skin="Windows7" Text="Search" CommandName="Search" OnClick="searchButton_Click"/>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
    </MasterTableView>
    <GroupingSettings CaseSensitive="False" />
</telerik:RadGrid>


Unfortunately, this does not seem to work, since the $find cannot find the button. I also tried to find it like this

var grid = $find("<%= activePassiveGrid.ClientID %>");
var MasterTable = grid.get_masterTableView();
var toolBar = MasterTable.get_dataItems()[0]......

But I don't get down to the button. Can anyone please lend me some helping hand to find and call my Button?
Fenris
Top achievements
Rank 1
 answered on 18 Feb 2015
0 answers
77 views
We are having Problems with Registration of the Custom Skins in our Project [ Downloaded (.ZIP) from the Telerik Skin Builder ]

We have used every approach discussed in the forums for the registration of the Custom Skins build by our self, but nothing seems to be working. We want Our own skin to be used in the RadControlls but our Skin Based on "Metro" dosen't appear in the Skin options

We also followed these link:

http://www.telerik.com/forums/tool-for-embedding-custom-skins-into-an-assembly
http://www.telerik.com/help/aspnet-ajax/introduction-skin-registration.html

Used every tool that's provided but nothing is helping to accomplish our goals.If anyone can help in resolving our issue. That would be very Kind. We have also 
Yasir
Top achievements
Rank 1
 asked on 18 Feb 2015
4 answers
192 views
Hi,

Since adding a detail table to my master table, the exporting of data from the master table to CSV has become very slow. I temporarily removed the detail table and the export worked fine. I came across this forum thread http://www.telerik.com/forums/how-to-suppress-detailtable-bind-when-exporting but setting the hierarchyloadmode has not made any difference. I do not have the hierarchyloadmode set anywhere else, so it's just using the default setting.

Here is the code for the RadGrid export:

Protected Sub lnkbtndownloaddata_Click(ByVal sender As Object, ByVal e As System.EventArgs)
RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerOnDemand
RadGrid1.ExportSettings.IgnorePaging = True
RadGrid1.MasterTableView.ExportToCSV()
End Sub

Like I said, setting the hierarchyloadmode has not made any difference to the speed of exporting.

Is there anything else I could try? Is there a way to temporarily disable the detail table prior to exporting?

Regards

Tim
Danny
Top achievements
Rank 1
 answered on 18 Feb 2015
6 answers
404 views
Hi,

I would like to show/hide context menu items based on some properties of the appointment.  Context menu items are added from server side code. I am using javascipt and webservice to do this. When I call the client side script "CheckTimerStatus" , it overrides the built in JS fxn that toggles the contextmenu. How can I make both codes execute without affecting each other.

I am calling  OnClientAppointmentContextMenu="CheckTimerStatus"


function  CheckTimerStatus (sender, eventargs){
  // hide/display contextmenuitems

}

 protected void rsTicketsSchedule_DataBound(object sender, EventArgs e)
    {
       
        //AddMenuItemsToConetxtMenu
         ...........   Logic to add context menu based on some properties....

}



Thanks,
Prava
Boyan Dimitrov
Telerik team
 answered on 18 Feb 2015
1 answer
252 views
Hi, I'm trying to hide the context menu in the OnClientAppointmentContextMenu event , but i don't find the way to get that. I have found only the way of hide the menu items and disabled the context menu . If you know how hide and show the context menu , please help me with the solution.
Thanks in advanced

sender.get_appointmentContextMenus()[0].set_enabled(false);  //THIS CODE DISABLED THE MENUCONTEXT

var items = sender.get_appointmentContextMenus()[0].get_items(); //THIS CODE HIDE A MENU ITEM
items.getItem(0).hide();

How can I hide the contextmenu????
Nencho
Telerik team
 answered on 18 Feb 2015
1 answer
123 views
Hello,

I am using Telerik Version 2011.1.413.35.

I am facing problem in RadGrid filter option like mentioned here -
1. 'EqualTo' , 'NotEqualTo' , 'Between' and 'NotBetween'  search criteria are not working.
2. 'GreaterThan' search filter is showing result for 'greater than or equal to' search criteria.
3. 'LessThanOrEqualTo' search filter is showing result for 'LessThan' search criteria.

After searching I have found few solutions like below URL, but those gave me no luck.
http://www.telerik.com/help/aspnet/grid/grdfilteringfordatetimecolumnwithdataformatstring.html

Can you please provide me any workable link or bunch of code which may help me to overcome the Telerik RadGrid Filter issue mentioned above.

This is kind of urgent.

Thanks in advance.

Sajal Halder
20-20 Technologies Inc.
Maria Ilieva
Telerik team
 answered on 18 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?