Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
195 views

Hi,

 We are using RadEditor Export PDF functionality.

  Export to PDF getting Javascript Error "Error while executing filter ConvertFontToSpanFilter - InvalidCharacterError: Failed to execute 'setAttribute' on      'Element': 'font-family:arial,' is not a valid attribute name.

We tried to Disable ConvertFontToSpanFilter Filter. Then PDF is not downloaded and getting below Error

System.ArgumentException: String cannot be of zero length. Parameter name: oldValue at System.String.ReplaceInternal(String oldValue, String newValue) at System.String.Replace(String oldValue, String newValue) at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) at Telerik.Web.UI.Editor.Export.ApocPdfGenerator.ValidateContentForExport(String content) at Telerik.Web.UI.Editor.Export.RadEditorExportTemplate.GenerateXmlStirng(String pageTitle, String content) at Telerik.Web.UI.Editor.Export.RadEditorExportTemplate.InitializeXmlContent() at Telerik.Web.UI.Editor.Export.RadEditorExportTemplate.Export() at

Subhash
Top achievements
Rank 1
 asked on 19 Jun 2017
3 answers
525 views

i have a problem in uploading files via RadAsyncUpload when i open the page that contains the telerik upload controls

the following error rises -->

RadAsyncUpload does not have permission to write files in the TemporaryFolder. In Medium Trust scenarios, the TemporaryFolder should be a subfolder of the Application Path.

 

in localhost working fine but in my website does not work ,

so i contacted to the host provider and asked to set full permission to App_Data an the Target folder and sub folders so they set the permission and still i get the above error ,

then i set UseApplicationPoolImpersonation to True and impersonate to true in web.config but still no hope same error,

what can i do to fix this error 

note: before the host provider update iis to 10 the upload was working.

 

 

Saeed
Top achievements
Rank 1
 answered on 17 Jun 2017
2 answers
241 views
Hi,
 I am looking for Inline document viewer in Web applications.I have a requirement to show all the documents(doc,docx,.rtf,xls,ppt..etc) in the browser as inline document like (Scribd).Does Telrik has kind of viewer in your product line.

Thanks,
ryan
Top achievements
Rank 1
 answered on 17 Jun 2017
0 answers
117 views

I am using the Panelbar for navigation. The Panelbar expands when a category button is clicked. When a child item is selected in the Panelbar and navigate to page, the Panelbar collapses. The Panelbar should stay open until another item on the same level is selected. The user must reopen the menu item to select another item from the same level. In my case two levels collapse, back to original setting when web site opened. 

The menu looks like this:

Major Category 1 (Always expanded)

  Item 1

  item 2

  Item 3

Major Category 2

  Minor Category 1

    Item 1   Selecting any of these items will collapse everything back to Major Category 2

    Item 2

    Item 3

 Minor Category 2

    Item 1    Selecting any of these items will collapse everything back to Major Category 2

    Item 2

We have these settings:

ExpandMode="MultipleExpandedItems"  This is selected because we have the most used items expanded all the time and then less used items in major categories with sub categories then child items.

Prevent collapse does not let the panel ever collapse once it has been opened

What setting do we use so the panelbar will remain expanded until another item on the same level is expanded?

We are using ASP.NET with Ajax  version: 2011.2.712.40

Bob
Top achievements
Rank 1
 asked on 16 Jun 2017
0 answers
144 views
Hi!
We try to use RadEditor in our site pages, where group of students able to edit same data. We need to implement some concurrency mechanism. We need to be sure, that previously edited data will be used for next editing and that user will know if someone already changed some Editor data during current user editing.
Is there exists some standard realization or best practices for such workflow?

