Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
90 views
I've been able to get External Stylesheets to work. This part works great but it introduces a new issue.

I can't figure out a way to put the content into a certain context of the page.

For example. If the content I'm editing is the content of a page and i'm loading the pages stylesheet. The body background is black but the page wrapper is white with black text (not specified, just natural from the body).

RADeditor loads everything directly into the body which will be black text on black bg.

Is there a way around this? can I insert a wrapper div or something around the content? Can I add a css class to the body so that it could receive the css for the page wrapper?
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
91 views
I have problem with the checked property , it returns false even it 's checked

The issue occurs only if going to another page then clicking on the browser back button.

And what's abnormal, is that only the first checked node returns false, the remaining checked nodes return true
source Code

 

 

<telerik:RadTreeView ID="tvwCSI" runat="server" BorderColor="Silver" BorderStyle="Solid"

 

 

 

CssClass="box" CheckBoxes="True" DataTextField="Description" DataValueField="ID"

 

 

 

Height="250" Skin="Hay" Width="300px">

 

 

 

<CollapseAnimation Duration="1" Type="OutQuint" />

 

 

 

<ExpandAnimation Duration="1" />

 

 

 

</telerik:RadTreeView>

 



Any hint


Riade
Plamen
Telerik team
 answered on 01 Aug 2012
1 answer
132 views
Hello Team,

We are seeing some weird behavior for the Rad Editor Link Manager, we upgraded from MOSS 2007 to SharePoint server 2010.
We are using MossLinkManager that we updated in ToolsFiles and ListToolsFile.

Say we are selecting some Text ex: manual in below sceenclip and click hyperlink


and we selected some link i.e. index.aspx from pages document library, see below


and once we click OK, the actual Text in the editor manual is changing to index.aspx, see below

RadEditor Version: 6.1.6.0, this is not the case in MOSS 2007, we are seeing this issue only in SharePoint Server 2010
Is this a Know issue? Is there any Fix for this?
Rumen
Telerik team
 answered on 01 Aug 2012
1 answer
147 views
Hi folks.

I'm exporting the content of a RadGrid using the BIFFExporting (because I need to add an extra sheet with various informations), but apparently there's an issue with the date fields, for they are not displayed in the correct culture (though I set the culture for the application in the web.config and for the radGrid programmatically).

Is there any specific configuration one needs to take into account when exporting using BIFFExport so that the date fields are properly formatted?

Many thanks in advance.
Daniel
Telerik team
 answered on 01 Aug 2012
4 answers
180 views
Hi All

I am creating a new grid and using the RadGrid grouping facilities. My Grid is displaying what i need but i would like some advice on how to format the GroupHeader, I was able to set font etc but I would like to have equal spacing between the Titles etc.. I have attached the grid to show what it currently looks like. 

Thanks
Stuart
Top achievements
Rank 1
 answered on 01 Aug 2012
1 answer
98 views
I have created a custom control by extending the RadGrid.

Please tell me how to override Radgrid properties.
I was able to override PageSize, but I could not override "MasterTableView.CommandItemSettings.ShowExportToCsvButton"
please tell me how to override this Property or tell me in which event I have to set the default value to the same
Maria Ilieva
Telerik team
 answered on 01 Aug 2012
1 answer
107 views
I have a RibbonBar that I want to load from an xml file. However, there will be times when certain items within the ribbonbar will need to be disabled or enabled based on permissions. Is there a way to catch the loadfromxml event in the RibbonBar? and if so how do I go about doing so.
Ivan Zhekov
Telerik team
 answered on 01 Aug 2012
1 answer
123 views
Hi,
I'm looking for a very urgent clarification about the concurrency of CustomPaging and FilteringByColumn used together in a RadGrid.
I always have as a datasource a function that returns a DataTable considering both Filtering and Paging. This is necessary since the amount of datas is very significative and cannot return the whole amount of datas to the RadGrid and the Page it, but I have to return only the needed records and only in small paged size (50 records).

