Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.4K+ views
Hello,
I have a radgrid with filters and I want my futur users to be able to perform ACCENT INSENSITIVE filtering.

I know this is not implemented in any version of telerik. But my client needs it so I have to do it.

Here's my solution...

In my grid, when a column can contain value with accents, I clone the column, replace all the accents ( é = e, ï = i, ù=u,...), and set the visible property of the cloned column to false (user won't see it).

Now, what i need to do is, when my user filter something, I catch the event using the ItemCommand event, I remove all the accent of the filter value ( i.e. "Pépin" = "Pepin") and perform the search on the hided column and show him the result.

My question is, how can i perform the search on the hided colum. At first, it looked very simple but I can't understand why it doesnt work.

Any help would be appreciated :D
Eyup
Telerik team
 answered on 30 Oct 2017
1 answer
59 views

I have the following code as part of FormTemplate.

<tr>
                                    <td>Body EN:
                                    </td>
                                    <td>
                                        <telerik:RadEditor ID="txtBodyEN" runat="server" Height="400px" Width="100%" ToolsFile="~/Tools.xml" Content='<%# Bind("BodyEN") %>' RenderMode="Lightweight" Skin="MetroTouch" EnableTrackChanges="false" EnableComments="false" EnableViewState="false">
                                        </telerik:RadEditor>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Body DE:
                                    </td>
                                    <td>
                                        <telerik:RadEditor ID="txtBodyDE" runat="server" Height="400px" Width="100%" ToolsFile="~/Tools.xml" Content='<%# Bind("BodyDE") %>' RenderMode="Lightweight" Skin="MetroTouch" EnableTrackChanges="false" EnableComments="false" EnableViewState="false">
                                        </telerik:RadEditor>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td></td>
                                    <td>
                                        
                                        <telerik:RadButton runat="server" ID="btnCancel" Text="Cancel" CommandName="Cancel" Skin="MetroTouch" RenderMode="Lightweight" Icon-PrimaryIconCssClass="rbCancel" UseSubmitBehavior="false" />
                                         
                                        <telerik:RadButton runat="server" ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Save" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Skin="MetroTouch" RenderMode="Lightweight" Primary="true" Icon-PrimaryIconCssClass="rbOk" UseSubmitBehavior="false" />
                                        
                                    </td>
                                </tr>

 

It works fine in IE but in Chrome it throws an exception as soon as you click the cancel button:

System.Web.HttpException: Maximum request length exceeded.

I've tried everything and none of those worked for me. 

Note: if I remove the RadEditor's from there the Cancel button works fine in Chrome too.

Thanks

P.S. I am using a trial (current version)

 

 

Jugoslav
Top achievements
Rank 1
 answered on 30 Oct 2017
1 answer
79 views

I have a radeditor inside a radgrid inside a raddataform. How do I set the image upload path for the radeditor programatically in code-behind (C#)?

 

Rumen
Telerik team
 answered on 30 Oct 2017
4 answers
309 views
Hi everybody,

I am trying to filter a column with multiple selected values.

I use <FilterTemplate> with custom RadComboBox (ComboBox + Checkbox for each line). For example, in column "Language", user can check & select "French" AND "German" in same time.

With the following code, I can easly filter for one language :

    protected void _Default_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        GridFilteringItem filterItem = (GridFilteringItem)RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem)[0]; 
        ViewState["comboValue"] = e.Value; 
        (filterItem["Language"].Controls[1] as TextBox).Text = e.Value; 
        filterItem.FireCommandEvent("Filter"new Pair("EqualTo""Language")); 
    } 
 

But how can I manage to filter for more than one language ? If I retreive two selected values by user (French + German), how can I configure filterItem ?

Perhaps it is easy to do, but I'm just a novice in Telerik API, so help is really appreciated ...

Thank you


Igor
Top achievements
Rank 1
 answered on 27 Oct 2017
3 answers
305 views
Hai ,

          I have Radgrid with 4 columns all are Radnumberictextboxes with onload , onfocus and onblur event handler in it . I tried to retain focus on the second textbox  in onblur event of the radnumeric text box becasue of invalid input by user using the following code .

<script type="text/javascript" language="javascript" >

Function Blur(sender, args) {

      var input_value = sender.GetValue() ;

        if  ( input_value    any condition   ) {
        
           var senderid = sender.get_id();
            document.getElementById(senderid).focus();
          }
                 
        }

</script>

  I get the following error when I debug in IE .

htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

  How do i retain focus using clientside script ?

  Thank you .













yakesh
Top achievements
Rank 1
 answered on 27 Oct 2017
6 answers
1.3K+ views
Hello everyone,

I see that there is a way to limit the number of file inputs with the RadAsyncUpload control but what I am trying to do is limit the user to only be able to upload 5 files. Is there a settle that will limit the user to only upload a set number of files?

-Chris
Peter Milchev
Telerik team
 answered on 27 Oct 2017
1 answer
1.8K+ views

 

I have a RADComboBox on my ASPX page as shown below:

<telerik:RadComboBox RenderMode="Lightweight" ID="cboxEmployee" runat="server" Width="400" Height="400px" AutoPostBack="false"
                  EmptyMessage="select employee here" CssClass="validationClass" OnSelectedIndexChanged="cboxAccused_SelectedIndexChanged">
                </telerik:RadComboBox>

I Bind the ComboBox with this C# code:

private void BindAccusedDropdowns()
        {
 
 
            using (PSDEntities context = new PSDEntities())
            {
                cboxEmployee.DataSource = context.LawsonEmployees.OrderBy(s => s.LAST_NAME).ToList();
                cboxEmployee.DataTextField = "DISPLAY";
                cboxEmployee.DataValueField = "EID";
                cboxEmployee.DataBind();
                cboxEmployee.AllowCustomText = true;
                cboxEmployee.MarkFirstMatch = true;
            }
        }

 The Box functions properly on the page I can select an employee.

When I attempt to get the SelectedValue of the comboBox with this code it returns a null value.

a.EID = Convert.ToInt32(cboxEmployee.SelectedValue);

 

Any idea why this happening?

Perry
Top achievements
Rank 1
 answered on 26 Oct 2017
0 answers
99 views

Hello,

I want to implement RadGrid in which i am using telerik:GridTemplateColumn to bind data to link button. I want to open another page on click of this link and pass the value of the link as query-string. can anyone help me with the example? 

Kod
Top achievements
Rank 1
 asked on 26 Oct 2017
0 answers
219 views

Hi I am using radgrid and I want to apply export excel functionality on that but when I am trying to add header using Prerender event it is not working for 

rgEnrolmentExport.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;

I need this format to remove prompt which we normally get on opening of Xls file 

So please see code 

On aspx -

 <telerik:RadGrid ID="rgEnrolmentExport" OnPreRender="rgEnrolmentExport_PreRender" runat="server" AllowPaging="false" AutoGenerateColumns="true" ExportSettings-Excel-Format="Html">
                    <ExportSettings IgnorePaging="True" OpenInNewWindow="True" ExportOnlyData="True">
                    </ExportSettings>
                </telerik:RadGrid>

on C# 

  rgEnrolmentExport.DataSource = dtExportData;
                                    rgEnrolmentExport.DataBind();

                                    DateTime obj1 = (DateTime)rdpExportDate.SelectedDate;
                                    rgEnrolmentExport.ExportSettings.FileName = "HO_Enrollment_Source_Report_" + obj1.ToString("MM.yyyy");
                                    rgEnrolmentExport.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;
                                  //  rgEnrolmentExport.ExportSettings.Excel.FileExtension = "Xlsx";
                                    rgEnrolmentExport.HeaderStyle.Font.Bold = true;
                                    rgEnrolmentExport.MasterTableView.ExportToExcel();

 

 

And in Prerender 

 

 protected void rgEnrolmentExport_PreRender(object sender, EventArgs e)
        {
            //get the current header 
           
                GridItem[] header = rgEnrolmentExport.MasterTableView.GetItems(GridItemType.Header);
                if (header.Length > 0)
                {
                    //get the current THead element 
                    DateTime obj1 = (DateTime)rdpExportDate.SelectedDate;
                    GridTHead head = ((GridTHead)header[0].Parent.Controls[0].Parent);
                    //Get the GridHeaderItem from the THead 
                    GridHeaderItem currentHeaderItem = (GridHeaderItem)head.Controls[0];
                    //Clear all GridHeaderItems 
                    head.Controls.Clear();
                    //create a new GridHeaderItem which will be the new row 
                    GridHeaderItem newHeaderItem = new GridHeaderItem(rgEnrolmentExport.MasterTableView, 0, 0);

                    // newHeaderItem.Cells.Add(new GridTableHeaderCell());


                    newHeaderItem.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem.Cells.Add(new GridTableHeaderCell { Text = "Massachusetts", ColumnSpan = 3, HorizontalAlign = HorizontalAlign.Center });


                    newHeaderItem.Cells.Add(new GridTableHeaderCell { Text = "Rhode Island", ColumnSpan = 3, HorizontalAlign = HorizontalAlign.Center });

                    //  newHeaderItem.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem.Cells.Add(new GridTableHeaderCell { Text = "New Hampshire", ColumnSpan = 3, HorizontalAlign = HorizontalAlign.Center });

                    // newHeaderItem.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem.Cells.Add(new GridTableHeaderCell { Text = "All  EMembers", ColumnSpan = 3, HorizontalAlign = HorizontalAlign.Center });

                    // head.Controls.AddAt(0, newHeaderItem);
                    GridHeaderItem newHeaderItem1 = new GridHeaderItem(rgEnrolmentExport.MasterTableView, 0, 0);
                    newHeaderItem1.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem1.Cells.Add(new GridTableHeaderCell());
                    newHeaderItem1.Cells.Add(new GridTableHeaderCell { Text = "Heating Oil Enrollment Sources Report for " + obj1.ToString("MMMMM yyyy"), ColumnSpan = 12, HorizontalAlign = HorizontalAlign.Center });


                    //Add back the GridHeaderItems in the order you want them to appear 

                    head.Controls.Add(newHeaderItem1);
                    head.Controls.Add(newHeaderItem);
                    head.Controls.Add(currentHeaderItem);
                }
            
        }

So basically if I am not applying Xlsx format it woking fine pelase see attachment it is exoporting what ever I need to do but with Xlsx format it throwing error.

So conclusion is I need to export file as I have attached in Image but in Xlsx format 

 

Manish
Top achievements
Rank 2
 asked on 26 Oct 2017
0 answers
70 views

Hello,

I have implemented RadGid with filter options. I have 2 quries:

1. How to show default text e.g "Search..." for filters for some of the columns(not All columns). 

2. When user clicks on Filter Textbox it should populate all the values for that column.

 

Kod
Top achievements
Rank 1
 asked on 26 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?