Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
102 views

Hi!
  I am using batchEditUpdate and try to write functions for Save button.  I have tried methods in the forum(http://www.telerik.com/forums/save-grid#RzXVB6XB_Uqod1m2h7Lwyw), but the OldValues for both methods only contains one element, the DataKeyNames.  Why are there no column values of the grid in the OldValues?  I need to compare some fields of OldValues and NewValues.  Any suggestions?

Thanks in advance!
Sharon

sharon
Top achievements
Rank 1
 answered on 25 Jan 2016
1 answer
250 views

Hello,

I am on 2015 Q3 of the ASP .NET controls and weirdly cannot find the RadCheckBox control. It is not visible in the Toolbox and when I add it manually to the ASCX file I get error 'Element 'RadCheckBox' is not a known element' in my ascx control. Other Telerik controls work fine.

Thank you for any help.

<%@ Register assembly="Telerik.Web.UI, Version=2015.3.1111.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<telerik:RadCheckBox ID="RadCheckBox1" runat="server" Text="I agree to the Terms of Service"></telerik:RadCheckBox>

Marin Bratanov
Telerik team
 answered on 25 Jan 2016
1 answer
73 views
How can we avoid spell check popup and implement spelling Check functionality in the textbox itself.
Marin Bratanov
Telerik team
 answered on 25 Jan 2016
2 answers
390 views

I have a RadGrid server control completely developed from code-behind. The columns of the grid are bound through a config xml file. and need zero declarative syntax. I have 3 columns in the grid - 2 are GridBoundColumn and 1 is a template column. The grid is bound to a List<>. The template column can be anything - asp-label or hyperlink etc. I want to access the data-value for this column in the template binding event by using the column's UniqueName. I am stuck as I am not getting the value in that column in the data-binding event. Please refer code below. Any help is appreciated.

public class PcsGrid : Telerik.Web.UI.RadGrid
{
    public PcsGrid()
    {
        this.AutoGenerateColumns = false;
        GridViewConfiguration gvc = SelectViewConfiguration();
         
        // this method generates all the columns at runtime        
        BuildColumns(gvc.View.Columns);
    }
     
    // HyperlinkColumn() is 1 such column created at runtime. this is invoked inside BuildColumns.
    private Telerik.Web.UI.GridTemplateColumn HyperlinkColumn(GridViewConfigurationViewColumn col)
    {
        GridTemplateColumn gtc = new GridTemplateColumn();
        gtc.UniqueName = col.UniqueName;
        gtc.HeaderText = col.HeaderText;
        gtc.DataType = Type.GetType("System.String");
        gtc.DataField = col.DataField;
        gtc.ItemTemplate = new TemplateColumns.ActionColumn(col.UniqueName);
        return gtc;
    }
     
    // a template column class
    class ActionColumn : ITemplate
    {
        Label lc = null;
        string c_sUniqueName = null;
         
        //i am passing the unique-column name
        public ActionColumn(string p_sUniqueName)
        {
            this.c_sUniqueName = p_sUniqueName;
        }
 
        public void InstantiateIn(System.Web.UI.Control container)
        {
            lc = new Label();
            lc.ID = "lCity";
            lc.DataBinding += lc_DataBinding;
            container.Controls.Add(lc);
        }
 
        void lc_DataBinding(object sender, EventArgs e)
        {
            Label oSender = (Label)sender;
            GridDataItem container = (GridDataItem)oSender.NamingContainer;
            // if I debug here I see the data in the container. I dont want to cast it to the model object because this is a common server control not specific to a functionality
            TableCell tc = container[c_sUniqueName]; // unique name. none of the properties I tried return the data-value.
            Label l = (Label)tc.Controls[0];
            //this is blank and returns nothing.
             
        }
    }      
}

 

I also referred to article - http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows

But no luck.

Please help.

Amod
Top achievements
Rank 1
 answered on 23 Jan 2016
2 answers
168 views

I'd like to add a popup dialog that overlays the master table edit popup. Is this possible?

 Scenario: I have  a generic error handling routing called by the OnItemUpdated and OnItemInserted events. If there's an exception I'm displaying the error in an jscript alert box and then leaving the rad grid edit popup in edit or insert mode. This work OK, but if multiple alerts are thrown in a session Chrome will ask the user if they'd like to prevent future popups. If the users opts for this,they might not get error feedback on subsequent errors.

I tried adding a simple jquery dialogue, but it is superseded by the RadGrid popup form.

 Any suggestions appreciated!

Thanks!

G716
Top achievements
Rank 1
 answered on 22 Jan 2016
4 answers
221 views

Is there a way to select a node by default in a Treelist ? eg :if a node has "selected" set to true in the datasource, kendo will automatically select the node.

If not, How can I select a node programmatically in a Treelist ?

I've searched on the internet , all the results that I've found are about TreeView.

I've tried the same method as in treeView, but there is not a method named "findByUid"

 

 "onSelect": function (e) {

        var selectedRows = this.select();
        var selectedDataItems = [];
        for (var i = 0; i < selectedRows.length; i++) {
            var dataItem = this.dataItem(selectedRows[i]);

            if (!dataItem.selectable)
            {
                //hack 
                //For now, a treelist doesn't allow you to prevent the selection 
                //as it is done in a treeview (e.preventdefault).So in order
                // to prevent the selection we must do a little hack using css.
                selectedRows.removeClass("k-state-selected");
            
            }

            //test
            e.sender.select(e.sender.findByUid(2));

    treeview.select(selectitem);
        }    

Gers
Top achievements
Rank 1
 answered on 22 Jan 2016
1 answer
102 views

javascript to set height does not appear to be recognized from a dynamically built step in the radwizard

I am using this in the aspx body (taken from telerik forum)

 

        <script type="text/javascript">
            function setHeight(sender, args) {
                window.setTimeout(function () {
                    sender._textBoxElement.style.height = "";
                    window.setTimeout(function () {
                        sender._textBoxElement.style.height = sender._textBoxElement.scrollHeight + "px";
                        sender._originalTextBoxCssText += "height: " + sender._textBoxElement.style.height + ";";
                    }, 1);
                }, 1);
            }
        </script>

 

and using the following to build the step in the wizard

                    case 7:
                        e.RadWizardStep.Controls.Add(new LiteralControl("<div class='row inputwrapper'><div class='col-md-12 text-center'>"));
                        var questionsourceScript = db.QuestionSources.Where(q => q.QuestionId == question.QuestionId).Where(q => q.MarkDelete == false).OrderBy(q => q.DisplayOrder).First();
                        //var controlIdScript = string.Format("SID{0}QID{1}QSID{2}", question.SurveyID, questionsourceScript.QuestionId, questionsourceScript.QuestionSourceId);
                        RadTextBox scriptbox = new RadTextBox();
                        scriptbox.Skin = "MetroTouch";
                        scriptbox.Text = questionsourceScript.Value;
                        scriptbox.AutoPostBack = false;
                        scriptbox.ID = string.Format("RBLSID{0}", Guid.NewGuid().ToString());
                        //scriptbox.InputType = Html5InputType.Text;
                        scriptbox.TextMode = InputMode.MultiLine;
                        scriptbox.Width = Unit.Percentage(100);
                        scriptbox.ReadOnly = true;
                        //scriptbox.Rows =  12;
                        scriptbox.ClientEvents.OnLoad = "setHeight";
                        scriptbox.ClientEvents.OnValueChanged = "setHeight";
                        e.RadWizardStep.Controls.Add(scriptbox);
                        e.RadWizardStep.Controls.Add(new LiteralControl("</div></div>"));
                        break;

 

when displaying the step in the wizard, the textbox displays like there are 0 lines and there should be 13 

 

Any suggestions?

Ivan Danchev
Telerik team
 answered on 22 Jan 2016
1 answer
206 views

I have a page where I use the RadTileList control. Since the height of the RadTileList is bigger than that of the screen, the user must scroll the page vertically to be able to see the whole content of the RadTileList. The problem is that scrolling vertically does not work when the mouse is over the RadTileList area. I tried to set the "ScrollingMode" of the RadTileList  but that does not help.

I have already tried the suggestions from this post: http://www.telerik.com/forums/radtilelist-vertical-scroll-issue

Does anyone have a solution to this problem?

Marin Bratanov
Telerik team
 answered on 22 Jan 2016
3 answers
61 views

I have chart with 3 or 4 LineSeries of the last years. In codebehind I set the visibility of the oldest serie to false, so that the chart is not to overcrowded.

The color of this LineSerie turns into a very light grey. Is it possible to change this "disable" color?

 

Anders Pedersen

Vessy
Telerik team
 answered on 22 Jan 2016
1 answer
79 views

Could you help me? 

 when    I selected file name "MíaColliciá.pdf" on AsyncUpload  show on the debug "M�aCollici�-72.pdf" and the web "M?aCollici?a"

 I use the follow code 

 rdAsyUpConvocatoria.Culture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-MX");

 protected override void InitializeCulture()         {             Page.Culture = "es-MX";         }

  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

 

Thanks

Hristo Valyavicharski
Telerik team
 answered on 22 Jan 2016
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
Andrey
Top achievements
Rank 1
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
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?