Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
799 views
I tried to follow the steps mentioned at http://www.telerik.com/help/aspnet-ajax/introduction-using-jquery.html to use a custom jQuery version instead of the embedded one in the Telerik DLLs.

When I add this script reference to RadScriptManager:

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Detection.Detection.js" />

and I run my project, I get the following exception:

Assembly 'Telerik.Web.UI, Version=2015.1.225.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' contains a Web resource with name 'Telerik.Web.UI.Common.Detection.Detection.js', but does not contain an embedded resource with name 'Telerik.Web.UI.Common.Detection.Detection.js'.

But when I run the project without that "detection" script reference, RadScriptManager insists on adding another script-tag with a reference to the same jQuery file as is already referenced/used in the HEAD section of the page.
The generated code looks like this then:

<script src="https://d2i2wahzwrm1n5.cloudfront.net/ajaxz/2015.1.225/Common/Core.js" type="text/javascript"></script>
<script src="/wsAdmin/jQuery/jquery-1.11.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
(window.jQuery)||document.write('<script type="text/javascript" src="/wsAdmin/jQuery/jquery-1.11.2.min.js"><\/script>');//]]>
</script>
 

 
A few questions:

  1. Can anyone explain why I get the exception when using the "detection" script reference?
  2. And also why RadScriptManager adds another script-tag for the jQuery?

Thanks in advance for any pointers.

Best regards, Marja







Peter Milchev
Telerik team
 answered on 27 Aug 2020
2 answers
211 views

My issue is the gauge control won't render in design mode:

Error Creating Control - GaugeuserCountFailed to create designer 'Telerik.Web.UI.RadRadialGauge, Telerik.Web.UI, Version=2020.2.617.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4'

 

I've got a reference in the project page to the .40  .dll   version..

Project builds & runs fine, just cannot get this to work!..

This is VS.NET 2017 on Windows 10

I've tried deleting files in:

%AppData%\Local\Microsoft\VisualStudio\16.0_1695dc1b\ProjectAssemblies, Cleaning & REbuilding the solution..

Help!

Rich

 

Rich
Top achievements
Rank 2
 answered on 26 Aug 2020
1 answer
2.9K+ views

Hi,

How do I uninstall all Telerik menus and references in Visual Studio?  I can't find a way to do this on your menu.

Thanks,
Kevin

Doncho
Telerik team
 answered on 26 Aug 2020
7 answers
509 views
Hi,

I need a radnumerictextbox with variable decimal digits, same as described in following code sample of yours -

http://www.telerik.com/community/code-library/aspnet-ajax/input/radnumerictextbox-with-variable-decimal-digits-not-rounded.aspx

This code sample is no longer working with  new version of radnumerictextbox. So please provide me the updated solution for this problem.

I am using version 2012.3.1127.40 of telerik dlls.

Please let me know if more information is required for this.

Thanks,
Shefali Gupta
Eyup
Telerik team
 answered on 26 Aug 2020
1 answer
123 views

Hello,

 

After a user configures their Pivotgrid to show the data the way they like it, I would like to get the resulting data into a data table for other uses like generating a chart off of the the resulting data.   It would be like the excel export function but export to a datatable in code behind.

Attila Antal
Telerik team
 answered on 25 Aug 2020
1 answer
90 views

For now, I am using autoscaling to create a graph.  A user wanted an option to force Y axis to 0.   I created a checkbox, and when checked set minvalue to 0 in code behind.  Works great.

When the user unchecks the box because they don't like the 0 axis, how to I reset the graph to auto scaling, like it was before they checked the box?  It's a large dataset, so I would prefer not to destroy the chart and rebind if possible.

 

 

Peter Milchev
Telerik team
 answered on 25 Aug 2020
1 answer
256 views
Hi Telerik,

I'm having trouble getting data binding to work on a nested grid.  What I want to do is present a summary list of data in an outer grid and load some record-specific detail data and insert it into the nested grid when the user expands the nested grid.

I've tried to follow a couple of different examples from these forums and the documentation, but I haven't found an example that addresses my desire to load and bind new data in response to expanding the outer grid.

See my inline comments below for details about how this code currently behaves when I'm debugging.

Thanks for any help or suggestions for making this work.

Here is my markup (Note that MyDataGridImplementation extends RadGrid):