The approach I've used up to now is as illustrated here:
Default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
        <telerik:RadGrid runat="server" ID="RadGrid" AutoGenerateColumns="false" AllowCustomPaging="true" AllowPaging="true" PageSize="50"
        AllowFilteringByColumn="true" EnableLinqExpressions="false">
         
        <GroupingSettings CaseSensitive="False" />
             
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <Scrolling AllowScroll="True" ScrollHeight="100%" UseStaticHeaders="True" />
            </ClientSettings>
 
            <PagerStyle AlwaysVisible="True" />
 
            <MasterTableView OverrideDataSourceControlSorting="True">
             
                <NoRecordsTemplate>
                      
                </NoRecordsTemplate>
             
                <Columns>
 
                <%--Some columns here--%>
 
                </Columns>
 
            </MasterTableView>
         
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
  
Default.aspx.vb
Imports Telerik.Web.UI
Imports System.Data
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
 
    Protected Sub RadGrid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid.NeedDataSource
 
         
        Dim VirtualItemCount As Integer = GetDatasVirtualItemsCount(RadGrid.MasterTableView.FilterExpression)
 
        RadGrid.MasterTableView.VirtualItemCount = VirtualItemCount
        RadGrid.VirtualItemCount = VirtualItemCount
 
 
        Dim startIndex As Integer = IIf((ShouldApplySortFilterOrGroup()), 0, RadGrid.CurrentPageIndex * RadGrid.PageSize)
        Dim pageSize As Integer = IIf((ShouldApplySortFilterOrGroup()), VirtualItemCount, RadGrid.PageSize)
 
 
        RadGrid.DataSource = GetDatas(startIndex, pageSize, RadGrid.MasterTableView.FilterExpression)
 
    End Sub
 
    Private isGrouping As Boolean = False
    Protected Sub RadGrid1_GroupsChanging(ByVal source As Object, ByVal e As GridGroupsChangingEventArgs)
        isGrouping = True
        If e.Action = GridGroupsChangingAction.Ungroup AndAlso RadGrid.CurrentPageIndex > 0 Then
            isGrouping = False
        End If
    End Sub
 
    Public Function ShouldApplySortFilterOrGroup() As Boolean
        Return RadGrid.MasterTableView.FilterExpression <> "" _
        OrElse (RadGrid.MasterTableView.GroupByExpressions.Count > 0 OrElse isGrouping) OrElse RadGrid.MasterTableView.SortExpressions.Count > 0
    End Function
 
    Private Function GetDatas(ByVal startIndex As Integer, ByVal pageSize As Integer, ByVal FilterExpression As String) As DataTable
 
        ' ------------
        ' Some Code that generates a datatable considering both CustomPaging and Filtering
        ' ------------
 
        Return New DataTable
 
    End Function
 
    Private Function GetDatasVirtualItemsCount(ByVal FilterExpression As String) As Integer
 
        ' ------------
        ' Some Code that count the number of rows considering Filtering
        ' ------------
 
        Return -1
 
    End Function
 
End Class

This works fine, but if I use Filtering then Paging gets disabled ! Now I need to use both together so my approach in the code behind has simply changed this way:
Imports Telerik.Web.UI
Imports System.Data
 
Partial Class _Default2
    Inherits System.Web.UI.Page
 
 
    Protected Sub RadGrid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid.NeedDataSource
 
 
        Dim VirtualItemCount As Integer = GetDatasVirtualItemsCount(RadGrid.MasterTableView.FilterExpression)
 
        RadGrid.MasterTableView.VirtualItemCount = VirtualItemCount
        RadGrid.VirtualItemCount = VirtualItemCount
 
 
        Dim startIndex As Integer = RadGrid.CurrentPageIndex * RadGrid.PageSize
        Dim pageSize As Integer = RadGrid.PageSize
 
 
        RadGrid.DataSource = GetDatas(startIndex, pageSize, RadGrid.MasterTableView.FilterExpression)
 
    End Sub
 
    Private Function GetDatas(ByVal startIndex As Integer, ByVal pageSize As Integer, ByVal FilterExpression As String) As DataTable
 
        ' ------------
        ' Some Code that generates a datatable considering both CustomPaging and Filtering
        ' ------------
 
        Return New DataTable
 
    End Function
 
    Private Function GetDatasVirtualItemsCount(ByVal FilterExpression As String) As Integer
 
        ' ------------
        ' Some Code that count the number of rows considering Filtering
        ' ------------
 
        Return -1
 
    End Function
 
End Class

The only thing changed is the approach in retrieving the startIndex and the pageSize that now works the same way either if I'm filtering or not.

