Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
325 views
I have a radgrid on my .aspx page.

When I click the plus on the radgrid and insert a new row, the row inserts without any problems. However... if I then refresh the page by pressing F5, another row is added that matches the last. I can keep pressing F5 and it keeps adding that same row with the information I entered.

If I edit a row in the radgrid and then press F5, it won't add a new row... it will simply perform a postback as expected. The same is true if I delete a row. It's as if editing or deleting a row clears something out so that it stops inserting.

Any idea what's going on?
Eyup
Telerik team
 answered on 06 Jun 2017
1 answer
439 views

I've been trying to get the Filter Template on the grid to work with a RadComboBox, but have not been successful. I'm binding to a dataset which is a little different than the example at Filter Template Example. The dropdown seems to load correctly the first time, but then when I make a selection it fails. I'm guessing it's in the client code because it never gets back to the .

I'm getting the error:

Selection out of range
Parameter name: value

Below is my code:

<telerik:RadGrid
    ID="rgAudits"
    runat="server"
    OnPreRender="rgAudits_PreRender"
    AllowPaging="True"
    AllowSorting="True"
    AutoGenerateColumns="False"
    CellSpacing="0"
    ClientSettings-AllowColumnsReorder="false" ClientSettings-Resizing-AllowColumnResize="false" ClientSettings-Scrolling-UseStaticHeaders="true"
    EnableLinqExpressions="False"
    ExportSettings-ExportOnlyData="false" ExportSettings-IgnorePaging="true" ExportSettings-OpenInNewWindow="true"
    ExportSettings-HideStructureColumns="true" ExportSettings-FileName="Audit"
    GridLines="None"
    GroupingSettings-CaseSensitive="false" MasterTableView-AllowMultiColumnSorting="false" MasterTableView-AllowNaturalSort="false"
    AllowFilteringByColumn="true" MasterTableView-CommandItemDisplay="Top"
    MasterTableView-CommandItemSettings-ShowAddNewRecordButton="false"
    MasterTableView-CommandItemSettings-ShowRefreshButton="false"
    MasterTableView-CommandItemSettings-ShowExportToCsvButton="false"
    MasterTableView-CommandItemSettings-ShowExportToExcelButton="true" ExportSettings-Excel-Format="Xlsx"
    MasterTableView-CommandItemSettings-ShowExportToPdfButton="true" ExportSettings-Pdf-AllowCopy="true" ExportSettings-Pdf-AllowPrinting="true"
    ExportSettings-Pdf-AllowModify="true"
    MasterTableView-CommandItemSettings-ShowExportToWordButton="true" ExportSettings-Word-Format="Docx"
    MasterTableView-PagerStyle-PagerTextFormat="{4} Page {0} of {1}, rows {2} to {3} of {5}"
    MasterTableView-PagerStyle-Position="TopAndBottom" MasterTableView-PagerStyle-PageButtonCount="10" MasterTableView-PagerStyle-EnableAllOptionInPagerComboBox="false"
    PagerStyle-PageSizes="10,25,50,100" PageSize="25" PagerStyle-AlwaysVisible="true"
    MasterTableView-TableLayout="Fixed">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView>
        <NoRecordsTemplate>
            <div>
                There are no records to display select a system from the drop down list.
            </div>
        </NoRecordsTemplate>
        <CommandItemSettings ShowExportToPdfButton="true" ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
            ShowRefreshButton="false" />
        <SortExpressions>
            <telerik:GridSortExpression FieldName="CREATEDON" SortOrder="Descending" />
        </SortExpressions>
        <Columns>
            <telerik:GridBoundColumn UniqueName="AUDITID" DataField="AuditId" HeaderText="Audit ID" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo"
                ShowFilterIcon="false" FilterControlWidth="75px" ItemStyle-HorizontalAlign="Left"
                DataType="System.Int32" SortExpression="AUDITID">
                <HeaderStyle Width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="FULLNAME" DataField="FullName" HeaderText="Created By" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                ShowFilterIcon="false" DataType="System.String" SortExpression="FULLNAME" ItemStyle-HorizontalAlign="Left">
                <HeaderStyle Width="160px" />
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn UniqueName="CREATEDON" DataField="CreatedOn" HeaderText="Created On" AutoPostBackOnFilter="true"
                PickerType="DatePicker"
                DataFormatString="{0:dd MMM yyyy hh:mm:ss}" HtmlEncode="false" CurrentFilterFunction="GreaterThanOrEqualTo" ShowFilterIcon="false"
                ItemStyle-HorizontalAlign="Left">
                <HeaderStyle Width="170px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn UniqueName="AUDITTYPEDESCRIPTION" DataField="AuditTypeDescription" HeaderText="Type" AutoPostBackOnFilter="true"
                ShowFilterIcon="false" DataType="System.String" ItemStyle-HorizontalAlign="Left"
                CurrentFilterFunction="Contains" SortExpression="AUDITTYPEDESCRIPTION">
                <HeaderStyle Width="130px" />
                <FilterTemplate>
                    <telerik:RadComboBox RenderMode="Lightweight" ID="rcbAuditTypes" Skin="Default" DropDownAutoWidth="Enabled"
                        Width="128px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("AUDITTYPEDESCRIPTION").CurrentFilterValue %>'
                        runat="server" OnClientSelectedIndexChanged="AuditTypeIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="rsbAuditType" runat="server">
                        <script type="text/javascript">
                            function AuditTypeIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("AUDITTYPEDESCRIPTION", args.get_item().get_value(), "EqualTo");
                            }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="AUDITDESCRIPTION" DataField="AuditDescription" HeaderText="Description" AutoPostBackOnFilter="true"
                ShowFilterIcon="false" DataType="System.String" ItemStyle-HorizontalAlign="Left"
                CurrentFilterFunction="Contains" AllowSorting="false" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