Now we try to make it using client events in two steps:
1. Update data from server on start editing
It used OnFocus event, disable control and calls server-side checking of conflicts, then enable it after update control data from server.
2. Update data at server on finish editing
It used OnBlur event and send data to server for update
We already have problems with such realization. For example, on page loading we have OnFocus event fired by each Control (it's standard RadEditor behaviour) and it causes additional not necessary requests to server.
What would be a solution for this cases?
Oleksiy
Top achievements
Rank 1
 asked on 16 Jun 2017
1 answer
82 views
I am using a RadGrid UseStaticHeaders = true option.  Can I have the headers static and the footers not static?  I am using Telerik "v4.0.30319".
Eddie
Top achievements
Rank 1
 answered on 16 Jun 2017
0 answers
98 views

Have data as follows:

Column:  PrimaryKey: (Int32) ResourceId - not null

Column: (Int32?) : ParentId - can be null.

So top level ParentId fields for ResourceId's will be null.

<SelfHierarchySettings KeyName="ResourceId" ParentKeyName="ParentId" />

Do I have to use a NeedDataSource? Why?

Spent hours trying to get a seemingly simple 5 minute exercise to get a self-referencing grid to work.  Paging is off.  Googled and Stack-Overflow for hours - nobody has had this problem?  Help Please ?

Thanks..

<telerik:RadGrid ID="RGHWTreeView" runat="server" DataSourceID="EDS_BARHW" Width="100%"
                        AllowSorting="True" ShowStatusBar="True" ShowFooter="True" ShowGroupPanel="True" AutoGenerateColumns="False" AllowPaging="False"
                        OnItemInserted="theGrid_ItemInserted" OnItemUpdated="theGrid_ItemUpdated" OnItemDeleted="theGrid_ItemDeleted" OnPreRender="theGrid_PreRender"
                        OnItemCreated="theGrid_ItemCreated" OnItemDataBound="theGrid_ItemDataBound" OnItemCommand="theGrid_ItemCommand"
                        AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateHierarchy="False"
                        CellSpacing="0" GridLines="None" EnableHeaderContextMenu="True" OnDeleteCommand="theGrid_DeleteCommand" OnEditCommand="theGrid_EditCommand" OnInsertCommand="theGrid_InsertCommand">
                        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="True" AllowColumnHide="True" AllowKeyboardNavigation="True" AllowRowHide="True" ColumnsReorderMethod="Reorder">
                            <DataBinding EnableCaching="False"></DataBinding>
                            <Selecting AllowRowSelect="True" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="420px" />
                            <Resizing AllowColumnResize="True" AllowRowResize="True"></Resizing>
                            <Animation AllowColumnReorderAnimation="True"></Animation>
                        </ClientSettings>
                        <MasterTableView DataSourceID="EDS_BARHW" DataKeyNames="ResourceId,ParentId,Owner" CssClass="w3-tiny" Name="Hardware Detail: " Caption="HW Tree Detail"
                            AllowMultiColumnSorting="True" EnableHeaderContextAggregatesMenu="True" EnableHeaderContextFilterMenu="False"
                            CommandItemDisplay="Top" EditMode="EditForms" AllowFilteringByColumn="False"
                            AllowSorting="True" ShowHeadersWhenNoRecords="True" AllowPaging="False" PageSize="20">
                            <SelfHierarchySettings KeyName="ResourceId" ParentKeyName="ParentId" />
                            <CommandItemSettings AddNewRecordText="New Hardware Resource"
                                ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowExportToWordButton="True" ShowAddNewRecordButton="True"></CommandItemSettings>
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True"></RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                            <Columns>
Digger
Top achievements
Rank 1
 asked on 16 Jun 2017
0 answers
110 views

Hi.

I am new to kendo scheduler. Please help me with following issue:

DTSTART:20170614T133000Z // This is event start time

DTEND:20170614T140000Z // This is event end time

Recurrence rule: FREQ=YEARLY;INTERVAL=2;UNTIL=20260616T182959Z;BYMONTH=6;BYMONTHDAY=14

I am using following method in my SQL procedure to get all event occurence between 'rangestartdate' and 'rangeenddate'

SELECT * FROM dbo.ExpandRecurrence('DTSTART:20170614T133000Z ' + Char(10) + 'DTEND:20170614T140000Z ' + Char(10) + 'RRULE:FREQ=YEARLY;INTERVAL=2;UNTIL=20260616T182959Z;BYMONTH=6;BYMONTHDAY=14',  'rangestartdate'  ,'rangeenddate' )

I consider, the event start date to be the 'rangestartdate'.The problem is how to determine, the value for 'rangeenddate'??

Please reply, as i am stuck with this problem and finding no solution elsewhere.

Thanks

Pragya
Top achievements
Rank 1
 asked on 16 Jun 2017
2 answers
297 views

I have attached 2 files. An aspx page and a code behind vb page. I am trying to apply filter by implementing filter template. I have a radcombobox that filters the radgrid. 

Datasource for the radgrid is a dataset defined in aspx.vb. There are 2 tables in the dataset

Radcombobox datasource is a datatable from the above dataset defined in aspx.vb.

Trying to rebind the radgrid after the radcombobox selection both in code behind and on aspx via JS. 

1) using the following lines in cmbStateSelectedIndexChanged event does not rebind the grid.

 gv_MainStatusDynamic.MasterTableView.FilterExpression = e.Value<br>  filterItem.FireCommandEvent("Filter", New Pair("Contains", e.Value))<br>  gv_MainStatusDynamic.Rebind()

 

