Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
214 views
Problem in 2009.3.1210.35

I have RadTextBox without specifying SelectionOnFocus but it seems it's behaving like as if SelectionOnFocus  is set to CaretToEnd.
Setting SelectionOnFocus to None does not fix the issue.

Update:  Problem is fixed in  2009.3.1503.35 .
Pavlina
Telerik team
 answered on 10 Mar 2010
2 answers
86 views
Hi guys,

I have a radgrid with shows the page size at the bottom, allowing users to change it to various values.
If my grid has let's say 7 items in it and the page size is 5 then everything works. If I then change the page size to 10, the grid will show all items but the pagesize dropdown dissapears completely. How can i make sure it is always displayed ?
Andrei Dragotoniu
Top achievements
Rank 1
 answered on 10 Mar 2010
1 answer
101 views
Hello,

This is an interesting problem i think. We are taking "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)." error. We have a code block like this:

<table>
<tr>
<td>
<%="Example Here" %>
</td>
</tr>
</table>

<telerik:RadDockLayout runat="server" ID="rdlGallery" OnSaveDockLayout="rdlGallery_SaveDockLayout" OnLoadDockLayout="rdlGallery_LoadDockLayout">
   <telerik:RadDockZone runat="server" ID="rdzGallery" Width="600" MinHeight="100" Orientation="Horizontal"></telerik:RadDockZone>
</telerik:RadDockLayout>


Pero
Telerik team
 answered on 10 Mar 2010
1 answer
207 views
Some of the Unicode symbols from the RAD Editor works fine where as some do not. Please see the attached screenshot.

Thanks
Mayuresh
Rumen
Telerik team
 answered on 10 Mar 2010
5 answers
180 views
Hi,

I'm working on implementing a scheduler/clock in&out system.

I'm binding client side through web services to a scheduler grouped by Users (so I have multiple columns one for each employee and in those columns I'm displaying their clock in and outs).

I want to implement a filter so you can view 1,2,3,4 etc users at a time instead of all of them.  I have a multi-select combobox above the scheduler which I grab the values from client side then do a client side rebind and capture the OnClientAppointmentsPopulating event then override the SchedulerInfo class to pass an extra parameter (the users which I want to view) and then store that in the session and access it in the controller.

This is all working fine and when I do the filter I can see that only the data for the particular users is returned and the appointments for the other users disappear from the calendar BUT the columns for each user (resource) are still there just empty with no appointments since I filtered those out.  Is it possible to hide those empty columns as well so those users do not show? Is this possible client side?  Not even sure I think I may be asking for too much...

I attached a  picture to clarify what I'm looking for...each user has their own column...I want to be able to filter the data (got this part working) and only show 1-2 columns at a time (not working after I get filtered data all columns stay just appointments disappear)

T. Tsonev
Telerik team
 answered on 10 Mar 2010
3 answers
141 views
I have just implemented CustomPaging to my RadGrid, but now I seem to have broken sorting and filtering, as well as the fact that I can't get it to display the records in REVERSE order straight from the db (99,98,97,etc... the Order By [errDate] Desc doesn't seem to be doing exactly what I'm looking for).

