Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
Hi,

I have localization set to fr-LU. The purpose is to display the dates using the European format. However, I want to keep everything in English. So, when the control's calendar pops up, it has french names for the months, days, etc.  Is there a way to force control to use my localization settings for displaying the date format, but to force it to use English language only?

Thank you.
Tsvetina
Telerik team
 answered on 04 May 2011
3 answers
122 views
Hello !

    I would like to know how to display an invalid message in a radtextbox when values are not what we expected.

i got a synergieTextbox that herites from a radtextbox and overload the load method:

 

 

 

protected override void OnLoad(System.EventArgs e)
  
{
  
 base.OnLoad(e);
  
 this.InvalidStyle.BackColor = Color.Yellow;
  
 this.ClientEvents.OnLoad = "fnOnUpdateValidators";
  
 this.ClientEvents.OnValueChanged = "fnOnUpdateValidators";
  
}


i got my textbox here :

 

 

 

<syn:SynergieTextBox  CausesValidation="true"  Width="300px"

 Text='<%# Eval("FirstName") %>'
ID="txtFirstName" runat="server">

</syn:SynergieTextBox>


and the javascript here :

 

function

 

 

fnOnUpdateValidators(sender, eventArgs) {

 

 

 

 

 

if (typeof (Page_Validators) != "undefined") {

 

 

 

 

 

    for (var i = 0; i < Page_Validators.length; i++) {

 

 

 

 

 

        var val = Page_Validators[i];

 

 

 

 

 

        var ctrl = document.getElementById(val.controltovalidate);

 

 

 

 

 

        if (ctrl != null && sender != null) {

 

 

 

 

 

            if (sender._clientID == ctrl.id) {

 

 

 

 

 

                if (!val.isvalid) {

 

 

                    sender._invalid =

 

 

true;

 

 

                    sender.updateCssClass();

 

 

 

 

                    break;

 

 

                }

 

 

 

 

                else {

 

 

                    sender._invalid =

 

 

false;

 

 

                    sender.updateCssClass();

 

                    }

 

                }

 

            }

 

        }

 

    }

 

}


I would like to add text like sender.MyInvalidText = Val.ErrorMessage;

how to do something like that ?

Maria Ilieva
Telerik team
 answered on 04 May 2011
1 answer
46 views
When I export to excel with the command button in the footer (bottom), there are two small grey command button squares on the exported excel sheet.  How do I stop this from happening.  All else is perfect

Andrew
Princy
Top achievements
Rank 2
 answered on 04 May 2011
1 answer
54 views
Hello,

I am having a problem when I use GroupLoadMode="Client" and HierarchyLoadMode="Client" with a RadGrid. The problem is that when I expand a group, all of the group's row's detail tables expand as well.

Is there a setting to stop this or any way to work around this? Fetching the data in our real life application is costly so the client modes are the only acceptable ones for the scenario.

The markup looks like below and is being fed data from a dataset, also shown below.
<telerik:RadGrid ID="RadGrid1" runat="server">
    <MasterTableView DataMember="Employee" DataKeyNames="ID"  GroupLoadMode="Client" HierarchyLoadMode="Client" GroupsDefaultExpanded="false">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="Location" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="Location" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <DetailTables>
            <telerik:GridTableView DataMember="EmployeeProperties" DataKeyNames="ID">
                <ParentTableRelation>
                    <telerik:GridRelationFields MasterKeyField="ID" DetailKeyField="EmployeeID" />
                </ParentTableRelation>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
</telerik:RadGrid>

protected override void OnInit(EventArgs e)
{
    RadGrid1.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
    RadGrid1.DetailTableDataBind += new Telerik.Web.UI.GridDetailTableDataBindEventHandler(RadGrid1_DetailTableDataBind);
    base.OnInit(e);
}
 
void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
    DataSet ds = GetDataSource();
    e.DetailTableView.DataSource = ds;
}
 
void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    DataSet ds = GetDataSource();
    RadGrid1.DataSource = ds;
}
 
