Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
177 views
We are observing that even with recent version of Telerik ASP.NET Ajax Rad Controls, that the JavaScript is detecting for IE, and then rendering the attachEvent method. Unfortunately, this has been deprecated in IE11, so the code would better render if it detected for features (attachEvent) rather than browser.

Relevant snippet of code from running the debugger as below. I am including an image taken from running the F12 debugger to show exactly what is failing. I tried to attach the ScriptResource.axd file, but am not able to attach in this forum because not allowed file type.
if($telerik.isIE){document.attachEvent("onmousedown",this._onDocumentClickDelegate);<BR>document.attachEvent("oncontextmenu",this._onDocumentClickDelegate);<BR>}else{$telerik.addHandler(document,"mousedown",this._onDocumentClickDelegate);<BR>$telerik.addHandler(document,"contextmenu",this._onDocumentClickDelegate);
Nencho
Telerik team
 answered on 22 Apr 2014
3 answers
324 views
Hi,
I m having hard time to display value in tooltip field of column series. Anytime I tried to set value, I always see Y value in tooltip.
See below the way I m adding series and tried to modify tooltip value.
For Each r As DataRow In ds2.Tables(0).Rows
    Dim item As New SeriesItem
    Dim name As String = r.Item("FVID")
    Dim vol As Integer = r.Item("total")
 
    item.Name = name       
    item.YValue = vol
    item.TooltipValue = name    <-- NOT WORKING
 
    barChartSeries.Items.Add(item)
 
    Dim xaxis As New AxisItem(name)
    BarChart.PlotArea.XAxis.Items.Add(xaxis)
Next
Danail Vasilev
Telerik team
 answered on 22 Apr 2014
3 answers
105 views
Hi
Is there any way to stick Rad chart Axis Label Issue in Always the middle of Axis?! Please observe that, In that first image Axis Label  in the middle, Once I zoom in scroll to left and right, Axis Label  also moving. Please suggest what kind of options I have to set, to get the Axis Label  always in the middle.
Please find the below chart design code.

please reply as soon as possible

enter image description here          enter image description here

Thanks
Anandhi
Danail Vasilev
Telerik team
 answered on 22 Apr 2014
1 answer
152 views
Hi,
      I am working in radchart control. i am using addrange property to add X axis item dynamically. I have a requirement to show values in reverse order.  I need an immediate solution.






Thanks
Danail Vasilev
Telerik team
 answered on 22 Apr 2014
1 answer
86 views
Hi all,

First of I'm not sure this is the right place for my question, but I could't find a more appropriate.  

On a web page I have have sidebar and main content area. In the main content is a RadGrid with a collections of products of a selected product category. In the sidebar I have User control where the user can filter the product in the grid. This QuickFilter user control have a RadPanelBar and in every panel is a CheckBoxList. This UI of the was requirement from the client.

 The RadPanelBar Items and the CheckBVoxLists are created dynamic because that the number of filter categories (panels in the RadPanelBar) and the number of filter options (check boxes in the CheckBoxList) are different from one product category to another.
In the Page_Inet of the user control I create the RadPanelItems and the CheckBoxLists, so that they an there values are been persisted in the ViewState. In OnClick event of a button I read out the selected check boxes and query the database for the RaGrid and do a Rebind op the grid.
This works as expected.

But now build in a "Brand" selector. I's simple two RadioButtons sitting in the sidebar. In the SelectedIndexChange I have to build the Filter User Control again because that the filter categories and filter options are different between the two Brands.

But because the SelectedIndexChange fires after the Page_Init the new build RadPanelBar items en check boxes are not added to the ViewState. and therefor the selected values aren't persisted.

I have tried to build the RadPanelBar items en check boxes again on the SelectedIndexChange but this seems to work.

I would like just to refresch the Filter User Control in the SelectedIndexChange so that the Page_Init was fired again. Is this possible/ Or can I add the dynamic created controls and the value to the ViewState?

Or is there another solution?

Anders Pedersen
Ianko
Telerik team
 answered on 22 Apr 2014
1 answer
271 views
Hi,

i have created a radhtmlchart dynamically using c# code , now i want to create OnClientSeriesClicked event for this chart and through this event i want to call a java script function ,
what i am doing is that i am creating radhtmlchart using c# code and adding it to panel, this i have achived so far but now i want that when we click on the series of the chart some java scrip funtion should fire, i am not getting clear idea how to achive this .

till now what i have done is below (just a refernce).
create chart()
{
  RadHtmlChart1 = new RadHtmlChart();
               StyleChart();
               RadHtmlChart1.OnClientSeriesClicked += new EventHandler(this.SeriesClicked);
panel p = new panel();
p.controls.add(RadHtmlChart1 )
}

   private void SeriesClicked(object sender, EventArgs e)
      {
         ClientScript.RegisterStartupScript(this.GetType(), "print", "<script>RadHtmlChart1_SeriesClicked();</script>");
         
      }

but i am getting a runtime exception if iam doing this way ("Microsoft JScript runtime error: 'System' is undefined");
Danail Vasilev
Telerik team
 answered on 22 Apr 2014
1 answer
52 views
Hi,I have a RadGrid that has a mastertable and detail tables. Detail tables are loading with "DetailTableDataBind".

I want to sort mastertable and detail tables but their data structure are different. When i try to sort detail table only, it worked. but when i added a sort function to mastertable, it overrides the detail tables' sort function.

Can i sort them seperately with different functions.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 22 Apr 2014
1 answer
66 views
Hi iam having one aspx page in my application. after running it iam getting some extra blank width in right side how to avoid this please help me. .
Vessy
Telerik team
 answered on 22 Apr 2014
9 answers
285 views
Hi everyone! I'm working on a WebPart containing a RadGrid created programmatically (by code behind) with a filterchecklist; There are 3 aspects that I would like to ask for help:

1) RadGrid1.MasterTableView.FilterExpression is always an empty String! I need to use it in the handler method for "OnNeedDataSource" to filter the grid:

            String filterExpression = RadGrid1.MasterTableView.FilterExpression;
            DataFiltered = Data.Select(filterExpression, Data.Columns[0].ColumnName + " ASC").CopyToDataTable();
            RadGrid1.DataSource = DataFiltered;

