Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
343 views
Hi,

I'm currently using RadControls for ASP.NET AJAX Q2 2009 NET35. I can make RadCalendar with GregorianCalendar and Arabic language working, but somehow the RadDatePicker is not showing when I use the same method.

Below is my code, very simple, only using 1 RadCalendar and 1 RadDatePicker and two buttons to switch between language. After switch to arabic, the RadDatePicker didn't work at all.

I need to use arabic month name and day name, but I want the calendar dates to be in Gregorian format, not hijri format. Do I need to change javascript code too? Or just the code-behind?

Default.aspx:
 
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <div> 
    <asp:Button ID="Button1" runat="server" Text="en" onclick="Button1_Click" /> 
    <asp:Button ID="Button2" runat="server" Text="ar" onclick="Button2_Click" /> 
    <br /> 
    <telerik:RadCalendar ID="RadCalendar1" runat="server"
    </telerik:RadCalendar> 
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server"
    </telerik:RadDatePicker> 
    </div> 
    </form> 
</body> 
</html> 
 

Default.aspx.cs:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Globalization; 
 
public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        CultureInfo info = new CultureInfo("en-US"); 
        System.Threading.Thread.CurrentThread.CurrentCulture = info; 
        System.Threading.Thread.CurrentThread.CurrentUICulture = info; 
        GregorianCalendar calendar = new GregorianCalendar(); 
        info.DateTimeFormat.Calendar = calendar; 
        this.RadCalendar1.CultureInfo = info; 
        this.RadDatePicker1.Culture = info; 
        this.RadDatePicker1.Calendar.CultureInfo = info; 
    } 
    protected void Button2_Click(object sender, EventArgs e) 
    { 
        CultureInfo info = new CultureInfo("ar-SA"); 
        System.Threading.Thread.CurrentThread.CurrentCulture = info; 
        System.Threading.Thread.CurrentThread.CurrentUICulture = info; 
        GregorianCalendar calendar = new GregorianCalendar(); 
        info.DateTimeFormat.Calendar = calendar; 
        this.RadCalendar1.CultureInfo = info; 
        this.RadDatePicker1.Culture = info; 
        this.RadDatePicker1.Calendar.CultureInfo = info; 
    } 
 

Best regards,
Omar Suria
Ahmad
Top achievements
Rank 1
 answered on 13 Aug 2016
9 answers
785 views

Hello Telerik,

I was able to implement the Filter with MS DropdownList Instead of Textbox solution posted in the Telerik Help Site.

However, I am stumped as to why the dropdown filter works on some entries but not on some. See image below:

Below is how I declared my RadGrid in my .ASPX page:

<telerik:RadGrid ID="rgOT_Classifications"
                    runat="server"
                    Skin="Default"
                    GridLines="both"
                    BorderStyle="NotSet"
                    BorderColor="#336699"
                    BorderWidth="3"
                    PageSize="3"
                    Width="100%"
                    AllowPaging="true"
                    AllowFilteringByColumn="true"
                    AutoGenerateColumns="false"
                    AllowSorting="true"
                    ShowStatusBar="true"
                    AllowAutomaticDeletes="false"
                    AllowAutomaticInserts="false"
                    ItemStyle-BackColor="#f0f8ff"
                    AlternatingItemStyle-BackColor="White"
                    AllowAutomaticUpdates="false">
                    <PagerStyle Mode="NextPrevAndNumeric" />
                    <MasterTableView Width="100%" DataKeyNames="CLASSIFICATION" TableLayout="Auto" Caption="<strong><big>CLASSIFICATIONS</big></strong>"
                        CommandItemDisplay="Top" EditMode="EditForms" ExpandCollapseColumn-ButtonType="pushButton" AllowMultiColumnSorting="true"
                        Name="Classifications" ShowHeadersWhenNoRecords="true">
                        <CommandItemTemplate>
                            <table width="98%" style="margin:10px auto;">
                                <tr>
                                    <td align="left" style="vertical-align:middle;">
                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/add.png" CommandName="InitInsert" ImageAlign="Middle"/>
                                        <asp:LinkButton id="btnAddNewRecord" runat="server" CommandName="InitInsert" Font-Size="10" style="vertical-align:middle;"
                                                        ToolTip="Click to add a new Classification.">Add New Record
                                        </asp:LinkButton>
                                    </td>
                                    <td align="right">
                                        <div title="Click to clear the current filter criteria." style="float:left;">
                                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/clearfilter.gif" CommandName="ClearFilter" ImageAlign="Middle"/>
                                            <asp:LinkButton id="btnClearFilter"  Font-Size="10" style="vertical-align:middle;"
                                                            runat="server" CommandName="ClearFilter">Clear Filter
                                            </asp:LinkButton>
                                        </div>
                                        <div title="Click to reload data into the grid." style="float:right;">
                                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/Refresh.gif" CommandName="Refresh" ImageAlign="Middle"/>
                                            <asp:LinkButton style="vertical-align:middle;" id="btnRefresh"  Font-Size="10"
                                                            runat="server" CommandName="Refresh">Refresh
                                            </asp:LinkButton>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <Columns>
                            <telerik:GridEditCommandColumn UniqueName="Edit" ItemStyle-HorizontalAlign="center">
                            </telerik:GridEditCommandColumn> 
                            <telerik:GridBoundColumn DataField="CLASSIFICATION" HeaderText="Classification" UniqueName="CLASSIFICATION"
                                AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
                            </telerik:GridBoundColumn>
                            <custom:MyCustomFilteringColumn HeaderText="CLASS 1" DataField="CLASSIFICATION" UniqueName="CLASS1" AutoPostBackOnFilter="false" DataType="System.String" CurrentFilterFunction="Contains" >
                            </custom:MyCustomFilteringColumn>
                            <telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ItemStyle-HorizontalAlign="center">
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings UserControlName="~/maintenance/Edit_OT_Classifications.aspx"
                                          EditFormType="WebUserControl"
                                          PopUpSettings-Modal="true"
                                          PopUpSettings-Width="35%"
                                          >
                        </EditFormSettings>
                    </MasterTableView>
    </telerik:RadGrid>

