Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
138 views
I have a RadAjaxPanel that contains a table I am trying to update through the C# code. What happens is the user will first buy all the items, and click "Confirm Purchase". The original panel will go invisible, and then the final radajaxpanel will become visible. At that point, a method in C# will be called to populate the table inside with the final cart. However, in my C# code, when I try to add a newly created row to the table, I get an error that the table doesn't exist. Here's the code: <telerik:RadAjaxPanel ID="PanelCompletePurchase" runat="server" Visible="false">
    <h4>Complete Purchase</h4> 
    <table id="ReceiptTable">
        <tr>
           <th>Quantity</th>
           <th>Product</th>
           <th>Rate</th>
           <th>Price</th>
        </tr>
    </table>
    <asp:Label ID="Message" runat="server" ForeColor="Maroon"></asp:Label>
                <br />
                <asp:Label ID="Response" runat="server" ForeColor="maroon"></asp:Label>
                <br />
                <asp:Label ID="Debug" runat="server" forecolor="maroon"></asp:Label>
</telerik:RadAjaxPanel>

In my C# code, I doReceiptTable.Rows.Add(someCreatedRow);ReceiptTable is red and it shows unknown entity. How do I access the html table inside of the RadAjaxPanel? My Labels update just fine





Princy
Top achievements
Rank 2
 answered on 13 Jun 2014
2 answers
528 views
Why below code is not working. I am try to convert html to pdf. "radEditor.ExportToPdf()" line of code given error "Object reference not set to an instance of an object at Telerik.Web.UI.Editor.Export.RadEditorExportTemplate.Export()" 
       static void Main(string[] args)
        {
            RadEditor radEditor = new RadEditor();
            radEditor.Content = "<div>Hello</div>";
            radEditor.ExportContent += radEditor_ExportContent;
            radEditor.ExportToPdf();
        }

        static void radEditor_ExportContent(object sender, EditorExportingArgs e)
        {
            string path = "C:/tmp/NewFile.pdf";
            if (File.Exists(path))
            {
                File.Delete(path);
            }

            using (FileStream fs = File.Create(path))
            {
                Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
                fs.Write(info, 0, info.Length);
            }

        }
Ianko
Telerik team
 answered on 13 Jun 2014
4 answers
589 views
Hi

I have a fairly standard radgrid with masterview and detail tables.

When editing an item at the top level (parent item), how would I go about auto-expanding the child rows and putting the parent and child rows in edit mode?

Thanks
David
Anuja
Top achievements
Rank 1
 answered on 13 Jun 2014
3 answers
248 views
I have added a ComboBox control to the AdvancedForm.ascx.  When the advanced form is displayed, the selected item in the combobox is not shown.  Stepping through the code, I can see radDropDestination.SelectedIndex = dest.Index; properly being set.  How do you set the SelectedIndex for the ComboBox or properly bind the Combobox so the selected item is shown when the AdvancedForm.ascx is displayed?  


<telerik:RadComboBox ID="radDropDeparture" runat="server" Width="350px" EmptyMessage="-- Depart from ---" DataSourceID="DataSourceDeparture" DataTextField="DepartureName" DataValueField="Id" Skin="Glow" MaxHeight="300px" EnableAutomaticLoadOnDemand="false" EnableItemCaching="true"></telerik:RadComboBox>


Code behind for AdvancedForm.ascx

[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
      public string DestinationID
      {
          get
          {
              return radDropDestination.SelectedValue;
          }
 
          set
          {
                if (value == null)
                  return;
                radDropDestination.DataBind();
              RadComboBoxItem dest = radDropDestination.FindItemByValue(value);
              radDropDestination.SelectedIndex = dest.Index;
          }
      }

From the default.aspx

<AdvancedEditTemplate>
                  <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
                      Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                      RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
                      DestinationID='<%# Bind("DestinationID") %>' DepartureID='<%# Bind("DepartureID") %>' />
              </AdvancedEditTemplate>

Michael
Top achievements
Rank 1
 answered on 13 Jun 2014
9 answers
192 views
We have an issue with the editor in Google Chrome. When the editor gets loaded the cursor does not look like it is in the editor box. If you click in the box then the cursor is there and you can start typing but you get a blank line at the top that you cannot remove. Our clients are complaining about this :)

It does not do this in Firefox. If you do the above and then switch to html view you see "<p>text</p>". If you do the same in FireFox you see nothing in html view. Ironically if you switch to html mode in Google first and then switch back that does not happen. 

