Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views

Im creating a treeview on client side and there is a requirement of adding multiple radio buttons columns dynamically.

How can I achieve adding multiple columns client side with proper alignment. I couldnt find any article showing how to add radio button columns.

 

 node = new Telerik.Web.UI.RadTreeNode();
                    node.set_text(msg.d[i].Text);
                    node.set_value(msg.d[i].ID);
                    var dataItem = msg.d[i];
                    node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.WebService);
                   objTree.get_nodes().add(node);

               
                 

Anton
Telerik team
 answered on 13 Oct 2016
9 answers
645 views
Hi Team,

In RadTreeView, I want to add an image at right side of the node text for all the nodes in Client- Side.

Description:
1. Dynamically, I am adding nodes in the client side and here I wanted to place an image at right side of the node text(find attached for how I wanted) and I tried with "farimage" property, Image index property as the value of "1" and tried with many ways. But, all are not working out.

In one way, I am able to achieve this, If I append an image with the text. But, I am getting an error ("A potentially dangerous Request.Form value was detected from the client ") while post occurs.

I would be helpful if you send me an example.
Plamen
Telerik team
 answered on 13 Oct 2016
1 answer
506 views

I have a radgrid defined which contains a GridCheckBoxColumn.  Our accessibility evaluation tool is complaining because the input (checkbox) does not have a label associated with it.  I have EnableAriaSupport set to true on the radgrid.  I currently have a work around, which applies an "aria-label" attribute to the input in the idem created event.  But I'm hoping you can provide a better solution.  I'm including the column definition and my work around code below.

                            <telerik:GridCheckBoxColumn 
                                UniqueName="Active"
                                DataField="Active" 
                                HeaderText="Active" 
                                AllowFiltering="false"
                                >
                            </telerik:GridCheckBoxColumn>

 

    Protected Sub grid_ItemCreated(sender As Object, e As GridItemEventArgs)
        If TypeOf e.Item Is GridDataItem Then
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)

            If TypeOf item("Active").Controls(0) Is CheckBox Then
                Dim Ctrl As CheckBox = DirectCast(item("Active").Controls(0), CheckBox)

                Ctrl.InputAttributes.Add("aria-label", "Active")
            End If

        End If
    End Sub

 

Kostadin
Telerik team
 answered on 12 Oct 2016
3 answers
200 views

I am using RadPanelBar throughout my site and it works fine.  But suddenly when I try to add another one on a user control, I get some weird behavior.  The expandmode I'm using on the site is MultipleExpandedItems and that's what I would like to use in this user control.  I've spent hours on this and have tried to approach it from different directions.  I'm finally at the point where I copied the demo from Telerik and still getting the weird results.  Here's my current test user control.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestUserControl.ascx.cs" Inherits="UserControls.TestUserControl" %>
     <div>
        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="MultipleExpandedItems">
            <Items>
                <telerik:RadPanelItem Text="Panel 1">
                    <Items>
                        <telerik:RadPanelItem Text="Item 1" />
                        <telerik:RadPanelItem Text="Item 2" />
                        <telerik:RadPanelItem Text="Item 3" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Panel 2">
                    <Items>
                        <telerik:RadPanelItem Text="Item 4" />
                        <telerik:RadPanelItem Text="Item 5" />
                        <telerik:RadPanelItem Text="Item 6" />
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </div>

The panels render as collapsed and when you click on them nothing happens.  However, when I change the ExpandMode to SingleExpandedItem then suddenly it works.  Why does it only work on SingleExpandedItem mode in my user control but not in MultipleExpandedItems mode?  And why does MultipleExpandedItems work everywhere else on my site?

Ivan Danchev
Telerik team
 answered on 12 Oct 2016
7 answers
155 views
I am looking to print a TreeList without having the dependency of Excel or PDF. Is there a method other than exporting the innerHTML onto a page and printing the new page?
Kostadin
Telerik team
 answered on 12 Oct 2016
5 answers
525 views
We have a radScheduler and we want the users to right-click to bring-up a context menu in order to edit.  This allows us to present a set of choices specific to the day or the appointment they are editing.  It gives us greater control.

We do not want them to be able to double-click the day or appointment.  We want double-clicking to do absolutely nothing.

How can this be accomplished?
Anton
Telerik team
 answered on 12 Oct 2016
1 answer
167 views

I have a radGrid with EnablePostBackOnRowClick="True".

it includes an OnSelectedIndexChanged event: OnSelectedIndexChanged="grdSpecialtyMedTasks_OnSelectedIndexChanged"

It includes a column :<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" ItemStyle-Width="20px"/>

My codebehind includes :

protected void grdSpecialtyMedTasks_OnSelectedIndexChanged(object sender, EventArgs e)
{                                                       // when I click a row, I hit this code every time
GridDataItem selectedItem = (GridDataItem)grdSpecialtyMedTasks.SelectedItems[0];
DropDownList ddlDest = (DropDownList)selectedItem.FindControl("ddlDest");
if (ddlDest.SelectedValue != "Default")
    {
    btnProcessTask.Enabled = true;
    }
...

protected void btnProcessTask_Click(object sender, EventArgs e)
{
if (grdSpecialtyMedTasks.SelectedItems[0] != null) // occasional index out of range error hits here
     {       
    processTask(sender, e);
     }
}

---------------------------

When user selects anywhere in the row, the client select checkbox is checked and vices-versa, so that seems to work nicely.

Also when either of the above happens I can see that the OnSelectedIndexChanged fires as I hit a breakpoint each time. (double click hits breakpoint twice.)

Problem is that the row does not APPEAR to have been selected / does not get highlighted until the user double-clicks the row. WHY?

In case it matters, both times when I hit breakpoint in the OnSelectedIndexChanged method, IsPostBack is set to True.

The potential is that the user thinks they are processing Row X when in fact they are processing Row Y.

Also, occasionally I am getting am index out of range error in the btnProcessTask_Click method.

--------------------------

Any assistance greatly appreciated :)

 

 

Viktor Tachev
Telerik team
 answered on 12 Oct 2016
1 answer
241 views

hi

How do I do a foreach loop in the RadScheduler ItemDataBound event?

I have a code here would like to have a lightGray background color if the class end time is lesser than current time and i would like to loop through each item so that gray out the correct items. Thanks

 

 protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
    {
        DataRowView row = (DataRowView)e.Appointment.DataItem;
        DateTime endtime = DateTime.Parse(row["ClassEndTime"].ToString());
        if (endtime <= DateTime.Now)
        {
            e.Appointment.BackColor = System.Drawing.Color.LightGray;
        }
              


    }

Nencho
Telerik team
 answered on 12 Oct 2016
1 answer
178 views

I have set up a page using <telerik:RadAjaxManager> and <asp:Panel>. The <asp:Panel> is ajaxified.

Within the <asp:Panel> I have a button. This button is supposed to "escape" the AJAX mechanism and reload the whole page via PostBack when being pushed.

What do I need to do to have the button reload the whole page, not just the <asp:Panel> area?

Loïc
Top achievements
Rank 1
 answered on 12 Oct 2016
3 answers
885 views

Hello,

  I am using RadText  with TextMode="Password" and used Password Strength Settings this works perfect,Now my requirement is, there should have icon to toggle password (show/hide) field. Please find attached screen shot please let me know is there any kind of control which supports similar kind of functionality.

Vessy
Telerik team
 answered on 12 Oct 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?