Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
136 views
As i click on the Insert new Row,  the Grid goes into databinding and i just want to disable the databinding to the Edit Template during insert new row, how is it possible ?

Secondly how is it possible that during edit mode it is able to recognize a dataitem to which the textbox is binded to and during add new row command it displays the error  ‘Telerik.WebControls.GridInsertionObject does not contain a property’ ??

Maria Ilieva
Telerik team
 answered on 02 Aug 2012
3 answers
44 views
Hi,

I am just trying RadSpell for the first time.  So far, I am rather un-impressed by the suggestions that the spellchecker makes.

A basic example is 'teh'.  Everyone knows that this is a typo for 'the'.  Every spellchecker in the land will suggest 'the' as the best replacement.  With RadSpell, 'the' comes up at around TENTH in the list.  The top suggestion is 'tea'.

This is not going to cut it for our end-users.  Is there a way to improve the suggestion tool so that it is more like other spell-checkers?  Or can the tool at least learn from what words have been changed to by other users?

Thanks,

Craig
Craig Wallace
Top achievements
Rank 1
 answered on 02 Aug 2012
7 answers
477 views
I'm using the example provided in Filtering Template Columns to use a RadComboBox as a filter instead of the standard TextBox. I have followed the example and it is working as expected. Now I need to know how to pass a value to the RadComboBox so I can dynamically change its DataSource. The DataSource for the RadComboBox should change depending on the value of a column in the RadGrid. Can I somehow access the DataKeyNames of the parent RadGrid to get this value or is there a property of the GridTemplateColumn that I can set in my code-behind? I'm stumped.

protected override void SetupFilterControls(TableCell cell)
{
    RadComboBox rcBox = new RadComboBox();
    rcBox.ID = this.GetType().Name + "ComboBox";
    rcBox.AutoPostBack = true;
    rcBox.DataTextField = this.DataField;
    rcBox.DataValueField = this.DataField;
    rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
    rcBox.Items.Add(new RadComboBoxItem("Show All", ""));           
    rcBox.DataSource = DataSource; //<-------- I need to change this DataSource depending on what data is in my RadGrid.
                                    //How can I pass a value here from my aspx page
    rcBox.AppendDataBoundItems = true;
    cell.Controls.Add(rcBox);
}
Maria Ilieva
Telerik team
 answered on 02 Aug 2012
4 answers
289 views
Hello Friends
How Can i  dynamic add  item in context menu  and open Context Menu  on Grid row click by javascript .
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
4 answers
63 views
Hi,

I am using the RadComboBox version 2009.3.1503. I am observing the strange behavior of RadComboBox.

I have the RadComboBox in RadGrid EditItemTemplate whenever user selects the edit option on the grid row the combobox will be available to select values which will load the values on demand and it works well (I have the necessary LoadOnDemand etc., properties set and ItemsRequested event defined to feed the request). I have list of custom object values stored in page viewstate to use in page postbacks (used to bind the grid in NeedDataSource event).

The real problem occurs when user presses "Escape" key twice in the RadComboBox and clicks on Update link button on RadGrid the page postbacks and in the page viewstate our list of custom object values will be wiped out. The viewstate is returning null for this key.

This entire functionality works fine either user selects any value from the RadComboBox or don't select any value at all (custom validation works fine to identify if a value is selected, if not gives proper error message). I tried with and without setting EmptyMessage property for RadComboBox in either case it is same(pressing Escape key twice lead to wipe out the list of custom object values in the page viewstate). I came across a thread where it is discussed that pressing escape key on RadControls resets control values on the page (using form reset method) but this is wiping out the page viewstate itself. I am not sure which is causing this or is this a know issue with Telerik RadComboBox. Your help will be greatly appreciated.

Thanks,
Ravi
Dimitar Terziev
Telerik team
 answered on 02 Aug 2012
3 answers
148 views
Hi team, 
I am dynamically creating a radtooltip within the orgchart template . Everything works fine except if there are any controls inside radtooltip, it is cascading behind the radorgchart node. I have pasted the code below ..  

Issue No 2 : Also is there any way to move the template so that it will attach to the connecting line ?? .. I have attached the image for both the issues ..

C# Code:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Telerik.Web.UI;
 
namespace Telerik_Tests
{
    public partial class telerikRadOrgTest : System.Web.UI.Page
    {
 
        OrgChartNode objOrgNode;
        OrgChartGroupItem objOrgGroupItem;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            ChartBuilder();
        }
 
        protected DataTable Binddata()
        {
            DataTable dtTbl = new DataTable();
            dtTbl.Columns.Add("Name");
            dtTbl.Columns.Add("Id");
            dtTbl.Columns.Add("ParentId");
 
            DataRow _dr = dtTbl.NewRow();
            _dr["Name"] = "Test1";
            _dr["Id"] = "1";
            _dr["ParentId"] = DBNull.Value;
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test2";
            _dr["Id"] = "2";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test3";
            _dr["Id"] = "3";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            _dr = dtTbl.NewRow();
            _dr["Name"] = "Test4";
            _dr["Id"] = "4";
            _dr["ParentId"] = "1";
            dtTbl.Rows.Add(_dr);
 
            return dtTbl;
 
        }
 
 
        protected void ChartBuilder()
        {
 
            DataTable _tbl = Binddata();
 
            foreach (DataRow drObj in _tbl.Rows)
            {
                objOrgNode = new OrgChartNode();
                objOrgGroupItem = new OrgChartGroupItem() { Template = new SampleTemplate() };
                objOrgNode.GroupItems.Add(objOrgGroupItem);               
                RadOrgChart1.Nodes.Add(objOrgNode);
            }
 
 
        }
 
