Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
Hi.
using RadControls I believe - how can I get the filter type chosen by the user on clientside, so I can do a filter based upon that.
We hit a problem with date filtering so if we do an Equals, it will not find the date since the time is not considered when performing the filtering.

Example:

telerik:GridDateTimeColumn FilterControlWidth="60px" AllowFiltering="true" AutoPostBackOnFilter="false"
                        CurrentFilterFunction="Contains" HeaderStyle-HorizontalAlign="Center" DataField="DateTime"
                        HeaderText="Date" SortExpression="DateTime" ShowFilterIcon="true" UniqueName="DateTime"
                        PickerType="DatePicker" DataFormatString="{0:g}" DataType="System.DateTime">
                         
                        <HeaderStyle Width="100px" HorizontalAlign="center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="center" Width="100px"></ItemStyle>
                    </telerik:GridDateTimeColumn>


So we have the datetimes showing.
But at this point, how can I intercept the filtering on the clientside, so I can then also get the input they have entered to filter textbox/datepicker then append say "00:00:00" to that value, finally doing the filter.

how can I do this?
Pavlina
Telerik team
 answered on 05 Apr 2012
1 answer
80 views
Using RadControls I believe.
We have a DateTimePicker and need to do custom filtering on Date only.
I have implemented the code on the ItemCommand event and then I filter a dataset and then finally set the datasource to the grid and bind. I know there are results in there but the grid shows "no results"

any ideas?
<telerik:GridDateTimeColumn FilterControlWidth="60px" AllowFiltering="true" AutoPostBackOnFilter="false"
                        CurrentFilterFunction="Contains" HeaderStyle-HorizontalAlign="Center" DataField="DateTime"
                        HeaderText="Date" SortExpression="DateTime" ShowFilterIcon="true" UniqueName="DateTime"
                        PickerType="DatePicker" DataFormatString="{0:g}" DataType="System.DateTime">
                         
                        <HeaderStyle Width="100px" HorizontalAlign="center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="center" Width="100px"></ItemStyle>
                         
                    </telerik:GridDateTimeColumn>


Code:

Protected Sub grdShiftObservation_OnItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grdShiftObservation.ItemCommand
 
        If e.CommandName = RadGrid.FilterCommandName Then
 
            Dim filterPair As Pair = DirectCast(e.CommandArgument, Pair)
 
            Select Case filterPair.Second.ToString()
                Case "DateTime"
                    Dim filterOption As String = CType(e.CommandArgument, Pair).First
 
                    Dim filterItem As GridFilteringItem = CType(e.Item, GridFilteringItem)
                    Dim currentPattern As String = CType(filterItem(CType(e.CommandArgument, Pair).Second).Controls(0), RadDatePicker).SelectedDate
 
                    If Not String.IsNullOrEmpty(currentPattern) Then
                        Dim dt As DateTime = Convert.ToDateTime(currentPattern)
 
                        Dim dtFromString As String = dt.ToString("MM/dd/yyyy") & " 00:00:00" ' i.e the date they selected in the picker
                        Dim dtToString As String = dt.AddDays(1).ToString("MM/dd/yyyy") & " 00:00:00"
 
                        Dim filterPatternAssist As String = String.Empty
                        Dim dateColumn As GridBoundColumn = CType(e.Item.OwnerTableView.GetColumnSafe("DateTime"), GridBoundColumn)
 
                        Select Case filterOption
                            Case "EqualTo"
                                dtFromString = "DateTime >= #" & dtFromString & "# AND DateTime < #" & dtToString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.EqualTo
                            Case "NotEqualTo"
                                dtFromString = "Not DateTime = #" & dtFromString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.NotEqualTo
                            Case "GreaterThan"
                                dtFromString = "DateTime > #" & dtFromString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThan
                            Case "LessThan"
                                dtFromString = "DateTime < #" & dtFromString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.LessThan
                            Case "GreaterThanOrEqualTo"
                                dtFromString = "DateTime >= #" & dtFromString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThanOrEqualTo
                            Case "LessThanOrEqualTo"
                                dtFromString = "DateTime <= #" & dtFromString & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.LessThanOrEqualTo
                            Case "Between"
                                dtFromString = "#" & dtFromString & "' <= DateTime AND DateTime <= #" & filterPatternAssist & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.Between
                            Case "NoFilter"
                                dtFromString = String.Empty
                                dateColumn.CurrentFilterFunction = GridKnownFunction.NoFilter
                            Case "NotBetween"
                                dtFromString = "DateTime <= #" & dtFromString & "' OR DateTime >= #" & filterPatternAssist & "#"
                                dateColumn.CurrentFilterFunction = GridKnownFunction.NotBetween
                            Case "IsNull"
                            Case "NotIsNull"
                            Case "Contains"
                                dtFromString = String.Empty
                                dateColumn.CurrentFilterFunction = GridKnownFunction.NoFilter
                        End Select
 
                        FilterGrid(dtFromString)
 
                    End If
            End Select
 
        End If
 
    End Sub
 
 
    Private Sub FilterGrid(ByVal strFilter As String)
        Dim ds As DataSet = GetData()
 
        Dim dvFilter As DataView = ds.Tables(0).DefaultView
        dvFilter.RowFilter = strFilter
 
        grdShiftObservation.DataSource = dvFilter.ToTable()
        grdShiftObservation.DataBind()
    End Sub


