Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
149 views
Dear all, 

Am tring a demo for my mangers and they want a bubble chart the axxies is words not number and i have it on SQL data base, how can i make the Y and X axis of the bubble shart be stings not Int so for examble in the x axis it would have kareem, mohsen, eman and the why Y axis would have Service 1 , service 2 , service 3 and the buble will appear infront of service 1 and kareem , servce 3 and kareem and the size of it will be based on the value of the services used .

the coulms i have in the DB are   Name, Service , Value .

your support is highly appreciate it 
Danail Vasilev
Telerik team
 answered on 11 Mar 2015
1 answer
211 views

My apologies if this is a vague question.  I have a Dot Net 4.0 web app that makes extensive use of Telerik controls, particularly the RadGrid and RadTextBox.

The purpose of the application is to manage mail merge data for a newsletter.  

A small number of the newsletter versions use non-Latin right-to-left alphabets such as Arabic.  

The process is as follows: 
1. The translations (Arabic and others) are sent to us in Excel spreadsheets.  
2. The phrases get copied into (Telerik) textboxes of the application.  (I should mention that not all fields are entirely in Arabic.  It is necessary to mix in some English characters at times.)  
3. The phrases get saved to a SQL database in nvarchar fields.
4. The phrases are then used in a Mail Merge through a database view that reads the required fields.

I simply have no experience whatsoever dealing with a situation like this. 

For lack of a better question, I'm wondering if I'm overlooking any Telerik features that might be of help to me.  What considerations are there in creating a Dot Net web app that has to handle multiple alphabets at once?  

Vasil
Telerik team
 answered on 11 Mar 2015
4 answers
560 views
Hallo,
I have problem with spaces in url path.
I have Rad Grid with columns like this:
<telerik:GridHyperLinkColumn DataTextFormatString="Adres" ItemStyle-ForeColor="Orange"
 DataNavigateUrlFields="s_adresar" UniqueName="s_adresar" DataNavigateUrlFormatString="file://///SomeServer/Some Directory With Spaces/{0}" Target="_blank" HeaderText="Adres" DataTextField="s_adresar">
 </telerik:GridHyperLinkColumn>

I would like to open directory from shared file system in Windows Explorer after click on link in RadGrid, but it doesn't work.
Right path to directory is file://SomeServer/Some Directory With Spaces/
but rendered path is  file://SomeServer/Some%20Directory%20With%20Spaces/
and  this path is for Windows Explorer unknown. I tried to replace spaces in path ( in DataNavigateUrlFormatString property) with some mark entity but without success.
Can anyone help me  please?
Thanks
Rama
Top achievements
Rank 1
 answered on 10 Mar 2015
7 answers
231 views
Hi,
I use radgrid with these settings

Me.ResultsGrid.MasterTableView.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
Me.ResultsGrid.MasterTableView.PagerStyle.Position = GridPagerPosition.Top
Me.ResultsGrid.MasterTableView.PagerStyle.PageButtonCount = 10

I want to hide the border for the pager, as the pager is placed on top, the top-line caused by the styles are not in sync with my design,
so i want to hide the border.

.RadGrid_Default .rgPager .rgPagerCell
   border-color:#828282 -moz-use-text-color #EEEEEE #EEEEEE;
   border-style:solid none solid solid;
   border-width:1px 0 1px 1px;

I tried setting
  Me.ResultsGrid.MasterTableView.PagerStyle.BorderStyle = WebControls.BorderStyle.None
but no use.

How i can set it from code-behind?
Pavlina
Telerik team
 answered on 10 Mar 2015
1 answer
116 views
wherever I try to filter a bounded column with RadGrid I get the following error:

"Could not resolve 'COLUMN NAME' in scope or current context. Check
that all referenced variables are in scope, if required schemes were
loaded and references to namespaces are correct. Next simple identifier,
line 6, column 3."

My page's code is:

<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="VerOcorrencias.aspx.cs" Inherits="DuctorWebSite.OuvidoriaPages.VerOcorrencias" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <meta http-equiv='cache-control' content='no-cache'>
    <meta http-equiv='expires' content='0'>
    <meta http-equiv='pragma' content='no-cache'>
 
    <link href="../Content/OuvidoriaPages.css" rel="stylesheet" />
 
    <div class="container-full">
        <h2>Lista de ocorrências</h2>
 
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EntityDataSource1"
            RenderMode="Auto" Culture="pt-BR" Skin="Metro"
            AllowAutomaticDeletes="True" AllowFilteringByColumn="True" AllowPaging="True"
            AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand" EnableLinqExpressions="False" GroupPanelPosition="Top">
 
            <ExportSettings>
                <Pdf PageWidth="">
                </Pdf>
            </ExportSettings>
 
            <MasterTableView DataSourceID="EntityDataSource1" DataKeyNames="OUV_Id" PageSize="25">
 
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn" CancelText="Cancelar" EditText="Editar" UpdateText="Confirmar" ButtonType="ImageButton" CancelImageUrl="../Images/icons/cancelar.png"
                        UpdateImageUrl="../Images/icons/ok.png">
                    </EditColumn>
                </EditFormSettings>
 
                <Columns>
                    <telerik:GridButtonColumn CommandName="Editar" Text="Editar resposta" UniqueName="EditCommandColumn" ButtonType="ImageButton" ImageUrl="../Images/icons/editar.png" Resizable="False">
                        <ItemStyle Width="41px" />
                    </telerik:GridButtonColumn>
 
                    <telerik:GridButtonColumn CommandName="Delete" Text="Apagar mensagem inteira" UniqueName="DeleteColumn" ConfirmText="Você tem certeza que quer apagar essa mensagem?" ConfirmDialogType="RadWindow" ConfirmDialogHeight="25px" HeaderStyle-Width="15px" ItemStyle-Width="15px"
                        ButtonType="ImageButton" ImageUrl="../Images/icons/apagar.png">
                        <HeaderStyle Width="15px" />
                        <ItemStyle Width="41px" />
                    </telerik:GridButtonColumn>
 
                    <telerik:GridBoundColumn DataField="OUV_Id" DataType="System.Int32" Display="False" FilterControlAltText="Filter OUV_Id column" HeaderText="OUV_Id" ReadOnly="True" SortExpression="OUV_Id" UniqueName="OUV_Id" Visible="False" Resizable="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ItemStyle Width="41px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_DtdRegistro" DataType="System.DateTime" FilterControlAltText="Filter OUV_DtdRegistro column" HeaderText="<b>DATA REGISTRO</b>" SortExpression="OUV_DtdRegistro" UniqueName="OUV_DtdRegistro" ReadOnly="True" DataFormatString="{0:dd/MM/yyyy}" Resizable="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ItemStyle Width="50px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_Protocolo" DataType="System.Double" FilterControlAltText="Filter OUV_Protocolo column" HeaderText="<b>PROTOCOLO</b>" SortExpression="OUV_Protocolo" UniqueName="OUV_Protocolo" ReadOnly="True" Resizable="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ItemStyle Width="30px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridCalculatedColumn DataFields="OUV_Nome,OUV_Email,OUV_Telefone" FilterControlAltText="Filter column column" UniqueName="column" Expression="OUV_Nome + '<br/>' + OUV_Email + '<br/>' + OUV_Telefone" HeaderText="<b>IDENTIFICAÇÃO</b>" Resizable="False">
                        <FooterStyle Width="100px" />
                        <ItemStyle Width="80px" />
                    </telerik:GridCalculatedColumn>
                    <telerik:GridBoundColumn DataField="OUV_Mensagem" FilterControlAltText="Filter OUV_Mensagem column" HeaderText="<b>MENSAGEM</b>" SortExpression="OUV_Mensagem" UniqueName="OUV_Mensagem" ReadOnly="True" Resizable="False" MaxLength="150">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <FooterStyle Width="500px" />
                        <ItemStyle Width="250px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_DtdResposta" DataType="System.DateTime" FilterControlAltText="Filter OUV_DtdResposta column" HeaderText="<b>DATA RESPOSTA</b>" SortExpression="OUV_DtdResposta" UniqueName="OUV_DtdResposta" ReadOnly="True" DataFormatString="{0:dd/MM/yyyy}" Resizable="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ItemStyle Width="30px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_Resposta" FilterControlAltText="Filter OUV_Resposta column" HeaderText="<b>RESPOSTA</b>" SortExpression="OUV_Resposta" UniqueName="OUV_Resposta" Resizable="False" MaxLength="150">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                        <ItemStyle Width="250px" Wrap="True" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_Nome" FilterControlAltText="Filter OUV_Nome column" HeaderText="OUV_Nome" SortExpression="OUV_Nome" UniqueName="OUV_Nome" Display="False" ReadOnly="True" Visible="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_Email" FilterControlAltText="Filter OUV_Email column" HeaderText="OUV_Email" SortExpression="OUV_Email" UniqueName="OUV_Email" Display="False" ReadOnly="True" Visible="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_Telefone" FilterControlAltText="Filter OUV_Telefone column" HeaderText="OUV_Telefone" SortExpression="OUV_Telefone" UniqueName="OUV_Telefone" Display="False" ReadOnly="True" Visible="False">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OUV_ChaveLoc" Display="False" FilterControlAltText="Filter OUV_ChaveLoc column" HeaderText="OUV_ChaveLoc" SortExpression="OUV_ChaveLoc" UniqueName="OUV_ChaveLoc" Visible="False" ReadOnly="True">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="OUV_Ativo" DataType="System.Boolean" Display="False" FilterControlAltText="Filter OUV_Ativo column" HeaderText="OUV_Ativo" SortExpression="OUV_Ativo" UniqueName="OUV_Ativo" Visible="False" ReadOnly="True">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="OUV_idCAT" Display="False" FilterControlAltText="Filter OUV_idCAT column" HeaderText="OUV_idCAT" SortExpression="OUV_idCAT" UniqueName="OUV_idCAT" Visible="False" ReadOnly="True">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CAT_Descr" Display="False" FilterControlAltText="Filter CAT_Descr column" HeaderText="CAT_Descr" SortExpression="CAT_Descr" UniqueName="CAT_Descr" Visible="False" ReadOnly="True">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                </Columns>
                <PagerStyle Position="TopAndBottom" />
            </MasterTableView>
 
 
            <FilterMenu RenderMode="Mobile">
            </FilterMenu>
            <HeaderContextMenu RenderMode="Mobile">
            </HeaderContextMenu>
 
        </telerik:RadGrid>
 
    </div>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=DuctorWebSiteEntities"
        DefaultContainerName="DuctorWebSiteEntities" EnableDelete="True" EnableFlattening="False" EntitySetName="Ouvidoria" OrderBy="it.OUV_DtdRegistro Desc" EntityTypeFilter="Ouvidoria">
    </asp:EntityDataSource>