        class SampleTemplate : ITemplate
        {
            public void InstantiateIn(Control container)
            {
                HyperLink hypInitiative = new HyperLink();
                hypInitiative.ID = "Link";
                hypInitiative.Text = "Some Name";
                hypInitiative.NavigateUrl = "#"
 
                RadToolTip rdTooltip = new RadToolTip();
                rdTooltip.HideEvent = ToolTipHideEvent.ManualClose;
                rdTooltip.ShowEvent = ToolTipShowEvent.OnClick;
                rdTooltip.TargetControlID = "Link";
                //rdTooltip.Text = "Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. Some text .. ";             
                rdTooltip.Controls.Add(BindActionsToToolTip());             
                rdTooltip.Width = Unit.Pixel(600);
 
                Table _tbl = new Table();
                TableRow _tblRow = new TableRow();
                TableCell _tblCell = new TableCell();
 
                _tblCell.Controls.Add(hypInitiative);
                _tblCell.Controls.Add(rdTooltip);
                _tblRow.Cells.Add(_tblCell);
                _tbl.Rows.Add(_tblRow);
 
                container.Controls.Add(_tbl);
            }
 
            protected Table BindActionsToToolTip()
            {
                Table tooltipTbl = new Table();
                tooltipTbl.Style.Add("border", "1px solid black");
                TableRow tooltipTr;
                TableCell tooltipTd;
 
                tooltipTr = new TableRow();               
                tooltipTd = new TableCell();
                tooltipTd.Text = "Sample1";
                tooltipTr.Cells.Add(tooltipTd);
                tooltipTd = new TableCell();
                tooltipTd.Text = "Sample2";
                tooltipTr.Cells.Add(tooltipTd);
 
                tooltipTbl.Rows.Add(tooltipTr);
 
                return tooltipTbl;
            }
 
        }
 
    }
}


ASPX Code: 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="telerikRadOrgTest.aspx.cs"
    Inherits="Telerik_Tests.telerikRadOrgTest" %>
 
<%@ Register Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>  
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptManager1">
        </asp:ScriptManager>
        <div>
        </div>
        <div>
            <telerik:RadOrgChart runat="server" ID="RadOrgChart1" DataFieldParentID="ParentId" DataFieldID="Id" DataTextField="Name" EnableCollapsing="true"
                Skin="Office2010Blue">
            </telerik:RadOrgChart>
        </div>
    </div>
    </form>
</body>
</html>
Peter Filipov
Telerik team
 answered on 02 Aug 2012
4 answers
816 views
Hi,

I'm new to the Telerik controls so please forgive any obvious questions!

I have a RadGrid that I am printing - this all works fine but my client has asked for their logo to be added to the printout.  After some investigation I found a sample which had a Grid Header with an image displayed and this appeared in the printout.  Trouble is even working through the sample I can't get it to work on my grid.  

Essentially I need to colour the background of the header RED so that it blends in with the rest of the page the grid is on and have a right aligned image in the header.  Simple as that but I just can't get the header to show up.  Any pointers as to how to add a header to the grid?
Andrey
Telerik team
 answered on 02 Aug 2012
1 answer
832 views
Hi!

Im using Q2 2012, I'm trying to set the width of my RadDatePickers, i have tried everything, including:

http://www.telerik.com/community/forums/aspnet-ajax/input/raddatepicker-calendar-width.aspx

http://www.telerik.com/community/forums/aspnet-ajax/calendar/raddatepicker-width-does-not-change-in-ie8.aspx


<telerik:RadDatePicker ID="dpTillDate" Runat="server" Culture="en-En" EnableTyping="False" Skin="Hay" Width="30px" CssClass="width100" EnableEmbeddedSkins="False">
<Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"  DayCellToolTipFormat="dddd,yyyy. MMMM dd." FirstDayOfWeek="Monday" Skin="Hay" TitleFormat="yyyy MMMM" runat="server" ShowRowHeaders="False" EnableEmbeddedSkins="False"></Calendar>
<DateInput ID="DateInput1" DisplayDateFormat="yyyy.MM.dd." DateFormat="yyyy.MM.dd." DisplayText="Till::" LabelWidth="10%" ReadOnly="True" runat="server" Width="30px"  EnableEmbeddedSkins="False"></DateInput>
<DatePopupButton  ToolTip="Naptár megnyitása"></DatePopupButton></telerik:RadDatePicker>

help please
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
1 answer
79 views
Hi I'm struggling to get my update / insert working correctly and hoping someone might be able to help..
I need to update the grid datasource based on some buttons on the page being selected or not.

when I try to insert a new record the entered values in teh edit form disappear but the edit form remians open and no changes are written back to the database.. I've been trying to follow some of the demo examples but I cannot find one which suits what I'm trying to do exactly..





Jake
Top achievements
Rank 1
 answered on 02 Aug 2012
3 answers
100 views
Hello,

I am trying to get the value of the column in RadGrid. Below is my code. It is working Perfectly fine.

 var satype = tableView.getCellByColumnUniqueName(objRows[nCurrentIndex], "ExpirationDate")
  var annual = satype.innerText;

My Issue is, when the cell value is nothing, it is getting me the next cell Value even though Next column uniquename is different from Expiration date. I want to disable the textbox, if there is no value in the column.

How an I get this ?
Shinu
Top achievements
Rank 2
 answered on 02 Aug 2012
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?