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

I have 6 steps (with 5 sessions of classes and a Review and Submit step), each step has a gridview to list classes available to be taught in corresponding session.  The first column of each gridview is a TemplateField  with a checkbox so individuals can click to register for class.  The boxes are persistent across steps which is nice. When the user gets to the final step, I would like to have another gridview to list the classes they have selected from the previous 5 steps, just as a review before submitting.

I have build a dynamic DataTable to hold the users responses as the cycle through the wizard so I can display the classes they have selected on the last step before clicking finish.

I am having trouble accessing the checkbox in the gridview in each step.  Not sure which event to use and if I have to FindControl the gridview first then the checkbox, etc.

 

I tried using the NextButtonClick event, and SELECT CASE the RadWizard.ActiveStepIndex to determine what step they are on then using the following but to no avail.

 

Protected Sub RadWizardNextButtonClick(sender As Object, e As Telerik.Web.UI.WizardEventArgs) Handles radWizard.NextButtonClick
Select Case radWizard.ActiveStepIndex
Case 0
For Each item As GridViewRow In GridView1.Rows
Dim chk As CheckBox = DirectCast(item.FindControl("CheckBox1"), CheckBox)
If chk IsNot Nothing Then
Session1 = item.Cells(1).Text
End If
Next
Case 2
For Each item As GridViewRow In GridView2.Rows
Dim chk As CheckBox = DirectCast(item.FindControl("CheckBox1"), CheckBox)
If chk IsNot Nothing Then
Session2 = item.Cells(1).Text
End If
Next
Case 3
For Each item As GridViewRow In GridView3.Rows
Dim chk As CheckBox = DirectCast(item.FindControl("CheckBox1"), CheckBox)
If chk IsNot Nothing Then
Session3 = item.Cells(1).Text
End If
Next
Case 4......

Plamen
Telerik team
 answered on 14 Oct 2015
16 answers
345 views
Is there a way to load the Advanced Edit Template of the Scheduler without having to double click on an appointment?

I have tried the following:

RadScheduler1.Appointments.FindByID
RadScheduler1.ShowAdvancedEditForm(apt);

It displays the Advanced Edit Template, but then the Edit functionality of the page is lost.  When the same page is edited by clicking on an appointment, the edit functionality works.

Thanks

Gerrit

Plamen
Telerik team
 answered on 14 Oct 2015
6 answers
242 views

Hello,

 We are facing an issue in Telerik RadToolTipManager . We have a Radgrid with hyperlinks on each cell. Hover on hyperlink shows a tooltip which is a placeholder that contains few links and a radcombobox. RadGrid Columns are build with ItemTemplate

When we hover over the link on the first row , the tool tip appears with correct data. When we go the second row or to another cell, the tool tip still holds the old values. The occurrence of this issue is not consistent and is random. Some times the tooltip data is shown  correct for first few mouse hovers across rows or across cells on the same row. Some times , it breaks in the second tooltip. There is no pattern in which this issue occurs.

We did a lot of ressearch on Telerik forums and ​tried the following

1. Clearing TargetControls. We also validated that each target control in Radtooltipmanager has a unique ID.

2. Adding the tooltip controls to args.UpdatePanel in PreRender Event

3. Making the surrounding div of the tooltip placeholder runat=server and then assign an ID

 We are adding the target controls in the following way:

  ToolTipTargetControl control = new ToolTipTargetControl()
                    control.IsClientID = true
                    control.TargetControlID = visitLink1.ClientID;
                    control.Value = Convert.ToString(visit.ID)
                    if (this.RadToolTipManager1 != null)
                    {
                        RadToolTipManager1.TargetControls.Add(control

                    }

 

We are adding the controls to tooltip as follows:

 protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e)

            if (this.ToolTipVisit != null)
            {

                this.ToolTipVisit = CreateToolTip()
                ToolTipUpdatePanel.ContentTemplateContainer.Controls.Add(this.ToolTipVisit)
            } 
        } 

 Can you please provide us help in solving this issue. Thank you in advance.

 