private void refreshCombos()
{
    AdminServiceClient adminProxy = new AdminServiceClient();
    DataSet ds = adminProxy.GetUniqueAuditTypeCode(rgAudits.MasterTableView.FilterExpression.ToString());
    RadComboBox rcb = new RadComboBox();
    foreach (GridFilteringItem  item in rgAudits.MasterTableView.GetItems(GridItemType.FilteringItem))
    {
        rcb = (RadComboBox)item.FindControl("rcbAuditTypes");
    }
    rcb.DataTextField = "AuditDescription";
    rcb.DataValueField = "AuditTypeCode";
    rcb.DataSource = ds;
    rcb.DataBind();
    //rgAudits.MasterTableView.Rebind();
}

 

Note, in the example you have the rebind that I've commented out above. When I do this, my ComboBox comes out empty. If I leave it out, then I get the values in the Combo Box. 

I'm having a secondary problem with the ComboBox itself. Sometimes, the text in the  is huge, other times it's the right size. I have no idea what's causing this.

Thanks
Rodney

 

 

 

Eyup
Telerik team
 answered on 06 Jun 2017
6 answers
506 views
Hello,

I am using a pie chart which by default has a clickable legend. If you click on a legend item, you filter out that data Item. However, my client doesn't want this functionality because they find it confusing that the tooltip info doesnt change (the % stays the same and is not calculated back to be a total of 100% with the remaining items).

How do I disable this functionality? I cant find any property in the control for this.

Thanks!
Stamo Gochev
Telerik team
 answered on 06 Jun 2017
0 answers
91 views

RadCombox version is 2017 R2 (2017.05.03).

When user chooses second item: "empty", the SelectedIndex=1 when AllowCustomText=False,
but SelectedIndex=-1 if the value is empty when AllowCustomText=True.

I think it's a bug for empty value in AllowCustomText mode.

<telerik:RadComboBox ID="Type" runat="server"
    AllowCustomText="true"
    RenderMode="Lightweight"
    CollapseAnimation-Duration="0"
    ExpandAnimation-Duration="0">
    <Items>
        <telerik:RadComboBoxItem Text="first" Value="1" />
        <telerik:RadComboBoxItem Text="empty" Value="" />
        <telerik:RadComboBoxItem Text="third" Value="2" />
    </Items>
</telerik:RadComboBox>
tomexou
Top achievements
Rank 1
 asked on 05 Jun 2017
2 answers
552 views
I am having trouble upgrading some existing charts from ChartDirector into RadHTMLCharts. The existing charts have month names as categories on the x-axis and contain two series. I am adding these programmatically without the use of a databind, but the two series do not share the same x-values - there is a gap between the two and there can potentially be gaps in months within each series. It seems I cannot have months as the x-axis labels and have two series that do not have matching x-values. Is there a chart type that I can use to achieve the desired result, or is there a workaround?

