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

Hi,

I would like to add a "are you sure?" confirm dialog when user clicks the "cancel changes" button in the grid when batch editing.

Any client side event to register to? (I did not find any).

 Thanks,

Gaetan

Gaetan
Top achievements
Rank 1
 answered on 09 Nov 2015
2 answers
444 views

Hello,

I have a parent page and I open a jQuery Dialog using the load function in order to open another aspx page. Everything looks fine when the dialogs opens, however, when I close the dialog ​my Telerik Controls (tried RadComboBox, RadButton, RadGrid) cannot postback, asp:buttons work properly.

Please note that both of my pages are enclosed by update panels but I have removed them and I still have the same behavior. Also, I have another jQuery dialog within the same page but without the load functionality (just displays a div) and does not causes the same issue. 

My Page is very large and may be something else causes the issue but I have tried to isolate some parts of my code that I believe that are important.

 <script type="text/javascript">

    $(document).ready(
        //Bind jQuery events
        function () {
            Load();     
    });
    
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(
        // re-bind jQuery events on End Request
        function () {
            Load();
    });
    
    function Load() {
        $(".companyLink").click( //On a link  click event
        function () {
            $(".client-editor")
                .load("../somepage.aspx?cid=ad24a5dd-e2bb-4196-9f06-6fac43ccd4c0")  //Load the aspx page
                .dialog({            //Prepare the dialog
                    autoOpen: false,
                    modal: true,
                    close: function () {   //Empty the page loaded on close
                        $(".client-editor").empty();
                        }
                    });
            $(".client-editor").dialog("open"); //Open the dialog
        });
    }
</script>



<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server" ChildrenAsTriggers="true">
    <ContentTemplate>
        <asp:HyperLink id="hlkCompanyName" runat="server" CssClass="companyLink" Text="Open"></asp:HyperLink>
        <telerik:RadButton ID="rbButton1" runat="server" Text="Telerik Button"></telerik:RadButton>
        <asp:Button ID="btnButton2" runat="server" Text="ASP Button" />
        <div class="client-editor" title="Edit Control"></div>
    </ContentTemplate>
</asp:UpdatePanel>
      








Georgia
Top achievements
Rank 1
 answered on 08 Nov 2015
1 answer
123 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
317 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
78 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.1K+ 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
168 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
132 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
219 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
331 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?