Here is my Grid
<telerik:RadGrid ID="RadGrid1" PageSize="15" AllowFilteringByColumn="true" runat="server" 
            AutoGenerateColumns="false" AllowAutomaticDeletes="false" AllowAutomaticUpdates="false" 
            AllowAutomaticInserts="false" AllowSorting="true" AllowPaging="true" AllowCustomPaging="true" 
            OnNeedDataSource="RadGrid1_NeedDataSource"> 
            <MasterTableView TableLayout="Auto" DataKeyNames="ID"> 
                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" /> 
                <ItemStyle Wrap="False" /> 
                <NoRecordsTemplate> 
                    No Errors Logged at this time 
                </NoRecordsTemplate> 
                <NestedViewTemplate> 
                    <fieldset> 
                        <legend style="font-size: 14px; font-weight: bolder;">Error Details</legend> 
                        <table> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    Error URL: 
                                </td> 
                                <td style="width: 100%;"> 
                                    <%#DataBinder.Eval(Container.DataItem, "errURL")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    Error Source: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errSource")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    Exception: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errEx")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    Stack Trace: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errStack")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    Additional Notes: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errNotes")%> 
                                </td> 
                            </tr> 
                        </table> 
                    </fieldset> 
                    <fieldset> 
                        <legend style="font-size: 14px; font-weight: bolder;">User Details</legend> 
                        <table> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    User Name: 
                                </td> 
                                <td style="width: 100%;"> 
                                    <%#DataBinder.Eval(Container.DataItem, "errUser")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    User IP Address: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errIP")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    User Browser: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errBrowser")%> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td style="white-space: nowrap;"> 
                                    User Operating System: 
                                </td> 
                                <td> 
                                    <%#DataBinder.Eval(Container.DataItem, "errOS")%> 
                                </td> 
                            </tr> 
                        </table> 
                    </fieldset> 
                    <div style="height: 20px;"> 
                        &nbsp;</div> 
                </NestedViewTemplate> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="ID" HeaderText="Error" UniqueName="ID" /> 
                    <telerik:GridBoundColumn DataField="errUser" HeaderText="User" UniqueName="errUser" /> 
                    <telerik:GridTemplateColumn DataField="errMessage" HeaderText="Message" UniqueName="Message"> 
                        <ItemTemplate> 
                            <asp:Label ID="lblMessage" runat="server" Text='<%# ShortenField(DataBinder.Eval(Container.DataItem, "errMessage")) %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn Reorderable="true" DataField="errDate" HeaderText="Date" 
                        UniqueName="Date"> 
                        <ItemStyle Width="100px" /> 
                        <ItemTemplate> 
                            <asp:Label ID="lblDate" runat="server" Text='<%# FormatDate(DataBinder.Eval(Container.DataItem, "errDate")) %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 

And my Code Behind
Partial Class App_Windows_Admin_Windows_Health_Monitor_Admin 
    Inherits System.Web.UI.Page 
 
    Function FormatDate(ByVal input As DateTime) As String 
        Return Format(input, "MMMM dd, yyyy") 
    End Function 
 
    Function ShortenField(ByVal input As String) As String 
        If input.Length > 50 Then 
            Return input.Substring(0, 50) & "..." 
        End If 
    End Function 
 
    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit 
        If Not Page.IsPostBack Then 
            Dim HealthMonitorDC As New DAL.HealthMonitorDataContext 
            VirtualItemCount = Integer.Parse(HealthMonitorDC.bt_HealthMonitor_GetRecordCount().ReturnValue) 
        End If 
    End Sub 
 
    Private Shared VirtualItemCount As Integer 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) 
 
 
        RadGrid1.MasterTableView.VirtualItemCount = VirtualItemCount 
        RadGrid1.VirtualItemCount = VirtualItemCount 
 
        Dim startRowIndex As Integer = (RadGrid1.CurrentPageIndex * RadGrid1.PageSize) 
        Dim maximumRows As Integer = RadGrid1.PageSize 
 
        Dim HealthMonitorDC As New DAL.HealthMonitorDataContext 
 
        Dim r = HealthMonitorDC.bt_HealthMonitor_GetAll(startRowIndex, maximumRows) 
        RadGrid1.DataSource = r 
    End Sub 
 
End Class 
 

My SQL Queries look like this

ALTER PROCEDURE [dbo].[bt_HealthMonitor_GetRecordCount] 
 
AS 
SET NOCOUNT ON 
 
return (Select Count(ID) As TotalRecords From bt_HealthMonitor) 
 

And

 
ALTER PROCEDURE [dbo].[bt_HealthMonitor_GetAll] 
( 
        @StartRowIndex      int, 
        @MaximumRows        int 
) 
 
AS 
SET NOCOUNT ON 
 
Select 
    RowNum, 
    [ID], 
    [errEx], 
    [errURL], 
    [errSource], 
    [errUser], 
    [errMessage], 
    [errIP], 
    [errBrowser], 
    [errOS], 
    [errStack], 
    [errDate], 
    [errNotes] 
From 
    (Select 
        [ID], 
        [errEx], 
        [errURL], 
        [errSource], 
        [errUser], 
        [errMessage], 
        [errIP], 
        [errBrowser], 
        [errOS], 
        [errStack], 
        [errDate], 
        [errNotes], 
        Row_Number() Over(Order By [ID]) As RowNum 
        From dbo.[bt_HealthMonitor] t)  
As DerivedTableName 
Where RowNum Between @StartRowIndex And (@StartRowIndex + @MaximumRows) 
     