</asp:Content>
I need some help, thanks.
Pavlina
Telerik team
 answered on 10 Mar 2015
6 answers
286 views
Hello,

If you begin typing in the editor without selecting anything from the toolbar, no "default" formatting is applied. If you switch between Design and HTML mode you see just the text you typed. No HTML is applied.

I've tried setting default toolbar font options using the OnClientLoad event but these selections are not applied upon typing.

Any suggestions would be appreciated.

Thanks

Blair
Blair
Top achievements
Rank 1
 answered on 10 Mar 2015
12 answers
249 views
I notice that radribbonbutton does not have a NavigationUrl Property to navigate to a specific aspx. Is there a property to navigate to aspx from the radribbonbutton. If not, How would I do it in code from the .cs file.


 protected void RadRibbonBar1_ButtonClick(object sender, Telerik.Web.UI.RibbonBarButtonClickEventArgs e)
    {
        switch (e.Button.Text)
        {
            case "Calender":
                break;

            default:
                break;
        }
Ivan Danchev
Telerik team
 answered on 10 Mar 2015
5 answers
125 views
I created my own  Template column. Everything works ok. But when I add a child hierarchy and expand any row, the values of that column in the father grid are lost.

Any suggestions on this?

I added part of my code to show the situation.

Code:

public class MyGridTemplateColumn : GridTemplateColumn
{
    public override void Initialize()
    {
        base.Initialize();

        HeaderStyle.Width = Unit.Pixel(105);
        HeaderText = "State";
        UniqueName = "StateCol";

        DataField = "StateId";
        DataType = typeof(byte);

        var _dataSource = new List<KeyValuePair<int, string>>
        {
            new KeyValuePair<int, string>(1, "Active"),
            new KeyValuePair<int, string>(2, "Deleted"),
            new KeyValuePair<int, string>(3, "Inactive"),
            new KeyValuePair<int, string>(6, "Other")
        };

        ItemTemplate = new MyItemTemplate(this.DataField, _dataSource);
        EditItemTemplate = new MyEditItemTemplate(this.DataField, _dataSource);
    }

    public override GridColumn Clone()
    {
        var res = new MyGridTemplateColumn();
        res.CopyBaseProperties(this);

        return res;
    }

    private class MyItemTemplate : ITemplate
    {
        private readonly string _dataField;
        private readonly List<KeyValuePair<int, string>> _dataSource = new List<KeyValuePair<int, string>>();

        public MyItemTemplate(string dataField, List<KeyValuePair<int, string>> origenDatos)
        {
            _dataField = dataField;
            _dataSource = origenDatos;
        }

        public void InstantiateIn(System.Web.UI.Control container)
        {
            var lControl = new LiteralControl { ID = _dataField + "_lControl" };
            lControl.DataBinding += lControl_DataBinding;
            container.Controls.Add(lControl);
        }

        private void lControl_DataBinding(object sender, EventArgs e)
        {
            var l = (LiteralControl)sender;
            var value = l.NamingContainer.GetFieldValue("DataItem." + _dataField);
            if (value != null)
                l.Text = _dataSource.FirstOrDefault(s=>s.Key == (int)value).Value;
        }
    }

    private class MyEditItemTemplate : IBindableTemplate
    {
        private readonly string _dataField;
        private readonly List<KeyValuePair<int, string>> _dataSource = new List<KeyValuePair<int, string>>();

        public MyEditItemTemplate(string dataField, List<KeyValuePair<int, string>> origenDatos)
        {
            _dataField = dataField;
            _dataSource = origenDatos;
        }

        public void InstantiateIn(System.Web.UI.Control container)
        {
            var rcBox = new RadComboBox
            {
                ID = _dataField + "_RadComboBox",
                DataTextField = "Value",
                DataValueField = "Key",
                DataSource = _dataSource
            };

            rcBox.DataBinding += rcBox_DataBinding;
            container.Controls.Add(rcBox);
        }

        public IOrderedDictionary ExtractValues(Control container)
        {
            var dictionary = new OrderedDictionary
            {
                {_dataField, (container.FindControl(_dataField + "_RadComboBox") as RadComboBox).SelectedValue}
            };
            return dictionary;
        }

        private void rcBox_DataBinding(object sender, EventArgs e)
        {
            var rcBox = (RadComboBox)sender;
            var value = rcBox.NamingContainer.GetFieldValue("DataItem." + _dataField);
            rcBox.SelectedValue = value != null ? value.ToString() : string.Empty;
        }
    }

Usage:

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="LinqDataSource1" AllowPaging="True" AutoGenerateColumns="False" Width="50%">
    <MasterTableView DataKeyNames="ENTUserAccountId" DataSourceID="LinqDataSource1" PageSize="5">
        <Columns>
            <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" UniqueName="UserName"/>
            <telerik:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="Email"/>
            <a:MyGridTemplateColumn />
        </Columns>
        <DetailTables>
            <telerik:GridTableView runat="server" DataSourceID="LinqDataSource2" DataKeyNames="ENTUserAccountId">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="ENTUserAccountId" MasterKeyField="ENTUserAccountId" />
                </ParentTableRelation>
                <Columns>
                    <telerik:GridTemplateColumn DataField="ENTRoleId" HeaderText="Rol" UniqueName="ENTRoleId">
                        <ItemTemplate>
                            <asp:Label ID="ENTRoleIdLabel" runat="server" Text='<%# Eval("ENTRole.RoleName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>                 
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
</telerik:RadGrid>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="TelerikWebApp1.DataClasses1DataContext"
    EntityTypeName="" TableName="ENTUserAccount"/>
        
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="TelerikWebApp1.DataClasses1DataContext"
    EntityTypeName="" TableName="ENTRoleUserAccount" Where="ENTUserAccountId == @ENTUserAccountId">
        <WhereParameters>
            <asp:SessionParameter Name="ENTUserAccountId" Type="Int32" />
        </WhereParameters>
</asp:LinqDataSource>  



Kostadin
Telerik team
 answered on 10 Mar 2015
4 answers
146 views
Hi

I'm using add_show from Radwindow but sinds installing version UI for ASP.NET AJAX Q1 2015, I get following error :

Object doesn't support property or method 'add_show'


This is the javascript function I use it in it:

function openChildDialog(url, wndName, title) {
    if (!url)
        url = "errorPage.aspx";
    if (!wndName)
        wndName = "popup_" + Math.random();
    var currentWnd = GetRadWindow();
     
    var browserWnd = window;
    if (currentWnd)
        browserWnd = currentWnd.BrowserWindow;
    setTimeout(function () {
        browserWnd.add_show(returnDataToParentPopup);
        var wnd = browserWnd.radopen(url, wndName);
        wnd.__parentBackReference = window; //pass the current window object of the page that opens the dialog so it can be used later
 
        if (title)
            wnd.set_title(title);
    }, 0);


Can someone please help me? It is urgent because no window is opening in my production environment!

Kind regards

Suzy
Suzy
Top achievements
Rank 2
 answered on 10 Mar 2015
1 answer
183 views
Hi, I've got a grid where neither the client nor server side events are firing on row drop, the target grid:
         <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"   
                             EnableViewState="False" GridLines="None" Width="475px" AutoGenerateDeleteColumn="True"
                             AllowAutomaticDeletes="True"
                            AllowMultiRowSelection="true"
                             OnDeleteCommand="RadGrid1_DeleteCommand" 
                            OnRowDrop="RadGrid1_RowDrop" 
                            OnItemCreated="RadGrid1_ItemCreated">
                 <ClientSettings EnableRowHoverStyle="True" AllowRowsDragDrop="True">
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                            <ClientEvents  OnRowDropping="onRowDropping"></ClientEvents>
                </ClientSettings>
david
Top achievements
Rank 1
 answered on 10 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?