2) using FilterExpression in radgrid prerender does not rebind the grid

If isFiltered Then<br>            If rg_dynamic.MasterTableView.FilterExpression <> "0" Then<br>            Dim filterItem As GridFilteringItem = TryCast(TryCast(sender, RadComboBox).NamingContainer, GridFilteringItem)<br>            Dim aCombo As RadComboBox = TryCast(filterItem.FindControl("cmbState"), RadComboBox)<br>            rg_dynamic.MasterTableView.FilterExpression = Session("StateVal")<br>            rg_dynamic.MasterTableView.Rebind()<br>            End If<br>        End If

 

3) using filtering in aspx page does not rebind grid.

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"><br>                                           <script type="text/javascript"><br>                                               function SelectedIndexChanged(sender, args)<br>                                               {<br>                                                   var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");<br>                                                   tableView.filter("State", args.get_item().get_value(), "EqualTo");<br>                                               }<br>                                           </script><br>                                       </telerik:RadScriptBlock>

 

In my first and second cases after I select a state and I do rg_dynamic.MasterTableView.Rebind(), the cmbState will not hold the selected value.

In my third case applying just that code to filter the grid on aspx side (that is commenting filter expression code in grid prerender and combobox selected index changed server side events) will hold the selected value. 

I have the datasource available for both grid and combox box on my server side. The grid will not rebind post filtered value. I came across an example on your forum pages http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx
But it is not helping me.

Any help on this is appreciated.

 

Here is my aspx.vb

Protected Sub rg_dynamic_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rg_dynamic.NeedDataSource<br>        rg_dynamic.DataSource = GetData()<br>    End Sub<br> <br> Private Function GetData() As DataSet<br>        Using oConn As SqlConnection = New SqlConnection(GenConn())<br>            'Gets dataset object<br>        End Using<br>    End Function<br> <br> Protected Sub rg_dynamic_ItemCreated(sender As Object, e As GridItemEventArgs) Handles rg_dynamic.ItemCreated<br>        If TypeOf e.Item Is GridFilteringItem Then<br>            Dim filterItem As GridFilteringItem = DirectCast(e.Item, GridFilteringItem)<br>            Dim cmbState As RadComboBox = DirectCast(filterItem("State").FindControl("cmbState"), RadComboBox)<br>            cmbState.SelectedValue = e.Item.OwnerTableView.GetColumn("State").CurrentFilterValue<br>            RefreshStateCombo(cmbState) <br>        End If<br>    End Sub<br> <br>  Protected Sub RefreshStateCombo(ByVal stCombo As RadComboBox)<br>        Dim SprocData As DataSet = GetData()<br>        Dim oDbDS As New DataBaseUtils2<br>        Dim StateDate As DataView = SprocData.Tables(0).DefaultView<br>        Dim dtStatedata As DataTable = StateDate.Table()<br>        stCombo.DataSource = StateDate<br>        stCombo.DataTextField = dtStatedata.Columns(1).ToString() 'name of the state<br>        stCombo.DataValueField = dtStatedata.Columns(0).ToString() 'StateCompID<br>    End Sub<br> <br> <br> Protected Sub rg_dynamic_PreRender(sender As Object, e As EventArgs) Handles rg_dynamic.PreRender<br>        If isFiltered Then<br>            If rg_dynamic.MasterTableView.FilterExpression <> "0" Then<br>            Dim filterItem As GridFilteringItem = TryCast(TryCast(sender, RadComboBox).NamingContainer, GridFilteringItem)<br>            Dim aCombo As RadComboBox = TryCast(filterItem.FindControl("cmbState"), RadComboBox)<br>            rg_dynamic.MasterTableView.FilterExpression = Session("StateVal")<br>            rg_dynamic.MasterTableView.Rebind()<br>            End If<br>        End If<br>    End Sub<br> <br>  Private isFiltered As Boolean = false<br>  Protected Sub cmbStateSelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs) <br>        If e.Value <> "0" Then<br>            isFiltered = True<br>            Session("StateVal") = e.Value<br>        End If<br>       'Dim filterItem As GridFilteringItem = TryCast(TryCast(sender, RadComboBox).NamingContainer, GridFilteringItem)<br>        'filterItem.OwnerTableView.GetColumn("StateCompID").CurrentFilterValue = e.Value ''CAPTURE THIS VALUE in a property<br>        'rg_dynamic.MasterTableView.FilterExpression = e.Value<br>        'filterItem.FireCommandEvent("Filter", New Pair("EqualTo", e.Value))<br>        ' rg_dynamic.Rebind()<br>    End Sub

 

 