My point is: this thing seems to work, but I have to deliver it very soon and since I have not found posts of this approach anywhere I'm wondering if I'm missing something important that this approach does not consider.

If anybody finds reasonable reasons why this should fail in some circumstances please let me know.  

Thanks in advance.

Lorenzo
Tsvetina
Telerik team
 answered on 01 Aug 2012
3 answers
409 views
Hello,

I'd like to keep colors of my radgrid's rows on my Excel file. When I execute my export, Excel displays an loading issue of file ("Table" is the cause of error).
Can you help me to resolve this problem, please !

Here my source code :

transaction.aspx :
...
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" GridLines="None"
        AllowFilteringByColumn="True" AllowSorting="True" Skin="Windows7" OnItemDataBound="RadGrid1_ItemDataBound"
        OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged" 
        DataSourceID="odsTransactionsValidees" onprerender="RadGrid1_PreRender"
        OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" 
        onexcelmlexportrowcreated="RadGrid1_ExcelMLExportRowCreated">
...
<ExportSettings OpenInNewWindow="True" ExportOnlyData="True" FileName="ExportValidees"
            IgnorePaging="true" Excel-Format="ExcelML"  />
....
 <MasterTableView DataSourceID="odsTransactionsValidees" AutoGenerateColumns="False"
            NoMasterRecordsText="Pas de transactions." Font-Size="Medium"  UseAllDataFields="true" DataKeyNames="ID_TRANSACTION,DOUTE_CLASSIFICATION"
            OverrideDataSourceControlSorting="true" AllowNaturalSort="true" CommandItemDisplay="Bottom">
            <CommandItemSettings ExportToExcelText="Export Excel" ShowExportToExcelButton="False"
                ShowAddNewRecordButton="False" ShowRefreshButton="False" />
....
</telerik:RadGrid>
....
transactions.aspx.cs :

protected void RadGrid1_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e)
        {
            // ajoute les bordures de cellule
            BorderStylesCollection borders = new BorderStylesCollection();
            BorderStyles borderStyle = null;
 
            for (int i = 1; i <= 4; i++)
            {
                borderStyle = new BorderStyles();
                borderStyle.PositionType = (PositionType)i;
                borderStyle.Color = System.Drawing.Color.Black;
                borderStyle.LineStyle = LineStyle.Continuous;
                borderStyle.Weight = 1.0;
                borders.Add(borderStyle);
            }
            foreach (StyleElement style in e.Styles)
            {
                foreach (BorderStyles border in borders)
                {
                    style.Borders.Add(border);
                }
            }
           
            StyleElement style1 = new StyleElement("MyStyleWhite");
 
            style1.InteriorStyle.Pattern = InteriorPatternType.Solid;
            style1.InteriorStyle.Color = System.Drawing.Color.White;
            e.Styles.Add(style1);
 
            StyleElement style2 = new StyleElement("MyStyleOrange");
            style2.InteriorStyle.Pattern = InteriorPatternType.Solid;
            style2.InteriorStyle.Color = System.Drawing.Color.Orange;
            e.Styles.Add(style2);
 
}

protected void RadGrid1_ExcelMLExportRowCreated(object sender, GridExportExcelMLRowCreatedArgs e)
{
            string typeTransaction = hidType.Value;
 
            if (e.RowType == GridExportExcelMLRowType.DataRow)
            {
                if (typeTransaction == TypeTransactionValide || typeTransaction == TypeTransactionValideReseau)
                {
                    string style;
                    foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
                    {
                        string color = item.BackColor.ToString();
                        if (!(bool)item.GetDataKeyValue("DOUTE_CLASSIFICATION"))
                        {
                            style = "myStyleWhite";
                        }
                        else
                        {
                            style = "myStyleOrange";
                        }
                        foreach (CellElement cellElement in e.Row.Cells)
                        {
                            cellElement.StyleValue = style;
                        }
                    }
 
                }
            }    
}


Best Regards
CLAUDE LLOP
Top achievements
Rank 1
 answered on 01 Aug 2012
3 answers
116 views
I'm working with a multilingual application and have problems of localizing the label property. According to the provider of the translation software (jollans.com), the problem is that the label-property has localizable(false), while the text-property has localizable(true), which works. How can i solve this, so the label property can be localizable as well?

Thanks!
Vasil
Telerik team
 answered on 01 Aug 2012
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?