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

Would like to have the legend for a pie chart be generated via the SQLDataSource.  What do I need to do in order to make it possible?  Reading a prior post it was mentioned that it would be released in 2012 but don't see any example of how to implement it.

 

<telerik:RadHtmlChart runat="server" Width="350px" Height="350px" ID="RadHtmlChart1"
                DataSourceID="SqlDataSource1">
     <Legend>
         <Appearance Position="Top">
         </Appearance>
     </Legend>
     <PlotArea>
          <Series >
               <telerik:PieSeries DataFieldY="NumResults" Name="Credit Union Count" StartAngle="90" NameField="StatusDesc"   >
 
               </telerik:PieSeries>
          </Series>
     </PlotArea>
     <ChartTitle Text="Marketing Status">
      <Appearance>
      <TextStyle FontSize="16px"></TextStyle>
      </Appearance>
     </ChartTitle>
</telerik:RadHtmlChart>

Thanks

Kurt Kluth
Top achievements
Rank 1
 answered on 06 Nov 2015
2 answers
257 views

Using vb.net....  I have a radgrid with a gridhypercolumn.  I have added a tool tip in the ItemDataBound subroutine.  I am grabbing the tooltip text from a field in the database.  I cannot figure out what character(s) I need to put in the string so that I can display "Line one. <br \> Line two. \n Line three. &#013;" like:

Line one.

Line two.

Line three.

 

I have tried <br \>, \n, &#013;.  I have even set the tooltip to "eval('"Line one. <br \> Line two. \n Line three. &#013;")" with no luck.

 

I also have the following in the style tags:

.tooltip-inner {

         white-space: pre-wrap;

}

 

Thanks,

Susan

Susan Hessler
Top achievements
Rank 1
 answered on 06 Nov 2015
0 answers
57 views

Hi,

I have grid bound column like below.I am reading value from magnetic card reader and it automatically generates card no like this format "ş5544333344334433:".

how can i revome characters "ş" and ":" when i scan the card?

 

 <telerik:GridBoundColumn DataField="CUSTOMER_CARD_NO"  HeaderText="CARD NO" UniqueName="CUSTOMER_CARD_NO" ShowFilterIcon="False" AutoPostBackOnFilter="True">
                </telerik:GridBoundColumn>​

Ümit
Top achievements
Rank 1
 asked on 06 Nov 2015
9 answers
1.0K+ views
Hi telerik Guys !

Im using RAD FILE EXPLORER as the main control in my current project.

Actually what Iam here trying is to create a nested ROOT structure just like :-

----Root
        :
        : -------Child Folder 1
                    :
                    :---------Child Folder 1a
                                :
                                :---------Child Folder 1a(i)
                                            :
                                            :--------Child Folder 1a[i(a)]
                                
Now when I try to UPLOAD an file within the Child Folder 1a[i(a)] folder Im getting the below mentioned error  in my CustomFileSystemProvider.cs class:-

"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."