Order By [errDate] Desc 

Any advice on this would be greatly appreciated, thanks.





Iana Tsolova
Telerik team
 answered on 10 Mar 2010
1 answer
198 views
I am using the following code:

                           Dim o_Grid As New Telerik.Web.UI.RadGrid 
 
                            o_Grid.ID = o_I.GUID.ToString 
                            o_Grid.AllowPaging = o_Table.Rows.Count > 10 
                            o_Grid.ShowStatusBar = o_Table.Rows.Count > 10 
                            o_Grid.Width = Unit.Percentage(100) 
                            o_Grid.RegisterWithScriptManager = True 
                            o_Grid.EnableEmbeddedScripts = True 
 
                            AddHandler o_Grid.NeedDataSource, AddressOf _GridsNeedDataSource 
                            AddHandler o_Grid.PageIndexChanged, AddressOf _GridsPageIndexChanged 
                            AddHandler o_Grid.ColumnCreated, AddressOf _GridsColumnCreated 
 
                            Debug.WriteLine(String.Format("Grid.UniqueID: {0}", o_Grid.UniqueID)) 
 
                            o_SerialNumbers.Controls.Add(o_Grid) 
 
                            o_Proxy.AjaxSettings.AddAjaxSetting(o_Grid, o_Grid) 

to dynamically, programmatically add a number of different grids to a Web Content Form during the Page_Load

Fine and dandy.

The Initial .NeedDataSource is fired and the grids are populated correctly, paging enabled/disabled etc.
Here comes what I have not been able to get to work.

Once I click the page "2" button or the "next page" etc ... the AjaxRequest fires correctly but no NeedDataSource or PageIndexChanged ... I can't wrap my head around it.

Bout the second problem I've had in 5y of using Telerik and not being able to figure out a solution by reading the documentation, forums, kb etc.

Anybody have any idea ?

o_Proxy = RadAjaxManagerProxy
o_SerialNumbers = RadAjaxPanel
Pavlina
Telerik team
 answered on 10 Mar 2010
4 answers
184 views
Hello,
If I enter "30/22/09" into the first control in this demo, it gets updated to be "9/30/2022" rather than displaying an error indicating the date is invalid. If I enter "9", it gets changed to "8/9/2009". Is there a way to disable this and just show this as an invalid date?
Thanks
-marcos
sara r
Top achievements
Rank 1
 answered on 10 Mar 2010
3 answers
132 views
I am having a problem overlaying the RadWindow on top of a mapping java applet in Firefox and Chrome (it works OK in IE). The behaviour showing is that the border of the frame is hidden behind the applet but the content of the window is showing correctly. I have tried playing with the z-index of various css classes such as ".RadWindow .rwTopResize" but without success.

Any help in getting around this would be much appreciated.

Thanks in advance, Carl
Svetlina Anati
Telerik team
 answered on 10 Mar 2010
6 answers
220 views
Hi everyone
I'm fighting with this issue for quite a long time now, and so I thought this would be the right place to ask a question regarding this little issue.

Every time I try to cache data with the System.Web.Caching.Cache property, I get the 'Controls cannot be ajaxified after Page PreRender.'-error at the line where I call AddAjaxSettings on the RadAjaxManager. When I remove the caching lines, everything just works fine. I sincerely do not know why the usage of the Cache property causes the AjaxManager to throw an exception. 

The following describes the faulty scenario:
I have a RadTreeView in the Master page. When a node of it is dropped, some data I want to cache is loaded into a RadGrid which is placed in the Default.aspx page. After this step the thing crashes (the first time - the data is not in the cache yet - it loads the data into the grid; the second time - data is in the cache now - it throws the abovementioned exception). The caching code is actually very simple:
BindingList<string> strings = Cache["LotsOfItems"] as BindingList<string>; 
if (strings == null) 
{ 
    strings = MyClass.GetLotsOfStrings(); 
    Cache.Insert("LotsOfItems", strings, null, DateTime.Now.AddMinutes(1), Cache.NoSlidingExpiration); 
} 
 
myGrid.DataSource = strings; 
myGrid.DataBind(); 


I hope somebody can help me out with this one. I'll provide further information if needed.

Thanks very much.

Kind regards,
Mallory
Mallory
Top achievements
Rank 1
 answered on 10 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?