Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
268 views
Hello,  I am new to your fourm as well as fairly new to using the Suite of Tools.  My situation is that I currently have RadGrid which is set to batch edit mode and has two drop downs.  The first drop down has a list of items that is populated by an objectdatasource and the second list will be populated based on the selection of the first drop down and the selectedvalue will then be passed into the object datasource of the second drop down.  I have worked at tackling this from multiple approaches...having an autopostback on the first drop down and once that fires then well do a javascript function where it will take the value of the selected item and pass it to a hidden value and I can access the hidden value ino the GridsPreRender and find the two controls and populate the second drop down.  This sort of works as the second drop down is being populated correctly but every time I have to make a selection I have to click the griditem once and it will highlight and do nothing and then if I click it again it will allow me to make my selection.  The other problem is that after I make a selection on my first drop down and the postback occurs it automatically reverts back to the original selection....the user is doing this when they are trying to edit a current list of dropdowns.  I haven't worked out or seen how it will behave if I try to add a new row.  Any thoughts?

Thanks for any and all help in advance,

Ramey
Viktor Tachev
Telerik team
 answered on 26 Feb 2016
2 answers
48 views

Hi,

As per the file, I want to show calculated 4_Average_Assigned % based on two column value i.e- 1_Demand / 2_Assigned.Please help me to implement this.

 

Thanks,

Sagar

 

 

 

Sagar
Top achievements
Rank 1
 answered on 26 Feb 2016
3 answers
97 views

I need to prevent some users from modifying some recurring events but allow them to edit others based on role permissions. I've built a function that gets called on  "Edit" event but the problem is "Edit" event gets called when editing and also adding an event. I need to allow adding events but prevent editing/modifying existing recurring events. Currently scheduler_edit function prevents both editing and adding events.

Here is my stripped down scheduler_edit function:

function scheduler_edit(e) {
    if (!e.event.CanBeEdited) {
        e.preventDefault();
    }
}


 

Plamen
Telerik team
 answered on 26 Feb 2016
6 answers
178 views
Greetings,

I'm doing heavy client side work with Rad controls, specially the grid. I became tired from copying and pasting functions names from the console and hoped that Visual Studio intellisense would help me.
I tried adding the Telerik.Web.UI.Common.Core.js file downloaded from the CDN to my Visual Studio references but intellisense broke.

Does Telerik have a vsdoc (or any other format) definitions file for the library that can be referenced from VS to ease client side development?
أشرف
Top achievements
Rank 1
 answered on 25 Feb 2016
1 answer
154 views
Hi,
I have a radtabstrip that contains 3 rad tabs.  I have some code that assigns a value to each of these tabs.
I need a way which the value of each tab can be reviewed and then set the selected value to which ever one has the highest value.

Any suggestions appreciated.
Eyup
Telerik team
 answered on 25 Feb 2016
2 answers
127 views

Hi,

RadGrid throws an 'Index was outside the bounds of the array' error when using ColumnGroups and having datasource=nothing.

Version 2016.1.113.45

Example throwing error (dont bind grid to datasource):

<telerik:RadGrid  runat="server" ID="rg">
    <MasterTableView>
        <ColumnGroups>
            <telerik:GridColumnGroup HeaderText="Invoice" Name="Invoice"></telerik:GridColumnGroup>
        </ColumnGroups>
        <Columns>
        <telerik:GridBoundColumn ColumnGroupName="Invoice" HeaderText="Test" DataField="Test"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

Working:

<telerik:RadGrid  runat="server" ID="rg">
    <MasterTableView>
        <ColumnGroups>
        </ColumnGroups>
        <Columns>
        <telerik:GridBoundColumn  HeaderText="Test" DataField="Test"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

Eyup
Telerik team
 answered on 25 Feb 2016
1 answer
72 views

Hi All,

how can i control the background color for each TileList from XML File...

Something like DataTitleTextField="Text" ... DataBGColorField="BGColor" ?

Thanks

Marin Bratanov
Telerik team
 answered on 25 Feb 2016
5 answers
103 views

I am updating a project to the latest version of Telerik UI for AJAX, and have noticed that if Idouble click on empty space below my text in the editor I get a javascript error "Unable to get property 'nextSibling' of undefined or null reference", relating to the following segment of code:

var h=function(o){while(!o.nextSibling){o=o.parentNode;
}return o.nextSibling;
}; 