private DataSet GetDataSource()
{
    DataSet ds = new DataSet();
    DataTable employee = ds.Tables.Add("Employee");
    DataTable employeeProperties = ds.Tables.Add("EmployeeProperties");
 
    var empKey = employee.Columns.Add("ID", typeof(int));
    employee.Columns.Add("FullName", typeof(string));
    employee.Columns.Add("DepartmentID", typeof(string));
    employee.Columns.Add("Location", typeof(string));
 
    var empPKey = employeeProperties.Columns.Add("ID", typeof(int));
    var empPFK = employeeProperties.Columns.Add("EmployeeID", typeof(int));
    employeeProperties.Columns.Add("Title", typeof(string));
    employeeProperties.Columns.Add("Value", typeof(string));
 
    employee.PrimaryKey = new[] { empKey };
    employeeProperties.PrimaryKey = new[] { empPKey };
    ds.Relations.Add(new DataRelation("rel", empKey, empPFK));
 
    employee.Rows.Add(new object[] { 1, "Scott Smith", 1, "Sweden" });
    employee.Rows.Add(new object[] { 2, "Adam West", 1, "Sweden" });
    employee.Rows.Add(new object[] { 3, "John Doe", 2, "Norway" });
    employee.Rows.Add(new object[] { 4, "Sven Svensson", 2, "Norway" });
    employee.Rows.Add(new object[] { 5, "Anders Andersson", 3, "Finland" });
    employee.Rows.Add(new object[] { 6, "Jane Doe", 3, "Finland" });
    employee.Rows.Add(new object[] { 7, "Stan Smith", 4, "United States of America" });
 
    int i = 0;
    foreach (DataRow emp in employee.Rows)
    {
        string[] s = ((string)emp["FullName"]).Split(new[] { ' ' });
        employeeProperties.Rows.Add(new object[] { ++i, (int)emp["ID"], "GivenName", s[0] });
        employeeProperties.Rows.Add(new object[] { ++i, (int)emp["ID"], "GivenName", s[1] });
    }
 
    return ds;
}

Regards,
Fredrik Hult
Martin
Telerik team
 answered on 04 May 2011
1 answer
40 views
Hello,
Why after tab load a page changes its appearence.
It resize everything incliudes parents of tab control

regards
Cat Cheshire
Top achievements
Rank 1
 answered on 04 May 2011
1 answer
90 views
I have six radtab in RadTabStrip.
which one i click that particular one i give value for the purpose of save.

for ie
6 radtab 4 only opened that 4 only saved how i set the value

Thanks,
Mohamed.
mohamed
Top achievements
Rank 1
 answered on 04 May 2011
1 answer
107 views

hi all
i have a little problem with radalert method, i am trying to open an alert with an asp button, try with register startup script but this dont work as expected

somebody have an example that can show me


regards
thx
Princy
Top achievements
Rank 2
 answered on 04 May 2011
1 answer
130 views
Hello,

   Can you tell me how to find reference to a RadDatePicker control that resides in the EditFormSettings of a RadGrid on client side javascript for validation purposes. I have spent quite some time browsing the forums and other online help  but can't find the answer.

I need this on the OnClientClick event of a button control, I have tried attaching the event from the code behind but it is not behaving correctly. So i want to get the reference to the control on client side itself.

Please Help!!!

Thanks,
Kavitha
Shinu
Top achievements
Rank 2
 answered on 04 May 2011
1 answer
127 views
Hi ..

I'm Facing a problem in my RadGrid which is :

SessionDataSource used in all Edit forms in all demos ... and it is using primarykeyfields and a ( ? ) symbol which gets the selected index DataKeyValue ...

Unfortunately this property ( primarykeyfields  ) does not exist in SqlDataSource .

I'm working on SqlDataSource on my project and I want to use the insert/update/delete commands which use CommandName and SqlDataSource

so..

any help for this problem .... I will be thankful
Shinu
Top achievements
Rank 2
 answered on 04 May 2011
1 answer
62 views
Hello guys.

I'm trying to use self hierarchy, but, I'm having problems. My grid is showing a regristry 2 times in the grid, like:

file1.jpg
file2,jpg
file3.jpg
file3.jpg
file4.jpg
file5.jpg
file6.jpg
file5.jpg
file6.jpg

I'm using this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

What can be wrong?

Regards.
Shinu
Top achievements
Rank 2
 answered on 04 May 2011
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
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
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?