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

hi sir,

 

           i have dynamically creted a dountchart  radhtmlchart in code behind , now i want to wrap the text. I the data length is too large then the chart go smaller example is show below, otherwise is normal.

          I need solution ASAP

         the sample code:

Dim chart As New RadHtmlChart
        chart.ID = "chart"
             chart.PlotArea.XAxis.LabelsAppearance.RotationAngle = 75

        chart.PlotArea.XAxis.DataLabelsField = _ChartSeriesFieldTitlexaxis

        chart.PlotArea.Series.Clear()
        Dim series As New DonutSeries
        series.NameField = _ChartSeriesFieldTitlexaxis
        series.DataFieldY = _ChartDataFieldTitle
        chart.PlotArea.Series.Add(series)
        chart.PlotArea.XAxis.LabelsAppearance.DataFormatString = "d"
        chart.PlotArea.XAxis.BaseUnit = DateTimeBaseUnit.Days
        chart.PlotArea.XAxis.TitleAppearance.Text = _ChartSeriesFieldTitlexaxis
        chart.PlotArea.YAxis.TitleAppearance.Text = _ChartDataFieldTitle

        chart.DataSource = firstTable
        chart.DataBind()

 

 

        
M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 07 Feb 2022
0 answers
131 views

Hello.

I need help.

I need the coordinates of Column + Row of the selected cell in Radgrid.
Is the syntax of the source I attached correct?

please reply.

keep waiting for your reply

I want to communicate with client side and server side.


In Server Side(ASP.NET), 
<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In JavaScript,
function cellSelected(sender, args)
{
            var selectedRow = args.get_row();
            var selectedColumn = args.get_column();
            var dataItem = args.get_gridDataItem();
            var tableView = args.get_tableView();
            var cellIndex = args.get_cellIndexHierarchical();
            var output = String.format("The selected cell is located in column with name: " + selectedColumn.get_uniqueName() + " and in row with index: " + dataItem.get_itemIndexHierarchical() + ". This cell has index " + cellIndex + " and it is part from " + tableView.get_name() + ".");

sender.get_masterTableView().fireCommand("cellSelected",    ????????????? );

}



Is the syntax of the source I attached correct?

To get the Selected Column&Row Coordinate

Client Side (aspx.cs)

protected void gv_ItemConmmand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "cellSelected")
    {
 var clickedColumnName = e.CommandArgument.ToString();

         // Label1.Text = clickedColumnName;
     }
 }

Do you have any other code from this source?

In Server Side

<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In Client Side

protected voidRadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "CellClick")
    {
        var selectedColumn = e.Item.selectedColumn.get_uniqueName();
        var selectedRow = e.Item.get_row();
    }
}

Is the syntax of the source I attached correct?             

anna
Top achievements
Rank 1
Bronze
Iron
 asked on 05 Feb 2022
1 answer
219 views

Hello,

I have a scenario where I would like to create columns dynamically and have filters on that grid. So far, when I set the AllowFilteringByColumn to true and create the column dynamically at the OnNeedDataSource event. I receive an error when I try to filter "Expression Expected".

If I take that same column and declare it aspx page, I can filter no problem.

<telerik:RadGrid ID="rgPortfolio" runat="server" 
    AllowFilteringByColumn="true" MasterTableView-AllowPaging="true" PagerStyle-AlwaysVisible="true"
    AllowSorting="true" AllowPaging="true" AutoGenerateColumns="false" 
    OnNeedDataSource="rgPortfolio_NeedDataSource"
    OnColumnCreated="rgPortfolio_ColumnCreated">
    <MasterTableView AllowFilteringByColumn="true" DataKeyNames="Id">
        <Columns>
            <%--<telerik:GridBoundColumn UniqueName="Cusip" DataField="Cusip"></telerik:GridBoundColumn>--%>
        </Columns>
    </MasterTableView>
                
</telerik:RadGrid>


private void BuildGridColumns()
{
        
    rgPortfolio.Columns.Clear();
    var col = new GridBoundColumn();
    col.UniqueName = "cusip";
    col.HeaderText = "cusip";
    col.DataField = "cusip";
    rgPortfolio.MasterTableView.Columns.Add(col);

}

protected void rgPortfolio_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    BuildGridColumns();
    rgPortfolio.DataSource = Reporting.Investor.GetActivePortfolioItems();
}

Doncho
Telerik team
 answered on 04 Feb 2022
0 answers
61 views

Why don't you reply?

Tired of repeating the same answer to your customers over and over again?

I am not American. So I am not good at reading English. I am currently writing the article after translating it into English using Google Translate. Aren't we supposed to help people with disabilities in English? Is telerik annoyed with answering customers?