As I have been unable to determine the source of this problem I am hoping you can help me out.

Vessy
Telerik team
 answered on 25 Feb 2016
9 answers
481 views
Hi All,

I am facing problems with client side validation of RadEditor.
I want to put a check on length of the string entered in editor.

Following is the code, I have written:

========ASPX======== 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"
    <script type="text/javascript" language="javascript"
    function ValidateEditor() 
    {
        alert($find("<%=editor1.ClientID %>").get_text().length);
        alert($find("<%=editor1.ClientID %>").get_html().length); 
        alert($find("<%=editor1.ClientID %>").get_html(true).length); 
    } 
     
    function ValidateEditor1(sender, args) 
    { 
        alert("args.Value.length = "+args.Value.length); 
    } 
    </script> 
    </telerik:RadScriptBlock> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <asp:CustomValidator ID="val1" Display="None" runat="server" ClientValidationFunction="ValidateEditor" 
            ValidationGroup="group1"></asp:CustomValidator> 
             
        <asp:CustomValidator ID="CustomValidator1" Display="None" runat="server" ClientValidationFunction="ValidateEditor1" 
            ValidationGroup="group1" ControlToValidate="editor1"></asp:CustomValidator> 
     
        <telerik:RadEditor ID="editor1" runat="server" Width="400" Height="100" 
            Skin="Vista" EditModes="Design"
            <Tools> 
                <telerik:EditorToolGroup> 
                    <telerik:EditorTool Name="Bold" /> 
                    <telerik:EditorTool Name="Italic" /> 
                    <telerik:EditorTool Name="Underline" /> 
                    <telerik:EditorTool Name="InsertOrderedList" /> 
                    <telerik:EditorTool Name="InsertUnorderedList" /> 
                    <telerik:EditorTool Name="Indent" /> 
                    <telerik:EditorTool Name="Outdent" /> 
                    <telerik:EditorTool Name="JustifyLeft" /> 
                    <telerik:EditorTool Name="JustifyCenter" /> 
                    <telerik:EditorTool Name="JustifyRight" /> 
                </telerik:EditorToolGroup> 
            </Tools> 
        </telerik:RadEditor> 
         
        <asp:Button Text="SAVE" ID="button16" OnClick="Save_Click" 
            runat="server" ValidationGroup="group1" /> 
    </div> 
    </form> 
</body> 
========CODE BEHIND======== 
    public partial class EditorValidation : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
 
        } 
 
        protected void Save_Click(object sender, EventArgs e) 
        { 
            int len = editor1.Content.Length; 
        } 
         
    } 


To put check on length, I used function get_html() and get_text(). But length of string returned by these function is sometimes smaller than length of server side attribute "Content".
Then I found online demo(http://demos.telerik.com/aspnet-ajax/editor/examples/validators/defaultcs.aspx) which had implementation like function "ValidateEditor1". But that also returned smaller length.

I observed that this problem consistently occurs with strings spanning over multiple lines. You can try this by entering any multi-line string in the editor.

So I think I will be able to solve this problem if I find some api on client side, which returns string exactly equal to the one returned by server side attribute "Content". Can anyone provide more insight into this problem?

Regards
Shrikant
Ianko
Telerik team
 answered on 25 Feb 2016
4 answers
120 views

Specifically a RadFilterDropDownEditor, but I will also need date editors as well. I can't find any good documentation explaining how to set something up. My current strategy is based off of the code here: http://docs.telerik.com/devtools/aspnet-ajax/controls/filter/field-editors/programmatic-creation. I have to set the field editor's values with a list, but using the code below, there are no values in the drop down. I have also seen the code here but it is a completely different and unexplained approach, and involving data tables is, in my opinion, bad.

 

Here is essentially what I have:

<telerik:RadFilter runat="server" ID="rfFilter" RenderMode="Lightweight" FilterContainerID="RadGrid1" ShowApplyButton="False" ViewStateMode="Enabled" OnApplyExpressions="rfFilter_ApplyExpressions"/>

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        RadFilterDropDownEditor districtFilter = new RadFilterDropDownEditor();
        rfFilter.FieldEditors.Add(districtFilter);
        statusFilter.FieldName = "District";
        statusFilter.DataType = typeof(string);
 
        var list = new ArrayList(GetDistrictList());
        statusFilter.SetEditorValues(list);
    }
}

Kostadin
Telerik team
 answered on 25 Feb 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?