Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
57 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
142 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
727 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
787 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
72 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
96 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
3 answers
102 views
I am trying to disable ratator but I found when I make it enable=flase than also I was able to click on it!
Is there is any other property?

Thanks,
Shakti
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
0 answers
52 views
Hi Sir:

I use the same code:   http://www.telerik.com/community/code-library/aspnet-ajax/grid/manual-insert-update-delete-using-formtemplate-and-sql-backend.aspx
I add a new column call "Company Description", all the coding are same as "company name",  It's works very good normally.
But When client side put "<"  char in the textbox, both update or cancel botton will got error:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500' when calling method: [nsIDOMEventListener::handleEvent]

Please help

Qiu
 
Michael
Top achievements
Rank 1
 asked on 02 Aug 2012
1 answer
72 views
How can we change image source in Readion Button Content Template at run time depending on specific condition?



<telerik:RadButton runat="server" ID="RadButton1" Width="90"
           Height="90" CssClass="tasks" Skin="Default">
           <ContentTemplate>
               <img alt="cog" src="Img/cog.png" />
               <span class="btnText">Tasks</span>
           </ContentTemplate>
       </telerik:RadButton>
Princy
Top achievements
Rank 2
 answered on 02 Aug 2012
3 answers
94 views
I have two types of users for the website, admin and non-admin. Both users can edit the data using the edit form, but only admin can edit the password textbox. I plan to make the text box visible only to the admin

During painting the edit form, the application should check whether the user is an admin (using a variable stored in Default.aspx.cs) and change the value for the Visible properties for the textbox accordingly.

<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Password") %>' Visible='<%# if (loggedInUser == admin) {true;} else {false;} %>' ></asp:TextBox>


Can anyone tell me how to do this. The code above wouldn't compile and I'm a newbie in web programming.

Thanks.
Iris
Top achievements
Rank 1
 answered on 02 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?