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

I am using an old version of RadGrid (2008 Q3) but I hope you will still be able to help.

None of the styles in the grid's skin are applied when I export to excel. They are not applied if i use an embedded skin or a custom skin.
I tried adding styles manually as shown in the documentation like so:

Protected Sub gridJourneys_ExcelMLExportStylesCreated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs) Handles gridJourneys.ExcelMLExportStylesCreated
       For Each style As Telerik.Web.UI.GridExcelBuilder.StyleElement In e.Styles
           If style.Id = "headerStyle" Then
               style.FontStyle.Bold = True
               style.FontStyle.Color = System.Drawing.Color.Gainsboro
               style.InteriorStyle.Color = System.Drawing.Color.Wheat
               style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid
           ElseIf style.Id = "itemStyle" Then
               style.InteriorStyle.Color = System.Drawing.Color.WhiteSmoke
               style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid
           ElseIf style.Id = "alternatingItemStyle" Then
               style.InteriorStyle.Color = System.Drawing.Color.LightGray
               style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid
           End If
       Next
      
   End Sub

i have tried this with an embedded skin and a custom skin and the styles are not applied to the excel doc

This does work though

Protected Sub gridJourneys_ExcelExportCellFormatting(ByVal source As Object, ByVal e As Telerik.Web.UI.ExcelExportCellFormattingEventArgs) Handles gridJourneys.ExcelExportCellFormatting
     If e.FormattedColumn.UniqueName = "StartLocation" Then
         
         e.Cell.Style("color") = "red"
 
 
 
     End If
     If e.FormattedColumn.UniqueName = "ExpandColumn" Then
         e.Cell.Controls.Clear()
     End If
  
 End Sub


How do i get the styles from the stylesheet to be applied in the excel document

thanks a lot
Kostadin
Telerik team
 answered on 12 Aug 2013
1 answer
128 views
Hi

I have placed a label inside the item template of item of a radpanelbar. How do I access it in javascript?

Thanks
Robert
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2013
1 answer
133 views
I used the telerik radgrid.  Not sure how to tell which version it is?  In Telerik.Web.UI property "version" the value is 2011.3.1115.35.  Runtime version is v2.0.50727.

I am using just the default delete (not my own code) against an entity framework datasource see below, but the delete gives an exception in my entity framework code..

Here is the code

 <asp:EntityDataSource ID="EntityDataSourceProducts" runat="server" ConnectionString="name=ApogeeCentralEntities" DefaultContainerName="ApogeeCentralEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="Products" >
    </asp:EntityDataSource>


<telerik:RadGrid ID="gridSPCs"
                                  runat="server"
                                  AutoGenerateColumns="True"
                                  ShowGroupPanel="True"
                                  GridLines="None"
                                  AllowSorting="True"
     DataSourceID="EntityDataSourceProducts"
       AllowAutomaticDeletes="True"
       AllowAutomaticUpdates="True"
       AllowAutomaticInserts="True"
      
                                  AllowScroll = "True"
                                  Width="99.9%"
                                  AllowFilteringByColumn="True"
                                  AllowMultiRowSelection="True"
                                  EnableLinqExpressions="false"
                                  ItemStyle-VerticalAlign="Top"
                                  PageSize="25"
                                  AutoGenerateEditColumn="true"
                                  AutoGenerateDeleteColumn="true"
                                
                                  MasterTableView-ClientDataKeyNames="Id"
                                  GroupPanel-ForeColor="#cccccc"
                                  >
    
                                
                                <ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" ReorderColumnsOnClient="true">
                                    <Animation AllowColumnReorderAnimation="true" ColumnReorderAnimationDuration="300" AllowColumnRevertAnimation="true" />
                                    <Selecting AllowRowSelect="true" />
                                    <Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="400px" />
                                    <Resizing AllowColumnResize="true" ClipCellContentOnResize="false" EnableRealTimeResize="true" />
                                </ClientSettings>

                                <GroupingSettings ShowUnGroupButton="true" />
                                
                </telerik:RadGrid>


