Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
26 views
I noticed not to my surprise that adobe bc uses rad editor i quite like the theme they have also does anyone have tools file.xml similar to the one that they have used.

Many Thanks
Rumen
Telerik team
 answered on 09 Dec 2011
2 answers
189 views

I know that this is not the exact wording of the pop-ups and drop-downs.
I get a drop-down from Telerik in visual studio stating that there is a new update; I select ok.  Even if I go and update the project from the menu bar, I get the error when I run up the page. Sometimes I will see the issue right when looking at the page in design mode.

The way I have been fixing the issue,  delete  the reference and reassociate the Telerik reference.  I believe that then the project is not using he newest Telerik controls.

 I have no custom skins or controls.

Error:

Telerik.Web.UI.RadTabStrip with ID='RadTabStrip1' was unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

Sean
Top achievements
Rank 1
 answered on 09 Dec 2011
1 answer
95 views
I know this is a very simple question...but I'd like to use the RadNotification to display a notification to the user even if the web browser is minimized.  The idea would be that the user can have the web application minimized but a RadNotification would alert the user if there has been any change in the content since the last time the page was automatically refreshed. 

Will the RadNotification display if the browser is minimized or does it only work within the web page itself?

Thanks,
George
Marin Bratanov
Telerik team
 answered on 09 Dec 2011
3 answers
257 views
Hello

We've build a custom web control (not a user control) which adds a RadToolTip dynamically.
The tooltip is created and added to the Controls-collection of the webcontrol in the OnLoad-event.
The text of the tooltip is set in the RenderContents-event of the webcontrol.

This control is used in rows of a RadGrid and it works fine when the page is requested but after a postback the tooltip still appears but the text is empty.

The difference seems to be that on a page request the telerik tooltip somehow adds statements like :

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadToolTip, {"_cssClass":"","_manualCloseButtonText":"Close","clientStateFieldID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00_ClientState","formID":"aspnetForm","relativeTo":1,"skin":"USGFOEXTelerik","targetControlID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageImage","text":"Dit is een bericht verkregen uit hercules:\u003cbr /\u003ede status is ToValidate"}, null, null, $get("ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00"));
});

When a postback is done these statements are missing.

Why are these statements missing after a postback? 



Marin Bratanov
Telerik team
 answered on 09 Dec 2011
1 answer
169 views
I have an asp.net app using some Telerik controls - such as the RadTabStrip.
I got a notice for an auto-update to the controls when booting up the project this morning, and let it do its thing.  Now I get an error that the embedded "Forest" skin cannot be found in my RadTabStrip.  What am I missing here?
Telerik.Web.UI.RadTabStrip with ID='rtsMain' was unable to find embedded skin with name 'Forest'.
Kate
Telerik team
 answered on 09 Dec 2011
3 answers
204 views
Hi All,

I would be working in a web application project wherein am going to make extensive usage of chart control provided by RadGrid.
I happened to look through most of the demonstrations provided by Telerik for the ASP.Net Ajax Chart control.

I would like to know whether the chart control supports moving (or) dragging of points in a line chart which would trigger a change in the position of the vertices.

The dragging event could either be a server side or a client side event. However, only specific points should be draggable depending upon some set of criterias.

Also, the datasource for the line chart is expected to be dynamic. Is it possible to achieve such a functionality using the chart control? Any insights?
Evgenia
Telerik team
 answered on 09 Dec 2011
3 answers
167 views
Hello,
        I wanted to know whether in the grid are you able to make the entire column editable? My requirement is that on page load I need to show few columns of the grid as editable. The editable columns contain either a combobox, a date type textbox or the simple textbox.
Rest of the columns should not be editable.

Also I have another question, how to get the cell index when I click on a particular cell of the grid. Or if I enter some data into the cell, is it possible to get the cell id for that particular cell from client side?

Thank You
Amruta Deshpande
Iana Tsolova
Telerik team
 answered on 09 Dec 2011
3 answers
109 views
Is there any way to have a grouping functionality on the TreeList Control?
Do you plan to add grouping in next release?
Or how can i go around it?
Sebastian
Telerik team
 answered on 09 Dec 2011
6 answers
252 views
Hi

