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

I have a RadGrid control with Excel like filtering which will populate the values on demand. I want to reduce the height of the filter pop up and remove the (contains,equal to,...) dropdown from the pop up.

I used the below code to remove the dropdowns(HCFMRCMBFirstCond  and HCFMRCMBSecondCond ). But I was getting javascript error and my filter doesn't work.

void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
{
     foreach (Control c in e.Item.Controls)
     {
         RadComboBox combo = c as RadComboBox;
         if (combo != null)
         {
             if(combo.Items.Count == 16)
             {
                combo.Visible = false;
             }
         }
     }
 }

 

I used the following code to reduce the filter pop up height.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
 {
     if (e.Item is GridFilteringItem)
     {
         GridFilteringItem item = (GridFilteringItem)e.Item;
         item.Height = Unit.Pixel(100);
     }
 }

But doesn't seem to work.

I want to have only the Wild card Search box and the filterlist items on my filter with reduced filter pop up height. How could I do this? Please help!

 

Rumen
Telerik team
 answered on 16 Oct 2017
5 answers
173 views

I have many context menus that used to work just fine.  At one time I positioned them myself taking scroll into account (complicated) but then I changed to Telerik and the nice Telerik context menu placed them nicely itself as it should.

Now, when the main window is scrolled the context window displays without the scroll distances added - so it shows above the click. This error happens in Chrome and Opera, but it works fine in Safari, and Edge.  It used to work fine in Chrome, just noticed it does not now.

I simply use contextMenu.show(event); on a to display the RadContextMenu.  They all happen on a button click called to a javascript to show the RadContextMenu,

<asp:Button ID="AddFormRowButton"  CssClass="btn btn-default menubutton" runat="server" Text="Add Form Row ≡"
    OnClientClick="return ShowAddFormRow(event);" UseSubmitBehavior="False"/>                                    
 
function ShowAddFormRow(event) {
    var contextMenu = $find("<%= FormAddRowMenu.ClientID %>");
    if ((!event.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), event.relatedTarget))) {
       contextMenu.show(event);
    }
    else {
        alert("Event error");
    }
    return false;
}

 

 

Any idea if this has been noted and when it might be fixed.

Rumen
Telerik team
 answered on 16 Oct 2017
3 answers
174 views

I have a grid component with a user edit ascx control assigned to it. The default behavior, apparently, is for that edit control to be visible when the grid is first loaded/displayed. I do not want it visible. How do I go about hiding it at startup?

 

Here is the ending section of my radgrid definition. Is there something I can do in here to hide that form?

                </Columns>
                <CommandItemSettings ShowAddNewRecordButton="false" />
                <EditFormSettings  UserControlName="DiscountEditor.ascx" EditFormType="WebUserControl" >
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="RowDblClick" OnPopUpShowing="onPopUpShowing" />
            </ClientSettings>
        </telerik:RadGrid>

Rumen
Telerik team
 answered on 16 Oct 2017
0 answers
102 views

Is there a way to show week numbers, not dates, on columns?

 

Cheers!

Mikko

Mikko
Top achievements
Rank 1
Veteran
 asked on 16 Oct 2017
3 answers
233 views
Hi,

is it possible that displaying gaps is not working any more for the new release Q3 2013?
I took the example you provided under
http://www.telerik.com/help/aspnet-ajax/htmlchart-types-scatterline-chart.html and
http://www.telerik.com/help/aspnet-ajax/htmlchart-types-line-chart.html

and for me it is not working.
The gaps are not visible but instead the line is interpolated.
Always giving me the attached result.