Below is the code that is creating an problem :-

 public override DirectoryItem ResolveRootDirectoryAsTree(string path)  
    {  
        string physicalPath;  
        string virtualPath = string.Empty;  
 
        if (this.IsPhysicalPath(path))  
        {// The path is a physical path ;  
            physicalPath = path;  
 
            foreach (KeyValuePair<string, string> mappedPath in MappedPaths)  
            {  
                // Check whether a mapping exists for the current physical paths ;  
                if (GMP.AddSlashAtEndOfPhysicalPath(physicalPath).ToLower().StartsWith(mappedPath.Value.ToLower()))  
                {// Exists   
                    virtualPath = Regex.Replace(GMP.AddSlashAtEndOfPhysicalPath(physicalPath), Regex.Escape(mappedPath.Value), mappedPath.Key, RegexOptions.IgnoreCase);  
                    virtualPathvirtualPath = virtualPath.Replace('\\', '/');  
                    virtualPath = GMP.AddSlashAtEndOfVirtualPath(virtualPath);  
                    break;// Exit the 'foreach' loop ;  
                }  
            }  
 
            // Mappind does not exist ;  
        }  
        else  
        {// Virtual path ;  
            virtualPath = GMP.AddSlashAtEndOfVirtualPath(path);  
            physicalPath = this.GetPhysicalFromVirtualPath(path);  
            if (physicalPath == null)  
                return null;  
        }  
 
        DirectoryItem result = new DirectoryItem(this.GetDirectoryName(physicalPath), string.Empty, virtualPath, string.Empty, fullPermissions, null, GetDirectories(virtualPath));  
 
        foreach (DirectoryItem dirItem in result.Directories)  
        {  
            // Get the information from the physical directory  
            DirectoryInfo dInfo = new DirectoryInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(dirItem.Path)));  
 
            // Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer  
            // If the name attribute matches the unique name of a grid column  
            DataTable dt = new DataTable();  
            dt = Glb_Entities.ExecuteSPReturnDT(new object[]{"Usp_Dms_FolderDate"  
                                                             ,"Folder_Path", (dirItem.Path.TrimEnd("/".ToCharArray())).Substring(0,dirItem.Path.TrimEnd("/".ToCharArray()).LastIndexOf("/"))  
                                                             ,"Folder_Name", dInfo.Name  
                                                               });  
 
            dirItem.Attributes.Add("CreatedDate", dt.Rows[0]["CreateDate"].ToString());  
            dirItem.Attributes.Add("ModifiedDate", dt.Rows[0]["LatestDate"].ToString());  
 
        }  
        return result;  
    }  
 
Problem exist in the italized text in the above code.

Please help ........

I dont have a clue where Iam getting thing wrong.  ??

Ajay 
Karin
Top achievements
Rank 1
 answered on 06 Nov 2015
1 answer
116 views

Hi,

Is it possible to add nodes on client and server manually outside of databinding? I mean like .nodes.add(new orgchartnode("abc"))

Ivan Danchev
Telerik team
 answered on 06 Nov 2015
1 answer
88 views

Hi,

Is there a way to keep an org chart populated after an ajax postback? if there is any ajax action on my page I lose the org chart and need to populate every time outside of !IsPostBack.

Ivan Danchev
Telerik team
 answered on 06 Nov 2015
7 answers
166 views
I bound the Datasource with 3 columns to Bar chart.
Data Source
----------------
tempID      col_Name       Total
---------------------------------
10                test1        100
20               test2         200

I bound this Data Source to Bar chart. I display BarChart using 'col_Name' and 'Count'. Now I would like to pass tempID as a parameter to Drill down.  How can I do this? I don't see any examples online.

Here is my code.
     <telerik:RadCodeBlock ID="codeBlock" runat="server">
          <script type="text/javascript">
               function OnClientSeriesClicked(sender, args) {
                    if (args.get_seriesName() != "Months") $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());
               }
          </script>




                            <telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="800px" Height="500px"
                                Skin="Metro" OnClientSeriesClicked="OnClientSeriesClicked">
                                <PlotArea>
                                    <Appearance>
                                        <FillStyle BackgroundColor="Transparent" />
                                    </Appearance>
                                    <Series>
                                        <telerik:BarSeries Name="Total" DataFieldY="count">
                                            <TooltipsAppearance Color="White" DataFormatString="{0}"></TooltipsAppearance>
                                            <LabelsAppearance Visible="true">
                                            </LabelsAppearance>
                                        </telerik:BarSeries>
                                    </Series>
                                    <XAxis DataLabelsField="col_name">
                                    </XAxis>
                                    <YAxis>
                                        <LabelsAppearance DataFormatString="{0}">
                                        </LabelsAppearance>
                                    </YAxis>
                                </PlotArea>
                                <Legend>
                                    <Appearance Position="Bottom">
                                    </Appearance>
                                </Legend>
                                <ChartTitle Text="Total">
                                </ChartTitle>
                            </telerik:RadHtmlChart>


Code behind
-----------------------------------

 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
          {
                   
                    myDataTable4 = BL.GetSummaryByID(tempID);
                    RadHtmlChart1.PlotArea.XAxis.DataLabelsField = "Quarter";
                    RadHtmlChart1.PlotArea.Series[0].DataFieldY = "Rev";
                    RadHtmlChart1.PlotArea.Series[0].Name = "Quarters";
                    RadHtmlChart1.DataSource = myDataTable4;
                    RadHtmlChart1.DataBind();
               }