I can have months as the x-axis labels if I use a line chart, but it has to have values for every category for both series. Or, I can have two series that have different x-values if I use a ScatterLine chart, but the x-axis labels are numeric and I cant seem to replace them with months.

Thanks
shaohua
Top achievements
Rank 1
 answered on 05 Jun 2017
1 answer
160 views

I have a pivot grid bound to a sql data source. When I attempt to export, the resulting excel file is gibberish (see screenshot). My version is 2017.1.118. What am I missing?

    <telerik:RadPivotGrid ID="rpgResults" runat="server" DataSourceID="sdsSummary" Width="100%"
        EnableTheming="false" EnableEmbeddedSkins="true" Skin="Default" RenderMode="Lightweight"
        AllowFiltering="False" AggregatesPosition="Columns" ShowFilterHeaderZone="False" ShowDataHeaderZone="False" ShowColumnHeaderZone="False" ShowRowHeaderZone="False"
        OnCellDataBound="RadPivotGrid1_CellDataBound"> 
        <ClientSettings>
            <Scrolling AllowVerticalScroll="True" ScrollHeight="600px" />
        </ClientSettings>
        <Fields>
            <telerik:PivotGridRowField DataField="Year" />
            <telerik:PivotGridRowField DataField="Qtr" />
            <telerik:PivotGridRowField DataField="Month" SortOrder="None" />
            <telerik:PivotGridColumnField DataField="InvoiceType" />
            <telerik:PivotGridAggregateField  DataField="Amount" Aggregate="Sum" DataFormatString="{0:C}" />
            <telerik:PivotGridAggregateField DataField="Invoices" Aggregate="Count" DataFormatString="{0:N0}" />
        </Fields>
    </telerik:RadPivotGrid>

button click code for exporting...

        rpgResults.ExportSettings.Excel.Format = PivotGridExcelFormat.Biff
        rpgResults.ExportSettings.FileName = "Processed_Invoice_Summary"
        rpgResults.ExportSettings.IgnorePaging = True
        rpgResults.ExportSettings.OpenInNewWindow = False
        rpgResults.ExportToExcel()

John
Top achievements
Rank 1
 answered on 05 Jun 2017
2 answers
246 views

Hi,
I have two issues with Kendo exporting PDF.

I am following the example from:

https://demos.telerik.com/kendo-ui/pdf-export/index

First one:
Here are two images attached showing the difference between WebPage text and PDF text. The text is vertical in my webpage but was changed to horizontal after being exported to PDF.

 

Second One:

I added a div element on my page filled with a chart. I draw this chart using Google Chart Library.

However when I exported PDF my chart is lost.

 

Could you please take a look?

Thanks.

shaohua
Top achievements
Rank 1
 answered on 05 Jun 2017
1 answer
188 views

Hello!

I'm trying to implement a way to automatically resize the diagram to fit the canvas (i.e. automatic zoom) after it is loaded. But I could not find a built-in functionality. Is this possible?

 

Best Regards,

Vessy
Telerik team
 answered on 05 Jun 2017
3 answers
624 views

I need to provide character limit functionality in RadEditor and have been having a significant number of issues getting a comprehensive solution. I've read a number of items on the Forum that sometimes give conflicting and incomplete solutions.

Requirement:

  • Prevent typing of more than n Number of characters
  • Prevent of more than n Number of characters
  • Ability to strip formatting from pasted content
  • Multiple Editors on the same page or AJAX Modal Popup

The last article I was looking at was: http://www.telerik.com/forums/charector-limit-in-rad-editor#662718 which is pretty close in functionality to what I need, but when determining the length of the content on the clipboard the formatting from Word, or wherever you picked the text up from is included in that length.

If you could provide some code snippets or point me to an article that will correctly work I would appreciate it.

Rodney

Rumen
Telerik team
 answered on 05 Jun 2017
0 answers
120 views
on a blank part of time slot if you double click or single click, my function called is
function OnClientTimeSlotClick(sender, args)

<telerik:RadScheduler OnClientTimeSlotClick="OnClientTimeSlotClick" OnClientTimeSlotContextMenu="OnClientTimeSlotContextMenu" ...

is there a way inside the function to know if it was double clicked or single clicked? or a way to have it call different functions.

--------------
I am also looking for a way to not have the right click context menu open or perhaps how to handle the 3 actions that show up
function OnClientTimeSlotContextMenu(sender, args) {
return false;
} ^^ does not work
Doug
Top achievements
Rank 1
 asked on 05 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?