Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
154 views
I have a RadComboBox that has a single templated item that is a RadTreeView.

I'm looking for suggestions about how I might go about giving the RadTreeView keyboard focus when the RadCombobox's dropdown is opened.

Assume my markup is simpliar to this ...
<telerik:RadComboBox runat="server"
                     ID="RadComboBox1"
                     AutoPostBack="false"
                     AccessKey="V"
                     OnClientFocus="ComboFocus"
                     OnClientDropDownOpened="DropDownOpened">
    <ItemTemplate>
        <telerik:RadTreeView ID="RadTreeView1"
                             runat="server"
                             CausesValidation="false">
            <Nodes> 
                <telerik:RadTreeNode Text="Node 1" Value="1" /> 
                <telerik:RadTreeNode Text="Node 2" Value="2" Selected="true" /> 
                <telerik:RadTreeNode Text="Node 3" Value="3" /> 
            </Nodes> 
        </telerik:RadTreeView>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem/>
    </Items>
</telerik:RadComboBox>

Where the ComboFocus function simply opens the dropdown.

So, what I'm trying to establish is, is there anyway I can - programmatically - give my treeview control of the keyboard?

--
Stuart


Boyan Dimitrov
Telerik team
 answered on 28 Jan 2013
1 answer
78 views
When using a custom icon for the title icon in a notification it doesnt understand or expand ~ (tilde).
I found this problem in version 2012.3.1308.40.

.aspx/.ascx

    <telerik:RadNotification runat="server" ID="rNotify" ClientIDMode="Static" VisibleOnPageLoad="false"
        Animation="Slide" Position="TopCenter" Width="250px" Height="100px" AutoCloseDelay="5000"
        TitleIcon="~/images/etrack1_16x16.png" ContentIcon="">
    </telerik:RadNotification>

For now i have implemented a work around, by simply adding the following to the Page_PreRender method:

        protected void Page_PreRender(object sender, EventArgs e)
        {

            if (this.rNotify.TitleIcon.Contains("~"))
            {
                this.rNotify.TitleIcon = Page.ResolveClientUrl(this.rNotify.TitleIcon);
            }
        }
Marin Bratanov
Telerik team
 answered on 28 Jan 2013
1 answer
389 views
Hi,

We are using Telerik.Web.UI.dll version - 2009.3.1314.20 with visual studio 2008.
Currently our radgrid displays as below. No. of Factories are fixed and Factory names are known before the grid is configured as usual. Since we know the no. of factories and factory names (i.e. column names of the grid) well before we are using a simple DTO structure, a class with the following 5 properties and binding to the radgrid respectively - ItemName, Fac1, Fac2, Fac3, Fac4.

Item Name Factory 1   Factory 2   Factory 3   Factory 4
Item 1 12   13   14   15
Item 2 22   23   24   25
Item 3 32   33   34   35

But recently we have comeup with a new requirement that there will be a factory added on a regular basis, may be one factory per month / 2 months and we don't want to modify the code everytime when a factory is added. In this case, how can we modify the radgrid to meet this requirment ? Assuming that "Factory 5" is added next month and the output should be displayed as below. 

Item Name Factory 1   Factory 2   Factory 3   Factory 4 Factory 5
Item 1 12   13   14   15 16
Item 2 22   23   24   25 26
Item 3 32   33   34   35 36

So we don't know the no. of columns and column names during design time. I think single level DTO structure will not be sufficient. Can we use a two level DTO as below ? If yes, how can we bind a two level DTO to a grid ? How can we mention the "datafield" name while configuring a grid column using the two level DTO ?
Or can we add properties (factorynames) to a class dynamically in .NET 3.5 ?
Do we have any demo samples on this kind of behaviour ?
Any help on this is very much appreciated.

public class ItemFactoryDTO
    {
         
        [DataMember]
        public long ItemId
        { get; set; }
         
        [DataMember]
        public long ItemName
        { get; set; }
         
        [DataMember]
        public ICollection<FactoryQuantityDTO> factoryQuantityDTOs
        { get; set; }
        
    }
 
public class FactoryQuantityDTO
  {
    
    [DataMember]
    public string FactoryName { get; set; }
 
    [DataMember]
    public int? FactoryQuantity { get; set; }
 
  }


Antonio Stoilkov
Telerik team
 answered on 28 Jan 2013
2 answers
86 views
Hi Team,

Thank you for the amazing code snippets on client side binding, was able to implement it quickly. But I'm facing an issue on adding a new row to the grid. On creating a new row, client binding code is called to fetch all the rows and bind it again to the
grid.