<mynamespace:MyDataGridImplementation ID="ItemSummaryGrid" runat="server"
        AllowSorting="true" AllowPaging="true" PageSize="10"
        OnNeedDataSource="OuterGridNeedDataSource" OnItemDataBound="OuterGridItemDataBound" OnItemCommand="OuterGrid_ItemCommand">
        <PagerStyle Mode="NextPrevAndNumeric"/>
        <MasterTableView AutoGenerateColumns="false" EnableNoRecordsTemplate="true" DataKeyNames="OuterGridItemId"
            NoMasterRecordsText='<%# ResourceManager.GetPhrase("NoRecords", "There are no records.") %>'>         
            <Columns>
                <telerik:GridBoundColumn
                    AllowSorting="true"
                    DataField="ItemSummaryDateTime"
                    DataType="System.DateTime"
                    DataFormatString="{0:d}"
                    HeaderText="Date"
                    UniqueName="ItemSummaryDateTime" />
                <telerik:GridBoundColumn
                    AllowSorting="true"
                    DataField="ItemSummaryItemType"
                    DataType="System.String"
                    HeaderText="Type"
                    UniqueName="ItemSummaryItemType" />
                <telerik:GridBoundColumn
                    AllowSorting="true"
                    DataField="ItemSummaryItemSubject"
                    DataType="System.String"
                    HeaderText="Subject"
                    UniqueName="ItemSummaryItemSubject" />
                <telerik:GridBoundColumn
                    AllowSorting="true"
                    DataField="ItemSummaryName"
                    DataType="System.String"
                    HeaderText="Name"
                    UniqueName="ItemSummaryName" />
            </Columns>
            <NestedViewTemplate>
                <asp:Panel ID="Panel1" runat="server" CssClass="ChildGridWrapper">
                    <mynamespace:MyDataGridImplementation ID="ItemDetailsLinesGrid" runat="server" AllowSorting="false"                       
                         OnNeedDataSource="NestedGridNeedDataSource" OnItemDataBound="NestedGridItemDataBound" EnableShowAllButton="False" >
                        <MasterTableView AutoGenerateColumns="false" DataKeyNames="NestedGridItemEventId" ShowHeader="true" ShowFooter="false">
                            <Columns>
                                <telerik:GridBoundColumn
                                    AllowSorting="false"
                                    DataField="DetailItemDateTime"
                                    DataType="System.DateTime"
                                    DataFormatString="{0:d}"
                                    HeaderText="Date"
                                    UniqueName="DetailItemDateTime" />
                                <telerik:GridBoundColumn
                                    AllowSorting="false"
                                    DataField="DetailItemTypeCode"
                                    DataType="System.String"
                                    HeaderText="Type"
                                    UniqueName="DetailItemTypeCode" />                             
                                <telerik:GridBoundColumn
                                    AllowSorting="false"
                                    DataField="DetailItemMessage"
                                    DataType="System.String"
                                    HeaderText="Details"
                                    UniqueName="DetailItemMessage" />
                            </Columns>
                        </MasterTableView>
                    </mynamespace:MyDataGridImplementation>
                </asp:Panel>
            </NestedViewTemplate>
        </MasterTableView>
        <ClientSettings AllowGroupExpandCollapse="false" EnablePostBackOnRowClick="false">
            <Selecting AllowRowSelect="false" />                                
        </ClientSettings>
    </mynamespace:MyDataGridImplementation>


And code behind:

protected void OuterGridNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // ItemSummaryList is populated during OnLoad.  Outer grid populates correctly with summary data.
    ItemSummaryGrid.DataSource = null;
    if (!IsContentDesignMode)
        ItemSummaryGrid.DataSource = ItemSummaryList;
}
 
protected void OuterGridItemDataBound(object sender, GridItemEventArgs e)
{
    if (e == null) throw new ArgumentNullException("e");
 
    // format and set outer summary grid column values.
}
 
protected void OuterGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExpandCollapseCommandName)
    {
        var gridItem = e.Item as GridDataItem;
        if (gridItem != null)
        {
            var nestedGrid = (RadGrid)gridItem.ChildItem.FindControl("ItemDetailsLinesGrid");
            nestedGrid.Rebind();
        }
    }
}
 
protected void NestedGridNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // NestedGridNeedDataSource is fired successfully from OuterGrid_ItemCommand when the outer grid row is expanded
     
    var control = ((Control)sender);
    var nestedGridItem = control?.BindingContainer as GridNestedViewItem;
    if (nestedGridItem != null)
    {
        var nestedGrid = (RadGrid)nestedGridItem.FindControl("CommunicationLogEventLinesGrid");
        // here we set the DataSource for the nested grid.  I have verified during debugging that
        // nestedGrid.DataSource is null when the nested grid is initially expanded and this event is fired.
        nestedGrid.DataSource = FakeData();
        // not sure if an explicit call to DataBind is necessary here...
        //nestedGrid.DataBind();
    }
}
 
