Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
100 views
I want to change RadDialogOpener's ViewPaths(Or UploadPaths) property by client javascript code, how can i do? When i user ajax code change the ViewPaths value, but it can't work?

public static void ShowDocumentDialog(RadDialogOpener rdo, string sFolders, string sExts, string sClientCallbackFunction, int iMaxUploadFileSize)
{
    string[] aFolder = sFolders.Split(',');
 
    FileManagerDialogParameters documentManagerParameters = new FileManagerDialogParameters();
    documentManagerParameters.ViewPaths = aFolder;
    documentManagerParameters.UploadPaths = aFolder;
    documentManagerParameters.DeletePaths = aFolder;
    documentManagerParameters.MaxUploadFileSize = iMaxUploadFileSize;
 
    if (!string.IsNullOrEmpty(sExts))
        documentManagerParameters.SearchPatterns = sExts.Split(',');  //{ "*.doc", "*.docx", "*.pdf", "*.xls", "*.xlsx", "*.ppt", "*.pptx", "*.zip", "*.rar", "*.txt" };
 
    DialogDefinition documentManager = new DialogDefinition(typeof(DocumentManagerDialog), documentManagerParameters);
    documentManager.ClientCallbackFunction = sClientCallbackFunction;
    documentManager.Width = Unit.Pixel(694);
    documentManager.Height = Unit.Pixel(440);
 
    // Remove it if exist
    if (rdo.DialogDefinitions.ContainsKey("DocumentManager"))
        rdo.DialogDefinitions.Remove("DocumentManager");
 
    rdo.DialogDefinitions.Add("DocumentManager", documentManager);
}


thanks
Rumen
Telerik team
 answered on 10 Mar 2011
1 answer
92 views
I have a textbox within a repeater...
<rad:RadNumericTextBox ID="radNumQty" runat="server" CssClass="txtbox" Width="40px" IncrementSettings-Step="1" MinValue="1" MaxValue="9999999" MaxLength="7" NumberFormat-DecimalDigits="0" ClientEvents-OnValueChanging="clientUpsellChanges">
</rad:RadNumericTextBox>

In my clientUpsellChanges function, I change its' class if there is an error.
if (intQtyError != 0) {
// Toggle css on field with error
var radQtyBox = $find(arrExtraItemFields[0]);
radQtyBox.TextBoxElement.className = "txtboxerror";
}

This all works fine, but I'm finding that the error class gets removed as soon as you mouseover the box. Why is this? How do I prevent it?
Tsvetina
Telerik team
 answered on 10 Mar 2011
2 answers
47 views
Add a question at the time to stretch or move the reserve to which the user has the option
to cancel the action before it happens confirmation.

that event and as I would.

thanks for your help

ALBERT
Top achievements
Rank 1
 answered on 10 Mar 2011
6 answers
280 views

Hi all,

I downloaded Sales Dashboard Demo and I'm not being able to run it on my local machine.

When I first tried to run it, it was referencing all assemblies in \ReferencesTRIAL\Telerik OpenAccess :
Telerik.OpenAccess35.Extensions.dll
Teleril.OpenAccess.dll
Teleril.OpenAccess.Web.dll

I got this error: Could not load file or assembly 'Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.

As a second step, I installed the lastest OpenAccess version (not trial) on my local machine, which installed Telerik.OpenAccess and Telerik.OpenAccess.Config in the GAC. I just replaced the three old assemblies and also added the missing Telerik.OpenAccess.Config, version 2010.3.1125.1
Please see the attached screen shot to see the Project Properties Page.

When I tried to run the project again I got this error: Could not load file or assembly 'Telerik.OpenAccess, Version=2010.3.1110.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.

I searched everywhere in the project and I can't find 2010.3.1110.3!

I need help to put this demo running on my machine.

I'm using VS2010 Ultimate and .NET4.

Thank you,

Nuno Senica

Nuno
Top achievements
Rank 1
 answered on 10 Mar 2011
14 answers
205 views
Hi,

I would like to display alerts/warnings in the scheduler pane as done by the control itself (such as the "Are you sure you want to delete this appointment?"). 

I want this so that after I validate the user's input I can display warnings, mostly server-side but some client side.

Thanks,
Daryl
Alan
Top achievements
Rank 1
 answered on 10 Mar 2011
4 answers
312 views
Good day!

I'm creating an application in which the multiple RadScheduler are created from code-behind. How do I add a custom context menu when a user right clicks an appointment or timeslot? I'm using Q1 2010 version.

Thanks.
Thomas
Top achievements
Rank 1
 answered on 10 Mar 2011
6 answers
147 views
Hello,

I have a RadDatePicker control with footer that contain 2 buttons.One named "Today" and second named "OK" 
1. How can i highlight the today day on the calendar when i click the button( with java script) ?
    I do not want to toggle the calendar when i click the "Today" button, only highlight the current day on the calendar.
2. When i click on the "OK" button i want to put the selected date value  in the textbox and  toggle the calendar.
3. If i click on any date in the calendar i do not want to toggle the calendar (only the "OK" button toggle the calendar).


I need it in client side (JS).