ServiceNamespace.Service1.GetData(param1, param2, updateGrid);

//callback

 function updateGrid(result) {

  var tableView = $find("<%= Grid1.ClientID %>").get_masterTableView();    

  tableView.set_dataSource(result);

  tableView.dataBind();  




 

 


Bindu
Top achievements
Rank 1
 answered on 28 Jan 2013
7 answers
211 views
The 'Columns' property on all my RadInputBox's are no longer working. I have just upgraded to the latest version. I have a huge application and cannot override per page. All the text boxes on the page are now the same size. What do I need to do in order to have the 'columns' property working again.

Thanks,
Susan
Princy
Top achievements
Rank 2
 answered on 28 Jan 2013
1 answer
708 views
Hi, everybody!
I have a problem. When I click cell in radgrid,I want to call a function in codebehind and set value to this function. When selected row, I had cell value, but I can't call fuction in code behind.
Have you any ideas?
Thanks!
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BCKD9.ascx.cs" Inherits="BCKD_Web.Control.BCKD9" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
          var maNV = null;
          function rowSelected(sender, args) {           
            var MasterTableView = sender.get_masterTableView();
            var row = MasterTableView.get_selectedItems()[0];          
            maNV = MasterTableView.getCellByColumnUniqueName(row, "MA_DV");            
            var strMA_CTO = maNV.innerHTML;           
            alert(strMA_CTO);                    
        }           
        
    </script>
</telerik:RadCodeBlock>
<div style="width: 100%; height: 100%">
    <table style="width: 100%; height: 100%">
        <tr style="width: 100%; height: 100%">
            <td style="width:100%; height: 100%">
                <telerik:RadGrid ID="rgdBieu8" runat="server" GridLines="None"
                    AutoGenerateColumns="False" ShowFooter="true"
                    AllowMultiRowSelection="True" Skin="Windows7"
                    onitemevent="rgdBieu8_ItemEvent">
                    <MasterTableView ClientDataKeyNames="MA_DV" Width="100%">
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="Mã đơn vị" DataField="MA_DV" UniqueName="MA_DV"
                                HeaderStyle-Width="10%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText="Tên đơn vị" DataField="TEN_DV" UniqueName="TEN_DV" FooterText="Tổng"
                                HeaderStyle-Width="20%">
                                <HeaderStyle Width="20%" HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" Font-Underline="true"/>
                                <FooterStyle HorizontalAlign="Left" Font-Bold="true"/>
                            </telerik:GridBoundColumn>                                          
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="true" EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="true" />
                        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                        <ClientEvents OnRowSelected="rowSelected" />
                    </ClientSettings>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>
</div>
Shinu
Top achievements
Rank 2
 answered on 28 Jan 2013
1 answer
110 views
Hi is there a technique to overstrike the contents of cell when exporting to excel using excelml format? 

I see it's fairly simply to set the text to bold or underline but have not found/figured out a way to set overstrike.

Any help would be appreciated.

Thanks,
Dan
Princy
Top achievements
Rank 2
 answered on 28 Jan 2013
1 answer
107 views
Hi
i use the raddateimout obeject in page aspx.
this is my code:
<telerik:RadDateInput ID="Datanascita" Runat="server" DateFormat="dd/MM/yyyy"
DisplayDateFormat="dd/MM/yyyy" EmptyMessage="Data nascita (es. 01/01/2000)" Skin="" Width="200"
Font-Italic="True" Font-Names="Verdana" Height="22px">
<EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
<HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
</telerik:RadDateInput>

but i've two problems.

1) when i write into raddateinput for example 01122012 or 01/12/2012 and i press button tab keyboard, the radcontrol change the dimension and dont format date
2) when I save the data in the database, the value wtrire into radcontrol dont see, i see only emptymessage.

why?
Angel Petrov
Telerik team
 answered on 28 Jan 2013
3 answers
137 views
Hi,
i use the radautocompletebox with a raddecorator because i would that the radautocompletebox has round edges. But if if I on property "skin" take off the default value, nothing happens, why?
Kate
Telerik team
 answered on 28 Jan 2013
1 answer
510 views
Hi,
Could please anyone tell me how I can change a column format in Export to CSV. In my grid I have some columns where I am displaying date as text. On Export to Excel it shows the date (as text) exactly as it is in the grid (23 jan 2013) but when I do the Export to CSV it changes the text type date to a different formt (23-jan-13). Could please anyone tell me how I can change the Export to CSV format so than I can display my date text same as Export to Excel format which is 23 jan 2013.
Regards,  
Kostadin
Telerik team
 answered on 28 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?