How can we fix this so our clients are not unhappy?

DogBizPro
Top achievements
Rank 1
 answered on 12 Jun 2014
2 answers
119 views
Hi Danail,

When a chart has no data present it would be nice if the chart had a built in way to display a custom message indicating no data.  Obviously you can detect this from the code behind and then display the message over the top of the chart but a built in mechanism would be nice.  Even nicer would be some way to have a nice grayed out chart along with the text.

Could that be added to the feature request list please?

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 12 Jun 2014
4 answers
214 views
Hello

We have a User Control (.Net, c#) that uses RadComboBox with MarkFirstCharacter=true and Filter="Contains".
When we started typing in the box, it would filter out using the characters as we type them.
It used to work in IE9 and IE10.  But now with IE11, it has stopped working. 
It only uses the first character.  We can see that it has found all instances of items that use that character but as soon as we type the second character, it stops filtering.  It works in Compatibility mode and also in Firefox.

Any ideas?

Thank you
Raka
Raka
Top achievements
Rank 1
 answered on 12 Jun 2014
6 answers
194 views
I am attempting to iterate through a RadGrid and check the values of the checkbox inside a template column.

So far what I have is the following: 

Protected Sub btnAssignToLocation_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnAssignToLocation.Click
  
            Try
                For Each myRow As GridDataItem In myGrid.Items
                    Dim myID As String = myRow("ProductID").Text
                    Dim myInLocation As CheckBox = CType(myRow.FindControl("cbLocationUsed"), CheckBox)
                    If Not myInLocation Is Nothing Then
                        If myInLocation.Checked Then
                            MyData.ProcNonQuery("myQuery", "@LocID", lcLocation.LocationID, "@ID", myID)
                        Else
                            MyData.ProcNonQuery("myQuery", "@LocID", lcLocation.LocationID, "@ID", myID)
                        End If
                        PolicyPDFCache.ClearLocationCache(lcLocation.LocationID)
                    End If
                Next
            Catch ex As Exception
                     'my error code
  
            End Try
End Sub

I get the error, "Reference to a non-shared member requires an object reference." On the line For Each myRow As GridDataItem In myGrid.Items. I have googled this, but come up with 0 results that either worked or made sense for me/my project. I am not quite sure how to get rid of this. I am pretty certain I am doing the iteration correctly. I have referenced a few posts on the Telerik forums as well as StackOverflow.
Alexander
Top achievements
Rank 1
 answered on 12 Jun 2014
3 answers
199 views
 Hi all,

I have a problem in displaying the calendar control inside collapsible control after i upgrade the telerik controls . The current version i am using is 2013.3.1324.35.See attached screenshot for the problem.

Before upgrading the Telerik control , i had 2009.1.527.35 . That time calendar control was displaying correctly under collapsible control. Pls help me on this.

Thanks in advance

Thanks
Raj
Shinu
Top achievements
Rank 2
 answered on 12 Jun 2014
2 answers
393 views
I have a checkbox defined as

<telerik:RadButton ID="checkbox1" runat="server" Text="testing" ButtonType ="ToggleButton" ToggleType="CheckBox" OnClientClicked="checkbox1_ClientClicked"></telerik:RadButton>

What I want to do in the ClientClicked event is only check the box (and uncheck a different checkbox) when the user selects OK. Everything else seems to work fine but even though the last thing I do in the "ok" case is .set_checked(false) the box remains checked. Here is the javascript:

            function checkbox1_ClientClicked(sender, eventArgs) {
                var checkbox1 = $find('<%=checkbox1.ClientID%>');
                function CallbackFn(arg) {
                    if (arg) {
                        var checkbox1 = $find('<%=checkbox1.ClientID%>');  // I know I probably don't need this, just being safe
                        var checkbox2 = $find('<%=checkbox2.ClientID%>');
                        checkbox1.set_checked(true);
                        checkbox2.set_checked(false);
                    }
                    else {
                        checkbox1.set_checked(false);
                    }
                }
                if (checkbox1.get_checked()) {
                    return radconfirm("warning text", CallbackFn, 330, 150, null, "title");
                }
            }

I've also tried the ClientCheckedChanged and ClientCheckedChanging events with similar results. What obvious, basic thing am I missing? 8^)
Harry
Top achievements
Rank 1
 answered on 12 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?