I know dvFilter.ToTable() at this point shows me say 5 rows filtered but when the grid is displayed, it shows no results.

what am I doing wrong? How else can I show the filtered results? I am trying to fix lack of support on the control which does not filter datetime values with date only specified hence the customisation above.
Pavlina
Telerik team
 answered on 05 Apr 2012
4 answers
112 views
I've implemented the solution described here already: http://www.telerik.com/help/aspnet-ajax/grid-resizing-in-splitter.html.

However there are a number of drawbacks.  Are there any other options for implementing a resizable RadGrid?
msigman
Top achievements
Rank 2
 answered on 05 Apr 2012
9 answers
220 views
Hi,
Is there a way to trap double click event on server-side event? I need to trap single click and double click to make a different action depending on what event is called.

Thank you!
Peter
Telerik team
 answered on 05 Apr 2012
11 answers
594 views
How do I prevent user from making duplicate entries in a given time slot? I am in timeline and resourceview.
Peter
Telerik team
 answered on 05 Apr 2012
1 answer
99 views
is it possible to set 100% height on the panelbar for MultipleExpandedItems. I want a UI style in which i have a panelbar occupying 100% height with multipleexpandeditems mode. There can be 2-3 panelitems inside that and inside each panelitem there would be a treeview control which should also occupy 100% height of that panelitem. In such a way that scrollbars of treeview are visible and not of the panelitem. I tried but somehow 100% was not working. Is this a known limitation or any workarounds exists?
Peter
Telerik team
 answered on 05 Apr 2012
4 answers
136 views
Hi!

We customized the button by modifying the ButtonSprites file with the below CSS. Everything seems to work for the most part, but we can't seem to get access to the image at the right. CustomizedSearchButton.PNG shows the result of the CSS change (using the file ButtonSprites.png as the background.) We did attempt to see where the button is pulling from in the file ButtonSprites2.png -- however, it appears that the right side of the button does not use any part of this file. We did skin the app with the Windows 7 theme, but we want to override the background image.

Is this possible? Where is it pulling the right side of the button from?

Thanks!
Michael

.button .rbSkinnedButton,
.button .rbDecorated,
.button .rbVerticalButton,
.button .rbVerticalButton .rbDecorated,
.button .rbSplitRight,
.button .rbSplitLeft
{
    background: #EBEFF3 url('/Images/ButtonSprites.png') no-repeat 0px !important;
}
Bozhidar
Telerik team
 answered on 05 Apr 2012