I hope my question is answered.


I am waiting for your reply for several days.
Telerik does not respond to customers.
Inconvenient to use Telerik.

 

 

Hello.

I need help.

I need the coordinates of Column + Row of the selected cell in Radgrid.
Is the syntax of the source I attached correct?

please reply.

keep waiting for your reply

I want to communicate with client side and server side.


In Server Side(ASP.NET), 
<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In JavaScript,
function cellSelected(sender, args)
{
            var selectedRow = args.get_row();
            var selectedColumn = args.get_column();
            var dataItem = args.get_gridDataItem();
            var tableView = args.get_tableView();
            var cellIndex = args.get_cellIndexHierarchical();
            var output = String.format("The selected cell is located in column with name: " + selectedColumn.get_uniqueName() + " and in row with index: " + dataItem.get_itemIndexHierarchical() + ". This cell has index " + cellIndex + " and it is part from " + tableView.get_name() + ".");

sender.get_masterTableView().fireCommand("cellSelected",    ????????????? );

}



Is the syntax of the source I attached correct?

To get the Selected Column&Row Coordinate

Client Side (aspx.cs)

protected void gv_ItemConmmand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "cellSelected")
    {
 var clickedColumnName = e.CommandArgument.ToString();

         // Label1.Text = clickedColumnName;
     }
 }

Do you have any other code from this source?

In Server Side

<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In Client Side

protected voidRadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "CellClick")
    {
        var selectedColumn = e.Item.selectedColumn.get_uniqueName();
        var selectedRow = e.Item.get_row();
    }
}

Is the syntax of the source I attached correct?                     

anna
Top achievements
Rank 1
Bronze
Iron
 updated question on 03 Feb 2022
1 answer
219 views

I have a RadHtmlChart in an ASP.NET application to show a pie chart that has stopped working for some reason, it just shows a blank space instead of where the chart is supposed to be. I think that it may have been a result of updating from Telerik 2019 to 2021, but I don't know for sure.

I see an error in the console log like this that I think may be related:

Uncaught SyntaxError: '' string literal contains an unescaped line break
    _getMainConfig https://mydomain/ScriptResource.axd?d=tbtXkupOsJbh23R1_Hx7q2pZp3JxD5nSFapGUZ3sqXMSswV2X1Q2E1yGmyRwIn4zcz_FaG3pZ673Wbd7B-S8wD0iEyTbmgkuVT3xUNxMNje2tXgtmPHlNMU2UCqG2qcKV9OzjA2&t=244d15ab:97

 

At first I thought it was a bad label or something but even stubbing out all the labels doesn't seem to fix it, so I don't know.

 

Vessy
Telerik team
 answered on 03 Feb 2022
1 answer
177 views

I need more specifics about how to cancel a tab switch when using the RadTabStrip. The information I have found on the Telerik help forums makes a lot of assumptions about knowledge of the programmer, and (although I have lots of programming experience) I'm fairly new at Telerik and asp programming in general. 

I'm using the Telerik RadTabStrip and I need to cancel on the client side the switching from one tab to another. The RadTabStrip is on a general management page that references the other tabs (asp pages), one for each tab.

In the first tab asp page, I have a hidden control that contains an indicator if the page is dirty. 

In the management page, containing the RadTabStip, I have a java script function for the OnClientTabSelecting. From the management page java script function for OnClientTabSelecting I need to A) check if I'm leaving the page which may be dirty and B) if that is the page i'm leaving then I need to check the dirty flag. If both A and B are true, then C) I need to prompt the user, warning them that the page is dirty and confirming that they do want to leave. If they do not, then I want to cancel the tab switch. 

I understand how to to C) above, but could you please provide some example code of both A) and B) above? If the examples exist elsewhere, then a link to those examples would be very helpful.

Thank you!

 

 

Peter Milchev
Telerik team
 answered on 02 Feb 2022
0 answers
116 views

Hi,

I am binding data to RadMultiSelect control through web service method.

when I am trying to filter data (typing on RadMultiselect control) it calls web service method twice.

Issue is, either it holds the filter value in first time hit, second time hit filter value get cleared. 

How can I prevent web service multiple times hit.

I have inserted the code for your reference.