I have found an issue where I cannot get  ClientEvents-OnResponseEnd="onResponseEnd" ClientEvents-OnRequestStart="onResponseStart" events to fire in javascript when I do a manual postback - however the server side event code does run in ajax mode.

for instance I have an asp button in a page with a server event wrapped in an ajax panel with the 2 javascript events wired up.

If I use the mouse to click the button then it works fine - both the onResponseStart and onResponseEnd javascript functions work.

However in the folloiwng situation I want to click the button in code and not with the mouse. In this case I have wired an event for the <CR> key being clicked in a radtextbox to fire the mouse click event of the button as follows

ASCX FILE Rad Text Box that allows <CR> to be pressed and then runs the __dopostback code for a button click
             <telerik:RadTextBox ID="bxPNCID" runat="server" SelectionOnFocus="SelectAll" Skin="Vista"
              Width="200px" onkeydown="return OverridePostBackOnEnter(event, 'ImageButton6')">
             </telerik:RadTextBox>

ASCX IMAGEBUTTON 6 - The button Click I want to emulate - I needed ClientIDMode="Static" because document.getelementbyid function needs the rendered ID rather than the aspx ID
          <asp:ImageButton ID="ImageButton6" ClientIDMode="Static" runat="server" Style="float: right;
           margin-top: -44px" ImageUrl="images/butt_searchcustrecoff.png" AlternateText="Search Custody Records"
           ToolTip="Search Record" OnClick="SearchRecords_Click" />

JAVASCRIPT FUNCTION TO HANDLE THE KEYPRESS AND CONVERT TO MOUSE CLICK
        //attach OverridePostBackOnEnter to keypress of textbox
        //onkeypress="OverridePostBackOnEnter(event, 'Id of click button')" -- Firefox
        //onkeydown="OverridePostBackOnEnter(event, 'Id of click button')" -- IE
        //Remember set 'ClientIdMode' of controlling button to 'STATIC'
        function OverridePostBackOnEnter(event, ctrl)
        {
            if (event.keyCode == 13)
            {
                if ($.browser.mozilla)
                {
                    var overridectrl = document.getElementById(ctrl);
                    __doPostBack(overridectrl.name, '');
                }
                else
                { //for IE
                    //but for other browsers you should use
                    var overridectrl = document.getElementById(ctrl);
                    __doPostBack(overridectrl.name, ''); // everything I have researched says it should be uniqueID for IE but does not seem to fire the server event
                }
            }
        };

to summarise the code above then
the radtextbox has the onkeydown event fire
the JS Routine OverridePostBackOnEnter(event, ctrl) runs  and checks for the key being <CR>
The JS Routine then does the __doPostBack event.
(AjaxPanel Runs The OnResponseStart Function - DOES NOT HAPPEN)
The Server Code runs the mouse click event.
(AjaxPanel Runs The OnResponseEnd Function - DOES NOT HAPPEN)

The ajax control did not fire the onResponseStart and onResponseEnd javascript routines which do run if I click button6 using the mouse.

Any help greatly appreciated guys.

regrads Mick.
Mick
Top achievements
Rank 1
 answered on 09 Dec 2011
6 answers
255 views
Hi,

if have create a class inherits from GridBoundColumn and tryed to add custom controls (2 datetime picker and one reset button).
But I down't know whats wrong, because the filtering does not work.

Can someone explain how to do this right?