protected void NestedGridItemDataBound(object sender, GridItemEventArgs e)
{
    // NestedGridItemDataBound is never fired. 
    // A breakpoint set here is never reached when the nested grid is expanded from the UI.
    if (e == null) throw new ArgumentNullException("e");
 
    var gridDataItem = e.Item as GridDataItem;
     
    // format and set nested detail grid column values.
}
 
public IEnumerable<FakeItemDetailData> FakeData()
{
    return Enumerable.Range(1, 5).Select(i => new FakeItemDetailData
    {
        NestedGridItemEventId = Convert.ToString(i),
        DetailItemDateTime = DateTime.Now,
        DetailItemTypeCode = "HIHI",
        DetailItemMessage = $"HI! {i}"
    });
}
 
public class FakeItemDetailData
{
    public string NestedGridItemEventId;
    public DateTime DetailItemDateTime;
    public string DetailItemTypeCode;
    public string DetailItemMessage;
}

Attila Antal
Telerik team
 answered on 24 Aug 2020
3 answers
343 views

Hello.
I am customizing the following demo source now.
The demo version of the source is located in the following path.

https://demos.telerik.com/aspnet-ajax/sample-applications/diagram-app/

https://demos.telerik.com/aspnet-ajax/sample-applications/diagram-app/DiagramAppSource.zip

But while working on it, I faced a big challenge.
The demo source did not have a function to give content property to the shapes displayed in the original diagram.
So, in order to put this function in here, I have tried a lot of effort by looking for various examples, but I couldn't implement the function.
So I want to get your help.
First, drag and drop a shape control from the toolbox to display it on the canvas, then select it and enter the body in the property editing window on the right to display the body in the shape.(at this time, add textbox on configPanel)
Also, the same function is realized for the connections.
I would be grateful if you posted the explanation and example code together.
Please help me.

Rumen
Telerik team
 answered on 24 Aug 2020
1 answer
593 views

I am using a RadGrid with edit mode as batch and edit type is row. I have a GridCheckboxColumns in my grid which is editable when the row is selected.

When I select a row for editing, I want the checkbox cell to be readonly based on another cell value of the row. 

I have tried solutions from other posts such as cancelling edit on BatchEditOpening client-side event, making GridEditItem readonly on the server-side ItemCreated event and disabling checkbox on ItemDatabound event but none have worked for my scenario. 

Here is the sample code: I want PortalAccess checkbox cell to be readonly when 

    <telerik:RadGrid ID="grdContactsList" runat="server" AutoGenerateColumns="False" 
         OnBatchEditCommand="grdContactsList_BatchEditCommand"
        AllowSorting="true" EnableViewState="false" OnItemCommand="grdContactsList_ItemCommand" >
        <ClientSettings EnableRowHoverStyle="false" Selecting-AllowRowSelect="false" >
            <ClientEvents OnBatchEditOpening="batchEditOpening" />
        </ClientSettings>
        <MasterTableView TableLayout="Auto" CssClass="bordered" NoMasterRecordsText="No records to display." 
            AllowSorting="true" EditMode="Batch"
            <BatchEditingSettings EditType="Row" />
            <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Email Communications" Name="EmailCommunications"></telerik:GridColumnGroup>
            </ColumnGroups>
            <Columns> 
               <telerik:GridBoundColumn DataField="SponsorPortal" SortExpression="SponsorPortal" HeaderText="IsSponsor" UniqueName="IsSponsor"
                    Display="false" ReadOnly="true"></telerik:GridBoundColumn>   
              <telerik:GridCheckBoxColumn HeaderText="Portal Access" SortExpression="PortalAccess"
                    UniqueName="PortalAccess" DataField="PortalAccess"
                    HeaderStyle-CssClass="tblC" ItemStyle-CssClass="tblC">                                     
                </telerik:GridCheckBoxColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

 

Doncho
Telerik team
 answered on 24 Aug 2020
15 answers
1.3K+ views
Hello everyone,

I am having a issue that I can't seem to fix. When I call the following in a render overide:

  Dim s_wtr2 As New StringWriter()  
            Dim h_wtr2 As HtmlTextWriter = New HtmlTextWriter(s_wtr2)  
 
            'Check Type  
            If drpType.SelectedValue = "CC Declined" Then 
 
                gridPacc.RenderControl(h_wtr2) 

I get the following error:

Script control 'gridPacc' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl

"grdPacc" is a Q1 asp.net ajax telerik grid.

Any other control done the same way does not produce the error. Any help is appreciated.
JeffSM
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 22 Aug 2020
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?