<div>
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxPanel ID="ap" runat="server">
                <telerik:RadMultiSelect runat="server" Filter="Contains" EnforceMinLength="false" AutoClose="false" DataTextField="description" DataValueField="department" 
                Width="400px" ID="RadMultiSelect1" Placeholder="Shipping names..." DropDownHeight="130" ClientDataSourceID="RadClientDataSource1" AutoPostBack="false">
                <VirtualSettings ItemHeight="26" ValueMapper="valueMapper"  />
                <ItemTemplate>
                    <span class='order-id'>#= department #</span> #= description #
                </ItemTemplate>            
            </telerik:RadMultiSelect>
                <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server"
                                EnableServerFiltering="true"
                                AllowPaging="true"
                                EnableServerPaging="true" PageSize="20">
                        <ClientEvents OnCustomParameter="OnCustomParameter" />
                        <DataSource>                                    
                            <WebServiceDataSourceSettings ServiceType="Default">                                        
                                <Select Url="WebService1.asmx/GetOrders" DataType="JSON" RequestType="Post" ContentType="application/json;charset=utf-8" />
                                    </WebServiceDataSourceSettings>
                                </DataSource>
                                <Schema DataName="d.Data" TotalName="d.Count" ResponseType="JSON">
                                    <Model>
                                        <telerik:ClientDataSourceModelField DataType="String" FieldName="department" />
                                        <telerik:ClientDataSourceModelField DataType="String" FieldName="description" />                                            
                                    </Model>
                                </Schema>
                            </telerik:RadClientDataSource>
                </telerik:RadAjaxPanel>
        </div>

 

Thanks & Regards,

Chandi

chandi
Top achievements
Rank 1
 asked on 02 Feb 2022
1 answer
167 views

Hi Telerik's friends

I have a RadComboBox that I load with a DataTable. This is my code:

    Private Sub LoadAgente()
        Dim rcbElemento As New RadComboBoxItem

        Me.rcbAgente.DataSource = GetNombreAgente() ' Get DataTable
        Me.rcbAgente.DataValueField = "CodigoPersona"
        Me.rcbAgente.DataTextField = "NombreCompleto"
        Me.rcbAgente.DataBind()

        rcbElemento.Value = "0"
        rcbElemento.Text = "Seleccione un agente"
        Me.rcbAgente.Items.Insert(0, rcbElemento)
        rcbElemento = Nothing

        Me.rcbAgente.ClearSelection()
        Me.rcbAgente.SelectedValue = "0"
    End Sub

But this don't work.

I need your help. please.

Thanks

Rumen
Telerik team
 answered on 01 Feb 2022
0 answers
121 views

Hello.

I need help.

I need the coordinates of Column + Row of the selected cell in Radgrid.
Is the syntax of the source I attached correct?

please reply.

keep waiting for your reply

I want to communicate with client side and server side.


In Server Side(ASP.NET), 
<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In JavaScript,
function cellSelected(sender, args)
{
            var selectedRow = args.get_row();
            var selectedColumn = args.get_column();
            var dataItem = args.get_gridDataItem();
            var tableView = args.get_tableView();
            var cellIndex = args.get_cellIndexHierarchical();
            var output = String.format("The selected cell is located in column with name: " + selectedColumn.get_uniqueName() + " and in row with index: " + dataItem.get_itemIndexHierarchical() + ". This cell has index " + cellIndex + " and it is part from " + tableView.get_name() + ".");

sender.get_masterTableView().fireCommand("cellSelected",    ????????????? );

}



Is the syntax of the source I attached correct?

To get the Selected Column&Row Coordinate

Client Side (aspx.cs)

protected void gv_ItemConmmand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "cellSelected")
    {
 var clickedColumnName = e.CommandArgument.ToString();

         // Label1.Text = clickedColumnName;
     }
 }

Do you have any other code from this source?

In Server Side

<ClientSettings>
    <Selecting CellSelectionMode="MultiCell" />
    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    <ClientEvents OnCellSelected="cellSelected" />
</ClientSettings>

In Client Side

protected voidRadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == "CellClick")
    {
        var selectedColumn = e.Item.selectedColumn.get_uniqueName();
        var selectedRow = e.Item.get_row();
    }
}

Is the syntax of the source I attached correct?                     

anna
Top achievements
Rank 1
Bronze
Iron
 updated question on 31 Jan 2022
0 answers
120 views

I have hierarchal data with thousands of nodes.  I am using a RadTreeView control with "Load On Demand" mode, with Expand mode set to "ServerSideCallback".  I set up the handler. It creates the child nodes, grabs about 10 custom fields and adds them to the "Attributes" collection, and adds the nodes to e.Node.Nodes collection.  All of this is working great, but I want to display values from the Attributes collection.

How do I access those attributes from the NodeTemplate? 

The node template seems to work, but it is not showing the fields. I assume this is because I am just adding the nodes and do not call "DataBind"?

Thanks.

Mike
Top achievements
Rank 1
 asked on 30 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?