Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
524 views
Hello,

I have a Hierarchical RadGrid with 3 Detail tables nested inside. I'd like to know if it's possible to hide the tables if they have no records instead of showing them with the "No child records to display." message?

Note: I do not want to do this: http://www.telerik.com/help/aspnet-ajax/grdhideexpandcollapseimageswhennorecords.html. I just need to hide tables that might have no records, but one will always have records.

Thanks!
Caleb
Top achievements
Rank 1
 answered on 24 Sep 2012
1 answer
92 views
Hi  ,

My code is below.

  protected void rgDocumentType_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
   TextBox tbFilter=null;
                AjaxControlToolkit.FilteredTextBoxExtender ftExtender;
                if (e.Item is GridFilteringItem)
                {
                    GridFilteringItem fItem = (GridFilteringItem)e.Item;
                    foreach (GridColumn col in rgDocumentType.MasterTableView.Columns)
                    {
                        
                    
                        if (Convert.ToString(col.UniqueName).Equals("colIsModified") == false && Convert.ToString(col.UniqueName).Equals("colActive") == false && Convert.ToString(col.UniqueName).Equals("colCONCUR_ID") == false && Convert.ToString(col.UniqueName).Equals("colRemark") == false)
                        {
                            
                              tbFilter  = fItem[col.UniqueName].Controls[0] as TextBox;
                              tbFilter.ID = col.UniqueName;
                              ftExtender = new AjaxControlToolkit.FilteredTextBoxExtender();
                               ftExtender.TargetControlID = tbFilter.ID;
                               ftExtender.FilterMode = AjaxControlToolkit.FilterModes.InvalidChars;
                               ftExtender.FilterType=AjaxControlToolkit.FilterTypes.Custom|AjaxControlToolkit.FilterTypes.Numbers|AjaxControlToolkit.FilterTypes.LowercaseLetters | AjaxControlToolkit.FilterTypes.UppercaseLetters;
                               ftExtender.InvalidChars = @"%!&;`'\|*?~<>^()[]{}$&quot;";
                               tbFilter.Controls.Add(ftExtender);

                               col.CurrentFilterFunction = GridKnownFunction.Contains;
                               col.AutoPostBackOnFilter = true;

                              
                              
                               ftExtender = null;
                               tbFilter = null;
                            

                                                      
                        }
                       
                    }
                } 


}

This code is used for blocking some special characters in the filter textbox Also prevent pasting.
I set the current filter function here But when clicking on the filter menu button it does not work?

Thanks & Regards
Anzar.M
Eyup
Telerik team
 answered on 24 Sep 2012
3 answers
162 views
Hi,

I have to set current filter function at run time and when i click on the filter button it take the currently setted filter function.

Thanks & Regards
Anzar.M
Eyup
Telerik team
 answered on 24 Sep 2012
1 answer
98 views
Hi there,

I have a kendo grid which binds into  a datatable (it has to bind into a datatable as I do not know which columns i am expecting)
It seems like when binding a grid to a datatable, date columns are not being recognized as dates, and rendered as strings. So no filtering, sorting or formatting, and the date is being displayed in the json string format: /Date(1348489271318)/