It's odd that there is no pattern as to why some dropdown entries work and some don't. If you could create it on your end and let me know if it worked for you or not and if you have a solution for this.

Thanks,

Virgil

 

Virgil Rodriguez
Top achievements
Rank 1
 answered on 12 Aug 2016
4 answers
124 views

due to the lack of correct Persian calendar for telerik I'm trying to use a custom Jquery base datapicker

I have used the datapicker outside of grid and everything goes right

but the problem is that at grid's edit form when I click on datapicker box nothing shows

Maria Ilieva
Telerik team
 answered on 12 Aug 2016
1 answer
185 views

Hi Team,

I want to group the fields displayed in the filter with some header(like treeview)

For eg in the following link i want to group first name,home phone,country under the node Contact Details and i want to group the remaining columns similarly.

http://demos.telerik.com/aspnet-ajax/filter/examples/field-editors/defaultcs.aspx

Please help me to implement this.

Thanks in advance.

Regards,

Rajesh D

 

Eyup
Telerik team
 answered on 12 Aug 2016
8 answers
239 views
The web palette mode does not require the user to press an Apply button.  This is what I am looking for.  The HSV and HSB modes require the user to press the apply button.  Can I remove this functionality?  I see an idea where I can hide the apply button using CSS but then the color doesn't get returned by the selected color property. 
Pat
Top achievements
Rank 1
 answered on 12 Aug 2016
1 answer
162 views

When changing the recurrence dropdown from 'Yearly' or 'Monthly' to 'Never' kendo.all.js throws this error:

Uncaught TypeError: Cannot read property 'enable' of undefined

 

I can change from any other value to any other fine, just not to 'Never'

 

Thanks,

Dimitar
Telerik team
 answered on 12 Aug 2016
1 answer
287 views

Hi there,

Can anyone guide me on how to display custom text in RadScheduler AgendaView?

1 Change word "Agenda" on to "Custom Text"

2 Change Column header from "Appointment" to "Custom Text"

3 Change the word "appointment" in  "Are you sure you want to delete this appoinement" to "Custom Text"

Please help. Thank you.

 

 

 

Ivan Danchev
Telerik team
 answered on 12 Aug 2016
1 answer
82 views

Hi, I am trying to export the scheduler to pdf using the exportToPdf method, and on long schedules with paging enabled returns black images after the first page, where the schedule image should be. Does anyone know the cause and solution to this?

The code for when the export occurs looks like this:

            var schedulerPdfSettings = RadScheduler1.ExportSettings.Pdf;           
            schedulerPdfSettings.PageTitle = "some title";
            schedulerPdfSettings.PaperOrientation = ScheduleSessionManager.IsTimelineView ? SchedulerPaperOrientation.Landscape : SchedulerPaperOrientation.Portrait;
            schedulerPdfSettings.AllowPaging = true;
            RadScheduler1.ExportSettings.OpenInNewWindow = true;
            string[] styleSheets = { "../../Content/css/scheduleExport.css" };
            schedulerPdfSettings.StyleSheets = styleSheets;
            RadScheduler1.ExportToPdf();

Veselin Tsvetanov
Telerik team
 answered on 12 Aug 2016
1 answer
80 views

Hi

I have a working treelist on the page and need to add some functionality via buttons so when one is pressed some javascript attempts to find the treelist control using the standard $find(controlname) syntax.  This fails and just returns null.  I have double checked the clientID is correct and when using document.getElementById it returns the element part so I know that is OK.

Other than this the actual control with paging etc works just fine on the page.  

Any suggestions on what might cause this?

Regards

Jon

Jon
Top achievements
Rank 1
 answered on 12 Aug 2016
8 answers
263 views

Hi

Quite tricky one to explain this but it would appear the RADHtmlChart with a Data navigator is plotting the incorrect values.

I set the datasource to a datatable which has 1353 rows. When I hover the Star label it should a tooltip with a note in it. Some work OK but others don't. Please see attached images.

 

I have noticed when I use JavaScript to get the data (instead of the dataitem) the ID column is incorrect it is using "251" and should be using 281. I have attached an image of the data table in excel.

It would appear for the pressureAltitude_129_ParameterNote it is plotting the wrong row in the datatable.

Rick
Top achievements
Rank 1
 answered on 12 Aug 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?