Luigi Gaeta
Top achievements
Rank 1
 answered on 06 Nov 2015
1 answer
286 views

I have created a function to combine all ComboBox SQL statement into it,  it is work for showing the data value, but I found that when I click the footer message, it will show up duplicated records in the ComboBox value. Did I miss something? Is it the proper way to do it? Thanks in advance. 

 

My questions are:

1. How to prevent duplicated value? I did try to use EnableAutomaticLoadOnDemand="true", but I have got another error : "There is no assigned datasource. unable to complete callback request".

2. How can I set the paging into the ComboBox like the Demo "Items 1 of 20 out of 90", seems I cannot pass the NumberOfItems parameter into it.

 

My Code as below:

        cbTestA.BindCombobox();
        cbTestB.BindCombobox();
        cbTestC.BindCombobox();


        public void BindCombobox()
        {
            try
            {
                //Default parameters
                AllowCustomText = true;
                Filter = RadComboBoxFilter.Contains;
                MarkFirstMatch = true;
                EnableAutomaticLoadOnDemand = false;
                ShowMoreResultsBox = true;
                EnableVirtualScrolling = true;
                ItemsPerRequest = 20;

                string connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["Context"].ConnectionString;
                SqlConnection cs = new SqlConnection(connectionstring);
                SqlCommand cmd = new SqlCommand();
                cs.Open();

                switch (this.ID)
                {
                    case "cbTestA":
                        {
                            cmd.CommandText = "select id as dtxt,id as dval from COMPANY";
                        }
                        break;
                    case "cbTestB":
                        {
                            cmd.CommandText = "select id as dtxt,id as dval from COUNTRY";
                        }
                        break;
                    case "cbTestC":
                        {
                            cmd.CommandText = "select id as dtxt,id as dval from USERNAME";
                        }
                        break;
                }

                cmd.Connection = cs;
                DataSet dset = new DataSet();
                SqlDataAdapter dp = new SqlDataAdapter(cmd);
                dp.Fill(dset);

                DataSource = dset;
                DataTextField = "dtxt";
                DataValueField = "dval";
                DataBind();

                //int itemOffset = this.NumberOfItems;
                //int endOffset = Math.Min(itemOffset + ItemsPerRequest, 20); //dset.Rows.Count);
                //this.EndOfItems = endOffset == 20; // data.Rows.Count;
                //this.Message = GetStatusMessage(endOffset, 20); //data.Rows.Count);
            }
            catch (Exception)
            {
                //MessageBox.Show(ex.Message);
            }
        }

Nencho
Telerik team
 answered on 06 Nov 2015
4 answers
266 views

I have a in house project / time / resource management application. Part of the application was coded in Silverlight and it utilizes a third party gantt control. Since Chrome is dropping support for NPAPI plugins (java / silverlight) we really want to dump Silverlight and re-code this part of our application. However, we have functionality in the current Gantt control that doesn't seem to exist in the Telerik gantt control.Specifically the ability found in Microsoft Project where you add lead time to a dependent task and the ability to zoom in and out the view on the right hand side of the gantt control. 

Telerik's gantt control has a desired schema behind it and unfortunately the current third party control we are using differs pretty dramatically. We have customized the gantt data provider to get most of the data showing up.

What I'm asking for here is:

 Is there some way I can add functionality to the Telerik Gantt control that will allow me to add lead time to a depedent task. I suppose the ability to change a dependent tasks start date would also give me the functionality I require. 

Is there some way I can handle the zooming in of the right hand side of the control. Effectively changing the number of days displayed in that view. So if my total project plan covers 1 year and by default i'm viewing 4 months could i change it so the right hand side displays .. say 2 months of data or one?

 

Hopefully this all makes sense. I hope the screen shot is helpful.


Thanks,

julian

 

 

Julian
Top achievements
Rank 1
 answered on 06 Nov 2015
13 answers
830 views
Hello,
I'd like to expand/collapse a group in a RadGrid by clicking the entire row of the group header, not just the litte arrow on the left.
Is it possible?
I guess I need to use the OnRowClick in ClientSettings.ClientEvents.
But any help would be appreciated.
Thanks.
Fandy Backers
Top achievements
Rank 2
 answered on 06 Nov 2015
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?