When I try to delete one of the rows, I get an exception in the entity designer code

The exception is..

The property 'Name' cannot be set to a null value.

Here is the code where the exception happens

[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false, "Name");//this line gives exception
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }

Edits are working fine, this is just on DELETE that I am getting this error!!  Any ideas?

Thanks for your help in advance!


By the way I just realized it only gives this error if the name is null in the data being deleted but still not sure why?  Why does it matter if the name is null if the row is just being deleted?
Andrey
Telerik team
 answered on 12 Aug 2013
4 answers
502 views
Hello:

 I need help to display Telerik grid controls to display data from SQL Server using a REST web service as a data source. Can anyone help me please.

Thanks
Tsvetoslav
Telerik team
 answered on 12 Aug 2013
1 answer
121 views
Hi Everyone,

I'm looking at different CSS frameworks and the one I'd like to use has a dependency on jQuery 2.0. From what I understand, jQuery 2.0 is fully compatible with jQuery 1.9.1 but I still felt it best to ask here.

If I manually load jQuery 2.0 instead of 1.9.1 - will the Telerik ASP.NET AJAX controls function correctly using this upgraded version?

Thank you.
Genady Sergeev
Telerik team
 answered on 12 Aug 2013
2 answers
79 views

We are encountering a problem in drag drop from a tree control to rad editor.

Text is inserted in TOP of the editor in IE8 and IE7 instead of cursor position.

 

We tried using java script also but it still goes on Top.

 

If we put a button and click on it, and write code in it to insert some text, it works correctly

but we HAVE to use a tree control and drag drop/node click  NEEDS to be working to insert text in proper position where cursor is.

Sweta
Top achievements
Rank 1
 answered on 12 Aug 2013
1 answer
259 views
Hi,,

I want to insert a new line in between a textbox with * symbol

EXAMPLE:
*testing
*testing done
*unable to proceed
As per above example, when we press enter, the cursor position is not visible, only * is appearing. I have lost my cursor position, so again i have to put the cursor position and then start typing my words...

Am unable to proceed with this.Kindly help me as soon as possible.

Thanks in advance.
Angel Petrov
Telerik team
 answered on 12 Aug 2013
5 answers
340 views

Hi there!
I have a problem with the RadGrid (Prometheus) and an including DetailTable.
Both are filled correctly, but when I set RadGrid PageSize to "10" (for example), RadGrid displays 10 "datafilled" rows and one empty row on the bottom. The same problem with the DetailTables...

I compare Code with Telerik OnlineDemos, but can not find the reason, why... Can u help?!
Thanks a lot and sry for my broken english ;)

Eyup
Telerik team
 answered on 12 Aug 2013
15 answers
810 views
i have read the doc http://www.telerik.com/help/aspnet-ajax/grdsearchonkeypress.html and viewed some other forum posts but didnt find exactly what i was hoping for.

I have a radgrid with columns of data (no edit or insert, just read). Each column has the default filter with the filter button and filter menu. I want to keep the filter button and the filter menu but want to add a keypress event so that a user types something in the filter box and press enter (keycode 13) will cause the grid to be filtered using 'contains'.

The problem with the above doc (settting autopostbackonfilter=true) does have the desired keypress results BUT also runs when the filter textbox loses focus (i dont want that) b/c if a user goes to click the filterbutton (ie filter menu) then focus is lost and the grid is filtered but what they wanted to do was hit the filterbutton?

So question is: how to do filter on pressing the enter key, with NO filtering when the textbox loses focus (ie user wants to click filter button).

I hope this is clear. Thanks - Jason
Eyup
Telerik team
 answered on 12 Aug 2013
1 answer
93 views
Hi,


How to get appointment id for the child recurring appointment.
When I use java script function to get the appointment id for the child, it is giving me parent id and the index number of the child.
For example if parent appoint id is 317 and the child appointment id is 318.
My java script function is giving me 317_1 as child appointment id.

Thanks in advance
Plamen
Telerik team
 answered on 12 Aug 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?