But when i check\uncheck items of checklist or use the "Classic" filter it does not work and is always an empty String.

2) I need for my purpose to check\uncheck the items of the checklist programmatically based on informations that i only know in the code behind; since the attribute Checked for an element of type RadListBoxItem doesn't work, my idea is to save this information within the handler method for OnFilterCheckListItemsRequested, for example within the attribute "Item.value":

        public void RadGrid1_NeedCheckListItems(object sender, GridFilterCheckListItemsRequestedEventArgs e)
        {
          ........
                RadListBoxItem Item = new RadListBoxItem();
                Item.Text =Convert.ToString(Data[row_index][col_index]);
                Item.Value = isFiltered? "FILTER" "NOFILTER";
                e.ListBox.Items.Add(Item);
          ........
        }

In the .aspx page of the webpart, I can check the e.ListBox.Items elements using the following code:

       var gridPrototype = Telerik.Web.UI.RadGrid.prototype;
       gridPrototype._checkListItemsRequestedHandlerOriginal = gridPrototype._checkListItemsRequestedHandler;
       gridPrototype._checkListItemsRequestedHandler = function () {
            this._checkListItemsRequestedHandlerOriginal(); // call the origianl method
            var filterCheckList = $find(this._filterCheckListClientID); // get the check list
            var column = this._checkListFilterActiveColumn.get_uniqueName(); // get the active column
            filterCheckList.get_items().getItem(0).check(); // check the first item for example
       }

How can i access the length of the listbox and the attribute "value" of a single item? My purpose is to scan the listbox until its end (that's why i need the length of this list) and check the attribute "value" of a single item to decide if check or uncheck this RadListBoxItem?
Is it also possible to set the attribute "value" to modify it after you've read it?

3) Less important thing, As you can see in the attached file, what tag i can use in the ".RadFilterMenu_CheckList css class" to make sure that "Cancel" button is alligned with "Apply" button?

Thanks in advance, (unfortunately without the source code i don't know where to find these informations).

Regards,
Carla

Kostadin
Telerik team
 answered on 22 Apr 2014
4 answers
181 views
Hi

I am using RadGrid and I need to export it to email.
I looked in your forums and found this answer:

VB.NET:
01.Private Sub RadGrid1_GridExporting(sender As Object, e As GridExportingArgs) Handles RadGrid1.GridExporting
02. 
03.    If isLoc <> True Then
04. 
05.        Dim ms As New MemoryStream(New UTF8Encoding().GetBytes(e.ExportOutput))
06. 
07.        Dim smtpClient As New SmtpClient()
08.        smtpClient.EnableSsl = True
09. 
10.        Dim mailMessage As New MailMessage()
11.        mailMessage.IsBodyHtml = True
12.        mailMessage.[To].Add(New MailAddress(Session("Email")))
13.        mailMessage.Subject = "Reporting service - Do Not reply"
14.        mailMessage.Body = "This report was sent from <br /><b>Reporting service</b> "
15.        mailMessage.Attachments.Add(New Attachment(ms, "Reporting service" & DocType))
16.        Try
17.            smtpClient.Send(mailMessage)
18.            'Label1.Text = "Message Sent" 
19.            MsgBox("Message Sent")
20.        Catch ex As Exception
21.            'Label1.Text = ex.ToString()
22.            MsgBox("Message not Sent")
23.        End Try
24.         
25.        Response.Redirect(Request.Url.ToString())
26.         
27.         
28. 
29.    End If
30.End Sub


The code in line 25 is not good for my project
because if I use the Response command it does a PostBack.
In my project the PostBack resets user configuration.
And if I delete the Response command, it sends an email and also creates a file in the user's computer.

I want only to send an email without PostBack and without creating a file in the user's computer.
How can I do that?

Thanks,
Daniel.



Daniel
Telerik team
 answered on 22 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?