Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views
Hi,

I am using radgrid excel export using html format. In radgrid ExportCellFormatting event we are formatting the date column as below 

 If e.FormattedColumn.UniqueName = "t_UploadedOn" Then
    e.Cell.Style("mso-number-format") = "dd\-mm\-yyyy\ HH\:mm\:ss\"
End If

The above works fine if date is something like 29-01-2015, but if date is like 1st of Feb 2015 then it will show as 02-01-2015. Please see the attached screen grab of recent export.

Any help would be greatly appreciated.
 
Daniel
Telerik team
 answered on 18 Feb 2015
4 answers
149 views
I am using the metro touch skin form my interface to get bigger touch menus, boxes and buttons - looks great.

In the ribbon editor interface, using metro touch messes up the html tab.  The top text cannot be seen and the scroll bars are messed up.  So I switched to the default skin for the editor while the rest of the interface stays in metro.

The question, how do I do this?  My editor is lacking styles.  The editor interface in the middle with a big gap at the top which I know from previous experience is a style problem.   How can I make my editor use a default skin while in metro touch?

Another solution would be getting the HTML window in Metro Touch to work, huge bug there.

Help please,
George
Ianko
Telerik team
 answered on 18 Feb 2015
4 answers
165 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
166 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
87 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
878 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.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
266 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
129 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
126 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?