Marin Bratanov
Telerik team
 answered on 14 Oct 2015
12 answers
357 views
Hi,
I have a question and would appreciate your help.

Is it possible to name or rename a ColumnSeries on client-side databind so that is displays correctly in my chart legend?
I'm implementing a javascript function that calls a web service (or page method) and then repaints my RadHtmlChart with the retrieved JSON data. The new series names should be set from a value in my JSON data.

function bindToChartData_Graf1() {
  $.ajax({
    type: "POST",
    url: "HtmlChart.aspx/GraphData",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    async: true,
    success: function (data) {
      var RadHtmlChart1 = $find('<%=RadHtmlChart1.ClientID%>');
      RadHtmlChart1.set_dataSource(data.d);
      RadHtmlChart1.set_transitions(true);
      RadHtmlChart1.repaint();
    }
  });
}


I did manage to rename the Series with server-side code as shown below, but would like to implement this in javascript.

Private Sub RadHtmlChart1_DataBound(sender As Object, e As System.EventArgs) Handles RadHtmlChart1.DataBound
    Try
        Dim chart As Telerik.Web.UI.RadHtmlChart = sender
        chart.PlotArea.Series(0).Name = year1 'value is dynamic
        chart.PlotArea.Series(1).Name = year2 'value is dynamic
    Catch ex As Exception
        'error
    End Try
End Sub

Thanks in advance for help.
Dušan
Mike Barraclough
Top achievements
Rank 1
 answered on 13 Oct 2015
1 answer
145 views

Hello. I'm working with a raddropdownlist control contained within radfilter and I have this drop down list display images for different each list item. The ImageDropDown image shows you what the display looks like when the drop down list is open. If I select a drop down list item, the item get selected but nothing displays (shown in the MissingSelection Image). However, once I apply the radfilter selection, the image will appear selected on postback (ImageSelected Image). Here's the code-behind code that is used to create the raddropdownlist for the radfilter:

Protected Sub RadFilter1_ExpressionItemCreated(sender As Object, e As RadFilterExpressionItemCreatedEventArgs) Handles RadFilter1.ExpressionItemCreated
        Dim oConn As New System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("iTask").ConnectionString)
        Dim oCmd As New SqlCommand
        Dim oData As SqlDataReader

        Try
            Dim singleItem As RadFilterSingleExpressionItem = TryCast(e.Item, RadFilterSingleExpressionItem)
            If singleItem IsNot Nothing AndAlso singleItem.FieldName = "Flag" AndAlso singleItem.IsSingleValue Then
                Dim dropDownList As RadDropDownList = TryCast(singleItem.InputControl, RadDropDownList)
                oConn.Open()

                With dropDownList
                    .Width = 50
                    Dim oBlankItem As New DropDownListItem("")
                    .Items.Add(oBlankItem)
                    With oCmd
                        .Parameters.Clear()
                        .Connection = oConn
                        .CommandType = CommandType.StoredProcedure
                        .CommandText = "iTask_Select_Flags"
                    End With
                    oData = oCmd.ExecuteReader
                    Do While oData.Read
                        Dim oItem As New DropDownListItem("")
                        oItem.Text = "<img src='" & CoreComponents.sImageRoot & oData("ImageFileName").ToString & "' style='cursor:pointer;' border='0'/>"
                        oItem.ToolTip = oData("Name").ToString
                        oItem.Value = oData("ImageFileName").ToString
                        'oItem.ImageUrl = CoreComponents.sImageRoot & oData("ImageFileName").ToString
                        .Items.Add(oItem)
                    Loop
                    .OnClientItemSelected = "OnClientItemSelected"
                    '.OnClientSelectedIndexChanged = "OnClientSelectedIndexChanged"
                    .DataBind()
                    oData.Close()

                End With
            End If
        Catch ex As Exception
        Finally
            oConn.Dispose()
            oConn = Nothing
            oCmd = Nothing
            oData = Nothing
        End Try

    End Sub

 