My Code:
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlace" runat="server">
    <telerik:RadScriptManager ID="TrsmScriptManager" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <h1>
        Testing</h1>
    <telerik:RadHtmlChart runat="server" ID="ScatterLineChart1" Transitions="true">
        <PlotArea>
            <Series>
                <telerik:ScatterLineSeries Name="0.8C" MissingValues="Gap">
                    <LabelsAppearance DataFormatString="{1}% in {0} minutes" Position="Below" />
                    <MarkersAppearance MarkersType="Circle" />
                    <SeriesItems>
                        <telerik:ScatterSeriesItem X="10" Y="10" />
                        <telerik:ScatterSeriesItem X="15" Y="20" />
                        <telerik:ScatterSeriesItem />
                        <telerik:ScatterSeriesItem X="32" Y="40" />
                        <telerik:ScatterSeriesItem X="43" Y="50" />
                        <telerik:ScatterSeriesItem X="55" Y="60" />
                        <telerik:ScatterSeriesItem X="60" Y="70" />
                    </SeriesItems>
                </telerik:ScatterLineSeries>
                <telerik:ScatterLineSeries Name="1.6C">
                    <LabelsAppearance DataFormatString="{1}% in {0} minutes" Position="Below" />
                    <MarkersAppearance MarkersType="Square" />
                    <SeriesItems>
                        <telerik:ScatterSeriesItem X="10" Y="40" />
                        <telerik:ScatterSeriesItem X="17" Y="50" />
                        <telerik:ScatterSeriesItem X="18" Y="70" />
                        <telerik:ScatterSeriesItem X="35" Y="90" />
                        <telerik:ScatterSeriesItem X="47" Y="95" />
                        <telerik:ScatterSeriesItem X="60" Y="100" />
                    </SeriesItems>
                </telerik:ScatterLineSeries>
            </Series>
            <XAxis AxisCrossingValue="0" Color="Black" MajorTickType="Outside" MinorTickType="Outside"
                Reversed="false" MinValue="0" MaxValue="90" Step="10">
                <LabelsAppearance DataFormatString="{0}m" RotationAngle="0" />
                <MajorGridLines Color="#EFEFEF" Width="1" />
                <MinorGridLines Color="#F7F7F7" Width="1" />
                <TitleAppearance Position="Center" RotationAngle="0" Text="Time" />
            </XAxis>
            <YAxis AxisCrossingValue="0" Color="Black" MajorTickSize="1" MajorTickType="Outside"
                MaxValue="100" MinorTickSize="1" MinorTickType="Outside" MinValue="0" Reversed="false"
                Step="20">
                <LabelsAppearance DataFormatString="{0}%" RotationAngle="0" />
                <MajorGridLines Color="#EFEFEF" Width="1" />
                <MinorGridLines Color="#F7F7F7" Width="1" />
                <TitleAppearance Position="Center" RotationAngle="0" Text="Charge" />
            </YAxis>
        </PlotArea>
        <ChartTitle Text="Charge current vs. charge time">
        </ChartTitle>
        <Legend>
            <Appearance Position="Bottom" />
        </Legend>
    </telerik:RadHtmlChart>
</asp:Content>

What do i do wrong?
Vessy
Telerik team
 answered on 16 Oct 2017
2 answers
173 views

Hello,

I am using ASP NET AJAX Gantt contro with database provider. I have created a table according to documentation here: http://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/data-binding/database-structure

It is a readonly control, only for display purposes, but I would like to filter rows in that table according to user selection (year selection is possible). I have just added a where clause:

  'where [Start] between @startInterval and  @endInterval
  and [End] between @startInterval and  @endInterval'

Even when I can see on Sqldatasource selectedEvent the affected rows >0 and fits the exact number of rows query should return, Gantt diagram displays empty.

If I remove the where clause, diagram displays perfectly. 

Is there anything I am not taking into account?

 

Thank you in advance

 

Iago
Top achievements
Rank 1
 answered on 16 Oct 2017
2 answers
200 views

Hi,

I'm new to using Telerik controls.  I want to use the radEditor on an ASP.Net web page.  I created a SQL table named AC_ToolText and a column named Description to save the value entered on my web page.  But I can't find an example of how to interact with the SQL database.

So I want to do the following:

1. Allow user to enter rich text and then save to my table.

2. If the user calls my web page, I want to fetch the value from my Description column and display in the RadEditor.

3. The user can change or add to the text and save again if necessary.

 

Can someone provide an example of how to do the above?  Thanks in advance.

 

Bob
Top achievements
Rank 1
 answered on 13 Oct 2017
1 answer
174 views

Hi,

I have an Update and Cancel button on my form template.

It seems unnecessary to incur a server call just to close the form when the user clicks on Cancel.

Ideally I want to call some client side code that will cause the form to be closed.

Here's the FormTemplate declaration:

<EditFormSettings InsertCaption="New Input" CaptionFormatString="Editing Input" CaptionDataField="BriefName" PopUpSettings-Modal="true" EditFormType="Template" PopUpSettings-ShowCaptionInEditForm="false">
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    <FormTemplate>
        <div class="container-fluid">
            <div class="row row-margin-bottom">
                <div class="col-xs-12">
                    <asp:Label ID="lblReadOnly" runat="server" Text="** READ ONLY **" class="readOnly" Visible='<%# !(bool) Session["EditProcess"] %>'></asp:Label>
                    <div class="form-group">
                        <label>Name</label>
                        <span id="lblReqName" runat="server" class="requiredField" visible='<%# (bool) Session["EditProcess"] %>'></span>
                        <asp:RequiredFieldValidator runat="server" ID="valName" ControlToValidate="txtName" CssClass="bg-danger text-danger _validator" ErrorMessage="ooops... a name is required" Enabled='<%# (bool) Session["EditProcess"] %>'></asp:RequiredFieldValidator><br />
                        <telerik:RadTextBox ID="txtName" MaxLength='<%# (int) Session["MaxSingleLineSize"] %>' runat="server" Text='<%# Bind("Name") %>' Width="50%" InputType="Text" ToolTip="Provide a brief and meaningful name for this Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="0">
                        </telerik:RadTextBox>
                    </div>
                    <div class="form-group">
                        <label>Description</label>
                        <span id="lblReqDesc" runat="server" class="requiredField" visible='<%# (bool) Session["EditProcess"] %>'></span>
                        <asp:RequiredFieldValidator runat="server" ID="valDesc" ControlToValidate="txtDesc" CssClass="bg-danger text-danger _validator" ErrorMessage="ooops.. a description is required" Enabled='<%# (bool) Session["EditProcess"] %>'> </asp:RequiredFieldValidator><br />
                        <telerik:RadTextBox ID="txtDesc" MaxLength='<%# (int) Session["MaxMultiLineSize"] %>' runat="server" Text='<%# Bind("Description") %>' Width="100%" Rows="4" InputType="Text" TextMode="MultiLine" Resize="Both" Wrap="True" data-toggle="tooltip" data-placement="top" title="Provide a detailed description for this Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="1">
                        </telerik:RadTextBox>
                    </div>
                    <div class="form-group">
                        <label>Supplier</label><br />
                        <telerik:RadTextBox ID="txtSupplier" MaxLength='<%# (int) Session["MaxMultiLineSize"] %>' runat="server" Text='<%# Bind("Supplier") %>' Width="100%" InputType="Text" Rows="2" TextMode="MultiLine" Resize="Both" Wrap="True" ToolTip="Identify one or more sources for this particular Input" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="2">
                        </telerik:RadTextBox>
                    </div>
                    <div class="checkbox">
                        <label>
                            <asp:CheckBox ID="chkTrigger" runat="server" AutoPostBack="false" Checked='<%# Bind("IsTrigger") %>' ToolTip="Check if this Input acts as a trigger to initiate a task within the process" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="3"></asp:CheckBox>
                            <span data-toggle="tooltip" data-placement="right" title="Check if this Input acts as a trigger to initiate a task within the process">Trigger</span>
                        </label>
                    </div>
                    <div class="checkbox">
                        <label>
                            <asp:CheckBox ID="chkCommon" runat="server" AutoPostBack="false" Checked='<%# Bind("Common_Flag") %>' ToolTip="Check if this Input is suitable for use in other processes" Enabled='<%# (bool) Session["EditProcess"] %>' TabIndex="4"></asp:CheckBox>
                            <span data-toggle="tooltip" data-placement="right" title="Check if this Input is suitable for use in other processes">Common</span>
                        </label>
                    </div>
                    <div class="form-group">
                        <telerik:RadNumericTextBox ID="numListOrder" runat="server" Text='<%# Bind("ListOrder") %>'
                            Visible="false">
                        </telerik:RadNumericTextBox>
                    </div>
                </div>
            </div>
            <div class="row row-margin-bottom">
                <div class="col-xs-12">
                    <telerik:RadButton ID="btnAddUpdate" runat="server" Text='<%# ((bool) DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Create" : "Update" %>' Visible='<%# (bool) Session["EditProcess"] %>' CommandName='<%# ((bool) DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'>
                    </telerik:RadButton>
                    <telerik:RadButton ID="btnCancel" runat="server" Text='<%# ((bool) Session["EditProcess"]) ? "Cancel" : "Close" %>' CausesValidation="False" CommandName="Cancel">
                    </telerik:RadButton>
                </div>
            </div>
        </div>
    </FormTemplate>
    <PopUpSettings Width="90%" KeepInScreenBounds="True" Modal="True" ScrollBars="Auto"></PopUpSettings>
</EditFormSettings>

 

Thanks for any suggestions.

Jim

Marin Bratanov
Telerik team
 answered on 13 Oct 2017
1 answer
74 views

Hi,

I need to create a line chart with markers which displays the percentage of code reviews completed in each sprint. The X axis denotes the sprints whereas the y axis denotes the percentage.

Based on the demos I found out that there are legends being displayed. But I do not need to display a legend as I am displaying a trend. How can I achieve this?

I have attached the screenshot from excel.

Sriram
Top achievements
Rank 1
 answered on 13 Oct 2017
2 answers
507 views

I have a RadGrid created dynamically in code behind and when I try to export to Excel I get the following error:

We found a problem with this formula. Try clicking Insert Function on the Formulas tab to fix it.\n\nNot trying to type a formula? When the first character is an equal (=) or minus (-) sign, RadSpreadsheet thinks it is a formula. For example, when you type =1+1 the cell shows 2.

Here is the export code:

protected void ibtnExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            rgWorkItems.DataSource = Session["GridTable"];
            rgWorkItems.Rebind();
            rgWorkItems.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;
            rgWorkItems.ExportSettings.IgnorePaging = true;
            rgWorkItems.ExportSettings.ExportOnlyData = true;
            rgWorkItems.ExportSettings.OpenInNewWindow = true;
            rgWorkItems.MasterTableView.ExportToExcel();         
        }

I do not have any of the data that starts with = in my grid.

If I change the ExportToExcel to ExportToCSV it works just fine.

How can I resolve this?

Paolo
Top achievements
Rank 1
 answered on 13 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?