1 answer
86 views
Hi,

we evaluate the use of the RadEditor in our SharePoint-Site. How can I set the localization to German? I've seen many code snippets how to set the language in aspx-files, and tried to mimic this in the config files, but adding the following line to the ListConfigFile and the ConfigFile did not have the indended result:

 <property name="Language">de-DE</property><BR>

Is there another way for setting the localization?

Thanks for your help.

Phil
Rumen
Telerik team
 answered on 05 Apr 2012
2 answers
143 views
Hi. I am currently using the following version of the Telerik Asp.Net Ajax Controls.
Latest Version: 2008.1 619 (Jun 19, 2008)

We have developed a site for a number of customers, which has been running with no problems that we are aware of. Our largest customer has decided to opt in to an extra feature of the site which was developed with Ajax and the Ajax tools, and are not having any luck.

They are a large financial institution and all of their web access is through IBM's Tivoli Access Manager and WebSEAL.

We have ascertained that if they access the site directly and do not go through WebSEAL, the site will run fine. We are struggling to assist because we do not have any environment to replicate this, and we cannot replicate the error.

I am hoping that perhaps someone in Telerik or another client will have had an issue similar to this in the past and may be able to offer assistance either for something we could change in our code, or they could change in Tivoli, which would enable the Telerik controls to work ok.

The specific error they are encoutering is as follows (I have had to doctor some information out).

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.4506.2152; InfoPath.2)
Timestamp: Thu, 14 Jan 2010 02:12:34 UTC


Message: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 2315
Char: 38
Code: 0
URI: https://(url)/scorecards/ScriptResource.axd?d=R0bFhK1fXkO_u_1ND_MnI5zGjo6qe9AMiWiYcDgZMvcQqcFKSMcWnN6Rg15M424TRdoMj3jGo0oG1Klx1GKwh4XtmtKTKJU_AonPyESlIck1&t=29b7d1be


Message: Sys.ScriptLoadFailedException: The script 'https://(url)/ScriptResource.axd?d=-CpKS_w9Jn52W9DEhyeaJlJbUB34Wy82Vmu1hMRS_hkCWRHHuhZJnVMIMw2AQuSC0&t=344eddc1' failed to load. Check for:
 Inaccessible path.
 Script errors. (IE) Enable 'Display a notification about every script error' under advanced settings.
 Missing call to Sys.Application.notifyScriptLoaded().
Line: 1266
Char: 13
Code: 0
URI: https://(url)/scorecards/ScriptResource.axd?d=R0bFhK1fXkO_u_1ND_MnI5zGjo6qe9AMiWiYcDgZMvcQqcFKSMcWnN6Rg15M424Twx3LUtPeER_Er6qayxuF1YZzRzExihQwafjYTIDKizqHvytkxF1Dmlxk-efuErtS0&t=29b7d1be

Kind Regards,
Mike
Erik
Top achievements
Rank 1
 answered on 05 Apr 2012
1 answer
87 views

Hi,

For many grids in our project, there are around 40 columns, so we were trying to use the gridpersister to save the settings for individual user, so that the user can customize the number of columns they want to see everytime.
Saving and loading grid setting works fine. The problem is when the user tries to hide thie column from the header contextmenu, the arrangement of the columns are lost. I have used wrap="false" for Column header and Item properties in the gid. After hiding 1 or 2 column, most of the headers and coluns are wrapped.
The problem is very prominent in IE7, almost all the columns and all the row data are wrapped. I am using the following code for columns. I cannot use fixed width header as my coulmn values vary from 40 to 400 characters and I don't want white space in the column.



<HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Left"  />
<ItemStyle Wrap="False" VerticalAlign="Top" HorizontalAlign="Left"/>
Please suggest what to do.
kachy
Top achievements
Rank 1
 answered on 05 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?