The mark up is as follows:
    @{ Html.Kendo().Grid(Model.GridModel)
        .Name("Grid")
        .Columns(columns =>
        {
            foreach (System.Data.DataColumn column in Model.GridModel.Columns)
            {              
                var c = columns.Bound(column.DataType, column.ColumnName).Title(column.Caption);
             
                 if (column.ColumnName == "DateAdded")
                {                   
                    c.Format("{0:dd/MM/yyyy hh:mm}");
                 }
            }
        })

Once I change the datasource into a class model, then everything works fine, the dates are rendered as dates with the correct format, filtering and sorting.

Any ideas why column of datatype date is getting rendered as a string?
Thanks
N
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Sep 2012
2 answers
104 views

Hi 

I have an asp drop down list with a list of years 12/13 11/12 10/11,

I want to know how if a user picks 11/12 it changes the year of the radscheduler to the year 2011. 

so far on page load it just gives you the current day,month and year.


cheers

John M


John
Top achievements
Rank 1
 answered on 24 Sep 2012
1 answer
82 views
  Sir,
                I have a grid ,contains 5 ckeckbox template columns , any check box is clicked 6th check box  value is changed in clientside.
Pls help me . we are telerick customer.
          By Seban.
 
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Sep 2012
1 answer
58 views
Hello
I've a listview,
The datasource is a dataset builded like that:

Dim dataSet As DataSet = New DataSet
Dim dtPart As DataTable = New DataTable("Products")
dtPart.Columns.Add("id", Type.GetType("System.String"))
dtPart.Columns.Add("name", Type.GetType("System.String"))
dtPart.Columns.Add("brand", Type.GetType("System.String"))
dtPart.Columns.Add("price", Type.GetType("System.Double"))


then I ve a method to sort it by price:

Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim expression As New RadListViewSortExpression()
        listview .SortExpressions.Clear()
        expression.FieldName = "price"
        expression.SortOrder = RadListViewSortOrder.Ascending
        listview.SortExpressions.AddSortExpression(expression)
        listview .Rebind()

End Sub

My issue is it sort by price considering the column as string. For instance:

30 will be greater than 200

How can I tell the sortexpressions that it sort decimals?

Thanx 
Andrey
Telerik team
 answered on 24 Sep 2012
5 answers
100 views
On our site we have javascript that uses the ScrollIntoView(), but when the RadEditor loads, after ScrollIntoView has been called and the screen is in the correct place, it scrolls the user back up to the RadWindow.
Is there any way to disable the RadEditor from scrolling the screen back up?
Or is there a way I can call our scroll code again once the RadEditor has loaded?
Thanks,
Edward
Rumen
Telerik team
 answered on 24 Sep 2012
1 answer
201 views

Hi,

  we are trying to bind the recurrence rule from javascript.

Upon saving , we are taking the recurrence rule from javascript and saving it to database. On taking the recurrence rule it is shown as "DTSTART:20120927T000000Z  DTEND:20120927T000000Z  RRULE:FREQ=WEEKLY;UNTIL=20120928T000000Z;INTERVAL=1;BYDAY=WE,SU;WKST=".
We are saving this value in db.

After that on the client form created we are taking the appointment details corresponding to this appointment id using one service call and we are getting the values in javascript.

After that we are trying to bind this value to controls.

So for binding recurrence rule we are using the below given code.

var rrule = Telerik.Web.UI.RecurrenceRule.parse(apt1.get_recurrenceRule());    
var editor = $find("<%=AppointmentRecurrenceEditor.ClientID%>");
editor.set_recurrenceRule(rrule);
 Here recurrence is not binding when we alerted the value of "rrule" it is shown as "null"

After that we tried like setting the rule as such in set method like

var editor = $find("<%=AppointmentRecurrenceEditor.ClientID%>");
editor.set_recurrenceRule("DTSTART:20120927T000000Z  DTEND:20120927T000000Z  RRULE:FREQ=WEEKLY;UNTIL=20120928T000000Z;INTERVAL=1;BYDAY=WE,SU;WKST=");

In this case we are getting an error like "TypeError: i.get_pattern is not a function".

Please advice us on how to proceed in this case..


Thanks.


Boyan Dimitrov
Telerik team
 answered on 24 Sep 2012
1 answer
58 views
I have asp.net 4.0 MVC (ASPX) application using the RadGrid. I created an EnityDataSource which populates the Grid  just fine when the aspx page loads. The pager at the bottom of the grid gets set up wonderful with total pages, page numbers etc and so forth.

When I click on Page "2" the grid just refreshes with the intial load ( the first page of results).  As I understand, paging is done on database level. Okay fine. For the life of me, I don't know how, where or if I need to pass the current page, the "next page number" and whatever else to get the paging to work proplerly.  
Andrey
Telerik team
 answered on 24 Sep 2012
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
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
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?