Thank you,
Oren
Rayne
Top achievements
Rank 1
 answered on 10 Mar 2011
2 answers
128 views

Hey all, Im using the telerik radscheduler with a custom provider. In my custom provider, I have a number of custom resources that I want to expose on the advanced edit form. My question is how do I bind the controls on the form to the resources??

Any assistance is appreciated. 

Peter
Telerik team
 answered on 10 Mar 2011
4 answers
182 views
I'm loading a tools file, then custom (external) css into my editor programatically.  The Apply CSS Class dropdown properly picks up the external styles, but the Paragraph Style dropdown does not pick up the styles from the "H" tags.  How to I display the "Heading 1" text in the dropdown as the appropriate style as shown in your demo, without writing a style block to the page that contains the editor or putting the inline style in the tools file as shown in your example?

Thanks
Chuck
Rob
Top achievements
Rank 2
 answered on 10 Mar 2011
1 answer
171 views

Requirements

RadControls version

 

                                RadControls  for  ASP.NET  AJAX  all versions

 

.NET version                                              2.0 and Later

 

Visual Studio version                                                        2005 and later

 

programming language                                                    c#

 

browser support

all browsers supported by RadControls


 


PROJECT DESCRIPTION

This is a simple code which deals with using filtertemplate in the radgrid with grid being binded from the code behind using the Needdatasource event and the comboboxes being loaded using the sqldatasource
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" 
            GridLines="None" onneeddatasource="RadGrid1_NeedDataSource" 
            AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True">
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="CountryID" HeaderText="MCountryID" 
            UniqueName="column">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CountryName" FilterListOptions ="VaryByDataType" HeaderText="CountryName" 
            UniqueName="CountryName" CurrentFilterFunction="EqualTo">
            <FilterTemplate>
                <telerik:RadComboBox ID="RadComboBox1" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CountryName").CurrentFilterValue %>'
DataSourceID="SqlDataSource1" 
                    DataTextField="CountryName" DataValueField="CountryName" runat="server" 
                    AutoPostBack="True"  Filter="Contains" MarkFirstMatch="True" OnClientSelectedIndexChanged="CountryIndexChanged">
                    <Items>
                           <telerik:RadComboBoxItem Text="All" />
                    </Items>
  
                </telerik:RadComboBox>
                  <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
  
                                <script type="text/javascript">
                                    function CountryIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("CountryName", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
  
                            </telerik:RadScriptBlock>
  
            </FilterTemplate>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CodeX2" HeaderText="CodeX2" 
            UniqueName="CodeX2"  CurrentFilterFunction="EqualTo" ShowFilterIcon="false">
        <FilterTemplate>
            <telerik:RadComboBox ID="RadComboBox2" DataSourceID="SqlDataSource1" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CodeX2").CurrentFilterValue %>'  AppendDataBoundItems="true" DataTextField="CodeX2" OnClientSelectedIndexChanged="CodeX2IndexChanged" DataValueField="CodeX2" runat="server">
            </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlock5" runat="server">
  
                                <script type="text/javascript">
                                    function CodeX2IndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("CodeX2", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
  
                            </telerik:RadScriptBlock>
        </FilterTemplate>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CountryCode" HeaderText="CountryCode" 
            UniqueName="CountryCode">
        <FilterTemplate>
        <telerik:RadComboBox ID="RadComboBox3" DataSourceID="SqlDataSource1" DataTextField="CountryCode" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CountryCode").CurrentFilterValue %>' OnClientSelectedIndexChanged="CountryCodeIndexChanged" DataValueField="CountryCode" runat="server">
            </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlock4" runat="server">
  
                                <script type="text/javascript">
                                    function CountryCodeIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("CountryCode", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
  
                            </telerik:RadScriptBlock>
        </FilterTemplate>
           
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
        </telerik:RadGrid>
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:sql1_DB %>" 
              
            SelectCommand="SELECT [CountryName], [MCountryID], [CodeX2], [CountryCode], [DINCode] FROM [Countries]"></asp:SqlDataSource>
    </div>
and the code behind will look like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using Telerik.Web.UI;
  
public partial class filtertemplate : System.Web.UI.Page
{
    public static DataTable GetDataTable(string query)
    {
        string ConnString = ConfigurationManager.ConnectionStrings["sql1_DB"].ConnectionString;
        SqlConnection conn = new SqlConnection(ConnString);
        SqlDataAdapter adapter = new SqlDataAdapter();
        adapter.SelectCommand = new SqlCommand(query, conn);
  
        DataTable myDataTable = new DataTable();
  
        conn.Open();
        try
        {
            adapter.Fill(myDataTable);
        }
        finally
        {
            conn.Close();
        }
        return myDataTable;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
          
        RadGrid1.DataSource = GetDataTable("select  MCountryID,CountryName,CountryCode,DINCode from Countries");
    }
    protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        string filterExpression;
        filterExpression = "[CountryName] = '" + e.Value + "'";
        RadGrid1.MasterTableView.FilterExpression = filterExpression;
        RadGrid1.MasterTableView.Rebind();
    }
}
Sebastian
Telerik team
 answered on 10 Mar 2011
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?