Here is my aspx

<Telerik:Radgrid ID="rg_dynamic" runat="server" DataKeyNames="StateCompID" EnableLinqExpressions="false" <br>                            BorderStyle="Solid" CellSpacing="0" BorderWidth="1px" AllowAutomaticDeletes="false" AllowMultiRowSelection="false"<br>                        AllowAutomaticInserts="false" AllowAutomaticUpdates="false" AutoGenerateColumns="False" AllowFilteringByColumn="true"<br>                            AllowSorting="True" GridLines="None" AllowPaging="false" Width="100%" MasterTableView-EnableColumnsViewState="false"><br>                            <br>                           <MasterTableView ><br>                            <Columns><br>                            <br>                                <telerik:GridBoundColumn DataField="StateCompID" Visible="False"  HeaderText="StateCompID" <br>                                    ItemStyle-HorizontalAlign="Left" ReadOnly="True" UniqueName="StateCompID" <br>                                    SortExpression="StateCompID"> </telerik:GridBoundColumn><br>                                <br>                         <br>                                <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State" HeaderStyle-Width="175" UniqueName="State" AllowFiltering="true" AutoPostBackOnFilter="true"><br>                                   <FilterTemplate><br>                                        <telerik:RadComboBox RenderMode="Lightweight" ID="cmbState" AutoPostBack="true" AutoPostBackOnFilter="true" <br>                                            Width="200px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("State").CurrentFilterValue%>'<br>                                            runat="server" OnClientSelectedIndexChanged="SelectedIndexChanged" OnSelectedIndexChanged="cmbStateSelectedIndexChanged" ><br>                                            <Items><br>                                                <telerik:RadComboBoxItem Text="All" Value="0" /><br>                                            </Items><br>                                        </telerik:RadComboBox><br>                                       <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"><br>                                           <script type="text/javascript"><br>                                               function SelectedIndexChanged(sender, args)<br>                                               {<br>                                                   var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");<br>                                                   tableView.filter("State", args.get_item().get_value(), "EqualTo");<br>                                               }<br>                                           </script><br>                                       </telerik:RadScriptBlock><br>                                    </FilterTemplate><br>                                </telerik:GridBoundColumn><br>                                <telerik:GridBoundColumn DataField="Company" HeaderText="Company Type" ReadOnly="True" SortExpression="Company" UniqueName="Company"<br>                                    ItemStyle-HorizontalAlign="Center"  AllowFiltering="false" ShowFilterIcon="false"><br>                                    <br>                                </telerik:GridBoundColumn><br>                            </Columns><br>                               </MasterTableView><br>                            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"><br>                        </HeaderContextMenu><br>                       
 </Telerik:Radgrid>
Eyup
Telerik team
 answered on 16 Jun 2017
0 answers
160 views

Hi,

Need help on I export data to Excel it show image on the header column how to remove this filter icon, the columns is dynamic generated.

And here the code I export to Excel

  rtlist.GetColumnSafe("Actions").Display = false;
  rtlist.ExportSettings.IgnorePaging = true;
  rtlist.ExportSettings.OpenInNewWindow = true;
  rtlist.ExportSettings.ExportMode = TreeListExportMode.ReplaceControls;
  rtlist.ExportToExcel(); 

 

Thank

Paul S

 

Paul
Top achievements
Rank 1
 asked on 16 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?