I attempted to use the OnClientItemSelected & OnClientSelectedIndexChanged JS code to set the image in the text element of the RadDownDownList control, but to no avail. Here's that code as well. Any help on this issue would be greatly appreciated.

 function OnClientItemSelected(sender, eventArgs) {
                    alert('function called!');
                    var item = eventArgs.get_item();
                    //alert("You selected " + item.get_text() + " with value " + item.get_value());
                    sender.get_textElement().innerHTML = "<img src='<%=CoreComponents.sImageRoot%>" + item.get_value() + "' border='0'/>";
                }

                function OnClientSelectedIndexChanged(sender, eventArgs) {
                    alert("You selected item with index : " + eventArgs.get_index());
                    sender.get_textElement().innerHTML = sender.get_items().getItem(eventArgs.get_index()).get_text();
                }

Nencho
Telerik team
 answered on 13 Oct 2015
3 answers
58 views

Hi, 

 I would like to be able to implement drag and drop functionality into my grid but I need to be able to drop items anywhere on the grid, not just above/on/below current items in the grid.

 My grid

 The RowDrop event only seems to fire if you drop the item around the existing  items, and not in empty space on the grid.

 

Pavlina
Telerik team
 answered on 13 Oct 2015
0 answers
35 views

Hello,

 We are facing an issue in Telerik RadToolTipManager . We have a Radgrid with hyperlinks on each cell. Hover on hyperlink shows a tooltip which is a placeholder that contains few links and a radcombobox. RadGrid Columns are build with ItemTemplate

When we hover over the link on the first row , the tool tip appears with correct data. When we go the second row or to another cell, the tool tip still holds the old values. The occurrence of this issue is not consistent and is random. Some times the tooltip data is shown  correct for first few mouse hovers across rows or across cells on the same row. Some times , it breaks in the second tooltip. There is no pattern in which this issue occurs.

We did a lot of ressearch on Telerik forums and ​tried the following

1. Clearing TargetControls. We also validated that each target control in Radtooltipmanager has a unique ID.

2. Adding the tooltip controls to args.UpdatePanel in PreRender Event

3. Making the surrounding div of the tooltip placeholder runat="server" and then assign an ID

 We are adding the target controls in the following way:

  ToolTipTargetControl control = new ToolTipTargetControl();
                    control.IsClientID = true;
                    control.TargetControlID = visitLink1.ClientID;
                    control.Value = Convert.ToString(visit.ID);
                    if (this.RadToolTipManager1 != null)
                    {
                        RadToolTipManager1.TargetControls.Add(control);

                    }

 

We are adding the controls to tooltip as follows:

 protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (this.ToolTipVisit != null)
            {

                this.ToolTipVisit = CreateToolTip();
                ToolTipUpdatePanel.ContentTemplateContainer.Controls.Add(this.ToolTipVisit);
            } 
        } 

 Can you please provide us help in solving this issue. Thank you in advance.

 

Gsgus
Top achievements
Rank 1
 asked on 13 Oct 2015
9 answers
1.9K+ views
Hi
    How to hide  the expand collapse column in radgrid. I have set hierarchydefaultexpand to true. I dont want to collapse the expanded rows.
thanks
Allen
Eyup
Telerik team
 answered on 13 Oct 2015
1 answer
59 views

Hi,

 The tool tip is disappear in chrome.but not in mozila.please help me.

 

Yasir

 

Pavlina
Telerik team
 answered on 13 Oct 2015
1 answer
66 views
When I open rich text editor in IE 11 and try to click on the button "Paste from Word"  the contents are getting directly pasted in editor without showing the dialogue box for pasting. I am not able to reproduce this issue in demo site. In demo site the dialogue box is coming. I am using the RAD editor in Sitecore(CMS). Kindly help me on this issue.
Marin Bratanov
Telerik team
 answered on 13 Oct 2015
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?