Here is the code:
public class DateTimeColumn : GridBoundColumn
    {
        #region Fields
         
        SPField _field;
        const string _TRACECONST = "ECSpand.SharePoint.UI.WebUserControls.RecordsOrganizer.FileContent.Columns.DateTimeColumn";
        SPDateTimeFieldFormatType _formatType = SPDateTimeFieldFormatType.DateTime;
        private RadDatePicker _datePickerFrom;
        private RadDatePicker _datePickerTo;
         
 
        #endregion
 
        #region Constructor ()
 
        public DateTimeColumn()
        {
 
        }
 
        #endregion
 
        #region Constructor (field)
 
        public DateTimeColumn(SPField field)
        {
            this.AllowSorting = true;
            this.DataField = field.Id.ToString();
            this.HeaderText = field.Title;
            this.HeaderTooltip = "";
            _field = field;
            this.SortExpression = field.Id.ToString();
            SPFieldDateTime dtField = field as SPFieldDateTime;
            if (dtField != null)
            {
                _formatType = dtField.DisplayFormat;
            }
        }
 
        #endregion
 
        #region Methods
         
        #region FormatDataValue (dataValue, item)
 
        protected override string FormatDataValue(object dataValue, GridItem item)
        {
            if (_field == null)
                return dataValue.ToString();
 
            string s = dataValue as string;
            if (!string.IsNullOrEmpty(s))
            {
                try
                {
                    SPWeb web = SPContext.Current.Web;
                    SPRegionalSettings settings = web.RegionalSettings;
                    if (web.CurrentUser.RegionalSettings != null)
                    {
                        settings = web.CurrentUser.RegionalSettings;
                    }
 
                    DateTime time;
                    if (s.Contains('T') || s.Contains('Z'))
                    {
                        time = DateTime.Parse(s, CultureInfo.InvariantCulture);
                    }
                    else
                    {
                        time = DateTime.ParseExact(s, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
                    }
                    if (_formatType == SPDateTimeFieldFormatType.DateOnly)
                    {
                        return time.ToShortDateString();
                    }
                    else
                    {
                        return Microsoft.SharePoint.Utilities.SPUtility.FormatDate(SPContext.Current.Web, time.ToUniversalTime(), Microsoft.SharePoint.Utilities.SPDateFormat.DateTime);
                    }                   
                }
                catch (Exception ex)
                {
                    Log.WriteWarning("DateTime-Field '" + _field.InternalName + "' could not be parsed. Value was + '" + dataValue as string + "'. Exception was : " + ex.ToString(), _TRACECONST);
                    return dataValue as string;
                }
            }         
            return "-";
        }
 
        #endregion
 
        #region  SetupFilterControls (cell)
 
        /// <summary>
        /// RadGrid will call this method when it initializes the controls inside the filtering item cells
        /// </summary>
        /// <param name="cell">The TableCell</param>
        protected override void SetupFilterControls(System.Web.UI.WebControls.TableCell cell)
        {
            base.SetupFilterControls(cell);
            if (cell.Controls.Count > 0)
                cell.Controls.RemoveAt(0);
 
            //cell.Style.Add(HtmlTextWriterStyle.WhiteSpace, "nowrap");
 
            _datePickerFrom = new RadDatePicker();
            //_datePickerFrom.ID = "ColumnFilterDateFrom" + Guid.NewGuid().ToString();
            _datePickerFrom.AutoPostBack = true;
            _datePickerFrom.Skin = "Office2007";
            _datePickerFrom.SelectedDateChanged += new Telerik.Web.UI.Calendar.SelectedDateChangedEventHandler(_datePicker_SelectedDateChanged);
            _datePickerFrom.ShowPopupOnFocus = true;
            _datePickerFrom.Width = Unit.Pixel(100);
            _datePickerFrom.EnableScreenBoundaryDetection = false;
            _datePickerFrom.DatePopupButton.ToolTip = string.Empty;
            _datePickerFrom.Style.Add(HtmlTextWriterStyle.MarginRight, "5px");
            _datePickerFrom.EnableTyping = false;
 
            _datePickerTo = new RadDatePicker();
            _datePickerTo.ID = "ColumnFilterDateFrom" + Guid.NewGuid().ToString();
            _datePickerTo.AutoPostBack = true;
            _datePickerTo.Skin = "Office2007";
            _datePickerTo.SelectedDateChanged += new Telerik.Web.UI.Calendar.SelectedDateChangedEventHandler(_datePicker_SelectedDateChanged);
            _datePickerTo.ShowPopupOnFocus = true;
            _datePickerTo.Width = Unit.Pixel(100);
            _datePickerTo.EnableScreenBoundaryDetection = false;
            _datePickerTo.DatePopupButton.ToolTip = string.Empty;
            _datePickerTo.Style.Add(HtmlTextWriterStyle.MarginRight, "5px");
            _datePickerTo.EnableTyping = false;
 
            ImageButton resetfilterbutton = new ImageButton();
            if (!string.IsNullOrEmpty(this.CurrentFilterValue) && this.CurrentFilterFunction != GridKnownFunction.NoFilter)
                resetfilterbutton.ImageUrl = "/_layouts/images/ecspand/filter_remove_green.png";
            else
                resetfilterbutton.Visible = false;
            resetfilterbutton.Width = Unit.Pixel(16);
            resetfilterbutton.Height = Unit.Pixel(16);
            resetfilterbutton.Click += new ImageClickEventHandler(resetfilterbutton_Click);
 
            cell.Controls.AddAt(0, _datePickerFrom);
            cell.Controls.AddAt(1, _datePickerTo);
            cell.Controls.AddAt(2, resetfilterbutton);
            if (cell.Controls.Count > 3)
                cell.Controls.RemoveAt(3);
        }
 
        #endregion
 
        #region _datePicker_SelectedDateChanged (sender, e)
 
        private void _datePicker_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
        {
            GridFilteringItem filterItem = (GridFilteringItem)((RadDatePicker)sender).NamingContainer;
            try
            {
                if (_datePickerFrom.SelectedDate != null && _datePickerTo.SelectedDate == null)
                    _datePickerTo.SelectedDate = _datePickerFrom.SelectedDate.Value.AddHours(12);
                 
                if (_datePickerFrom.SelectedDate != null && _datePickerTo.SelectedDate != null)
                {
                    filterItem.FireCommandEvent("Filter", new Pair(GridKnownFunction.Between.ToString(), this.UniqueName));
                }
                else
                    filterItem.FireCommandEvent("Filter", new Pair("NoFilter", this.UniqueName));
            }
            catch
            {
            }
        }
 
        #endregion
 
        #region resetfilterbutton_Click (sender, e)
 
        /// <summary>
        /// Handles the Click event of the resetbutton to reset the current column filter.
        /// </summary>
        /// <param name="sender">The sender</param>
        /// <param name="e">The ImageClickEventArgs</param>
        private void resetfilterbutton_Click(object sender, ImageClickEventArgs e)
        {
            if (_datePickerFrom != null)
            {
                this.CurrentFilterValue = string.Empty;
                this.CurrentFilterFunction = GridKnownFunction.NoFilter;
                GridFilteringItem filterItem = (GridFilteringItem)((RadDatePicker)_datePickerFrom).NamingContainer;
                filterItem.FireCommandEvent("Filter", new Pair("NoFilter", this.UniqueName));
            }
        }
 
        #endregion
 
        #region  GetCurrentFilterValueFromControl (cell)
 
        /// <summary>
        /// RadGrid will call this method when the filtering value should be extracted from the filtering input control(s)
        /// </summary>
        /// <param name="cell">The TableCell</param>
        /// <returns>The current filter value</returns>
        protected override string GetCurrentFilterValueFromControl(TableCell cell)
        {
            if (_datePickerFrom.SelectedDate != null)
            {
                string data = string.Format("{0} {1}",  _datePickerFrom.SelectedDate.Value, _datePickerTo.SelectedDate.Value);
 
                return data;
            }
            else
                return string.Empty;
        }
 
        #endregion
 
        #region SetCurrentFilterValueToControl (cell)
 
        /// <summary>
        /// RadGrid will call this method when the value should be set to the filtering input control(s)
        /// </summary>
        /// <param name="cell">The TableCell</param>
        protected override void SetCurrentFilterValueToControl(TableCell cell)
        {
            if (_datePickerFrom != null)
            {
                base.SetCurrentFilterValueToControl(cell);
                if (!string.IsNullOrEmpty(this.CurrentFilterValue))
                {
                    _datePickerFrom.SelectedDate = this.GetDateTimeValueFormCurrentFilterValue(this.CurrentFilterValue);
                }
            }
        }
 
        #endregion
 
        #region GetDateTimeValueFormCurrentFilterValue (value)
 
        private DateTime? GetDateTimeValueFormCurrentFilterValue(string value)
        {
            DateTime? retval = null;
 
            if (!string.IsNullOrEmpty(value))
            {
                DateTime tmp = DateTime.MinValue;
                if (DateTime.TryParse(value, out tmp))
                    retval = Convert.ToDateTime(tmp);
            }
 
            return retval;
        }
 
        #endregion
 
        #endregion
    }

Best regards,
Ralf



Iana Tsolova
Telerik team
 answered on 09 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?