Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
175 views
Hello, 
is there a simple way to make the RadMenu header button like the RadToolBar Button?

I have a toolbar with a button with a template. Into this template there is a RadMenu but the style is completely different.
Look at the attached picture.
I'd want the menu "item menu" looks like "item Save" in normal state and like "item add" when is hovered.

Thanks
Maurizio
Maurizio
Top achievements
Rank 1
 answered on 18 Feb 2015
1 answer
183 views
My Grid has a RadTextBox that is being used to filter on all the columns. It Looks like this:


<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="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>


Now when I click the button to do the filtering, this function gets called.

protected void searchButton_Click(object sender, EventArgs e)
{
    RadTextBox searchFilter = GetSearchBox();
    if (searchFilter == null) return;
 
    var filterExpression = new StringBuilder();
    var searchText = searchFilter.Text;
    foreach (GridColumn col in grid1.MasterTableView.Columns)
    {
        filterExpression.AppendFormat("{0}(it[\"{1}\"].ToString().ToUpper().Contains(\"{2}\".ToUpper()))",
            filterExpression.Length != 0 ? " OR " : string.Empty, col.UniqueName, searchText);
    }
 
    activePassiveGrid.MasterTableView.FilterExpression = filterExpression.ToString();
    activePassiveGrid.MasterTableView.Rebind();
}


This works as expected. But after the Rebind(), the filtering becomes active, which clears the text in my textbox. I don't want it to be cleared, so you can still see what your filter searches for. Is it somehow possible to keep the text in the textbox?










Fenris
Top achievements
Rank 1
 answered on 18 Feb 2015
1 answer
97 views
Hi,
I was wondering if it was possible to change the functionality of the TreeView to expand on double click of the arrow, rather than just of the parent item?
Thank you for any help.
Nencho
Telerik team
 answered on 18 Feb 2015
3 answers
900 views
I'm using a radgrid with paging and page size on my site.  But for some reason, the page size dropdown disappears when I make it big enough to display all the results on one page.  So if there are 21 record in the radgrid and I set the page size to 50 then the page size dropdown disappears.  The pagination controls disappear as well but that makes sense.  But I need to give the users the ability to go back to displaying 10 records if they want.  
<telerik:RadGrid ID="AdministratorRadGrid" runat="server" AllowPaging="True" AllowSorting="true" OnItemCommand="AdministratorRadGrid_ItemCommand"
    OnSortCommand="AdministratorRadGrid_SortCommand" OnPageSizeChanged="AdministratorRadGrid_PageSizeChanged"
    OnPageIndexChanged="AdministratorRadGrid_PageIndexChanged" PagerStyle-Position="TopAndBottom">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="BWUserRoleID">
        <Columns>
            <telerik:GridBoundColumn DataField="BWUserRoleID" HeaderText="ID" ReadOnly="true" Visible="true"></telerik:GridBoundColumn>
           <telerik:GridBoundColumn DataField="DisplayName" HeaderText="Name" ReadOnly="true" FilterControlWidth="150px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Title" HeaderText="Title" ReadOnly="true" FilterControlWidth="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="UserID" HeaderText="ID" ReadOnly="true" FilterControlWidth="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="RoleID" HeaderText="Role ID" FilterControlWidth="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" ReadOnly="true" FilterControlWidth="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn>
            <telerik:GridButtonColumn ButtonType="PushButton" CommandName="AdminActivate" Text="Edit Admin Status" Resizable="false"></telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


Pavlina
Telerik team
 answered on 18 Feb 2015
7 answers
1.1K+ 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
291 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
135 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
134 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
1.0K+ 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
104 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?