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

I am using Telegrik grid control in asp.net and using GridBoundColumn for DateTime data type as given below:

<

 

telerik:GridBoundColumn DataField="ChangedOnDate"

 

 

DataFormatString="{0:dd MMM yyyy}" HeaderText="When"

 

 

SortExpression="ChangedOnDate" UniqueName="When" DataType="System.DateTime"

 

 

meta:resourcekey="GridBoundColumnWhen">

 

 

</telerik:GridBoundColumn>

The filter expression "EqualsTo" does not work for the date field. I need urgent help.

Please share your thought/solution.

Thanks,
Rajesh

 

Milena
Telerik team
 answered on 13 Sep 2012
6 answers
366 views
Hi,

I want to do some coding on OnClientCloseHandler event of a RadWindow.
 I added a RadWindowManager and dynamically added RadWindow and how can code against the OnClientCloseHandler event of  RadWindow .
Please provide a solution.

Thanks for any assistance
Abhi
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
68 views
hi team,

i want to highlight the current date in weekview... as like outlook calendar ..


is it possible?
Princy
Top achievements
Rank 2
 answered on 13 Sep 2012
1 answer
157 views
We sporadically have a problem when using the RadEditor where a user clicks on the ImageManager button, and when the image manager opens the entire window is greyed out and there is no path information displayed, rendering the window unusable.  Attempts to close and re-open the image manager usually result in the same result at this point (presumably because something is being cached?).  Our setup isn't very complicated, Each of our clients has their own unique folder that they upload images / documents / templates into, and we specify this in the code behind like this:

EMailContentEditor.ImageManager.UploadPaths = new[] { string.Format("/ImageLibrary/account{0}/images", p_AccountId) };
EMailContentEditor.ImageManager.DeletePaths = new[] { string.Format("/ImageLibrary/account{0}/images", p_AccountId) };
EMailContentEditor.ImageManager.ViewPaths = new[] { string.Format("/ImageLibrary/account{0}/images", p_AccountId) };

We do run multiple web servers and /ImageLibrary is virtual directory in IIS that points to a shared NAS. 

What i'm trying to find out is how i can find out more information about why these sporadic connection attempts are failing.  I've also contacted my data center to see if there are any kind of connection logs associated with our NAS that could show the error.  But i'd like to know is there an exception that is thrown or could be trapped when this error happens, or any way that i could force the RadEditor to retry the connection when it doesn't connect the first time?  We've been using this solution for a number of years now and it's always worked fine.  Lately i seem to be hearing more and more complaints about it, however in the grand scheme of things we're probably only talking a fraction of a %.

Any help or ideas you can provide are most appreciated.  We are using version 2012.2.619.40 in production and will be upgrading to 2012.2.815.40 in the next 2 weeks.

Regards,
-Mark
Vessy
Telerik team
 answered on 13 Sep 2012
1 answer
52 views
Hello

 See the following demo link

http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx

In this case in month tab. we can easily drag and drop the exam. I don't want to drag and drop option in case MONTH ..

How to disable the drag and drop in case of Month


Thanks
Regards
Rahul
Princy
Top achievements
Rank 2
 answered on 13 Sep 2012
2 answers
81 views
is there a sparkline chart for asp.net ajax grid? I see there is some mention of it in silverlight.

Thanks,
Marty
moegal
Top achievements
Rank 1
 answered on 13 Sep 2012
2 answers
219 views
We need tdf files for Japanese(ja-JP) and Chinese(zh-CN)  laguages. 
Venky
Top achievements
Rank 2
 answered on 13 Sep 2012
2 answers
214 views
Hi ,

i am facing issue when  i am making check box checked in iteam databound but its not woeking,please help me to solve this issue.

item databound code

  protected void grdExamDates_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridDataItem && !(e.Item is GridDataInsertItem) && !e.Item.IsInEditMode)
            {
                GridDataItem item = e.Item as GridDataItem;
                AdminCheckExamDateView dataItem = item.DataItem as AdminCheckExamDateView;
                CheckBox checkBox = (CheckBox)item["colSelect"].Controls[0];
                if (dataItem.SELECTED_FLAG)
                    checkBox.Checked = true;
                if (ExamCompleted || AdminCheckReadOnly)
                {
                    if (checkBox != null)
                    {
                        checkBox.Enabled = false;
                    }                 
                }
               

            }
        }


and design code
  <tempo:TempoGridControl ID="grdExamDates" runat="server" OnNeedDataSource="grdExamDates_NeedDataSource"
                                            AllowPaging="false"  OnItemDataBound="grdExamDates_ItemDataBound" ViewEntityType="CGI.ESG.TEMPO.ViewEntity.AdminCheckExamDateView,CGI.ESG.TEMPO.ViewEntity" >
                                            <TempoCommandItem Enabled="true" ShowAddItemButton="false" />
                                            <ClientSettings EnablePostBackOnRowClick="false">
                                                <Resizing AllowColumnResize="true" />
                                                <Selecting AllowRowSelect="true" EnableDragToSelectRows="true"/>
                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="84" />
                                          
                                            </ClientSettings>
                                            <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" DataKeyNames="EXAM_ID, EXAM_TYPE_CODE">
                                                <Columns>
                                                  <telerik:GridClientSelectColumn UniqueName="colSelect" HeaderStyle-Width="30px"/>                                          
                                                    <telerik:GridDateTimeColumn HeaderText="Exam Date" DataField="EXAM_START_DATE" HeaderStyle-Width="100px"
                                                        DataFormatString="{0:MM/dd/yyyy}">
                                                    </telerik:GridDateTimeColumn>
                                                    <telerik:GridBoundColumn HeaderText="Exam Type" UniqueName="colExamType" DataField="EXAM_TYPE_DESC">
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </tempo:TempoGridControl>

Sathish
Top achievements
Rank 1
 answered on 13 Sep 2012
3 answers
198 views
Hi there,

nice controls! Actually bought 2 licenses a few days ago for my company ...

Here is my question:

How can I change the month (or week, day) of the scheduler based on an external event (like onclick() in ListBox1) - in JAVASCRIPT? No postback and/or web service, please!

Can this be done?
Yes => How?
No => Can you refer me to an example with server side code?
Thanks a million times!



Princy
Top achievements
Rank 2
 answered on 13 Sep 2012
1 answer
232 views
Hello,

How can one from a UserControl which dynamically created, close itself and open another UserControl dynamically?

Update:I solved this after some searching. I have updated my post with code that worked for me. It is not tidy. Someone may have a smarter solution?

default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RibbonBarButton1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PlaceHolder1" />
                        <telerik:AjaxUpdatedControl ControlID="hf" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RibbonBarButton2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PlaceHolder1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="hf" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div>
 
 
            <telerik:RadRibbonBar ID="RadRibbonBar1" runat="server" Width="900px" Style="max-width: 900px;" Skin="Office2010Silver" EnableMinimizing="true">
                <telerik:RibbonBarTab Text="UC">
                    <telerik:RibbonBarGroup Text="UC1" ID="RibbonBarGroup1">
                        <Items>
 
                            <telerik:RibbonBarButton Size="Large" Text="UC1" ImageUrlLarge="/images/icons/docs_32.png" ID="RibbonBarButton1" />
 
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="UC2" ID="RibbonBarGroup2">
                        <Items>
 
                            <telerik:RibbonBarButton Size="Large" Text="UC2" ImageUrlLarge="/images/icons/docs_32.png" ID="RibbonBarButton2" />
 
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
            </telerik:RadRibbonBar>
 
 
 
            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
        </div>
        <asp:Label ID="hf" Text="" runat="server" Visible="false" />
    </form>
</body>
</html>


default.aspx.vb
Imports Telerik.Web.UI
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
 
    Protected Sub RadRibbonBar1_ButtonClick(sender As Object, e As RibbonBarButtonClickEventArgs) Handles RadRibbonBar1.ButtonClick
 
        If e.Button.ID.ToString = "RibbonBarButton1" Then
            LoadUserControl("UC1")
        ElseIf e.Button.ID.ToString = "RibbonBarButton2" Then
            LoadUserControl("UC2")
        End If
 
            End Sub
 
    Public Sub LoadUserControl(ByVal userControl As String)
 
        hf.Text = userControl
 
        PlaceHolder1.Controls.Clear()
 
        Dim wuc As Web.UI.UserControl = CType(LoadControl("~/" & userControl & ".ascx"), Web.UI.UserControl)
        wuc.ID = userControl
        PlaceHolder1.Controls.Add(wuc)
 
    End Sub
 
 
 
 
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
 
        If Page.IsPostBack Then
 
            If hf.Text.Length > 2 Then
 
                Dim wuc As Web.UI.UserControl = CType(LoadControl("~/" & hf.Text & ".ascx"), Web.UI.UserControl)
 
                wuc.ID = hf.Text
                wuc.Visible = False
                PlaceHolder1.Controls.Add(wuc)
            End If
        End If
 
    End Sub
End Class


UC1.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="UC1.ascx.vb" Inherits="UC1" %>
 
UC1<br />
<asp:Button ID="Button1" runat="server" Text="Open UC2" />
UC1.ascx.vb
Partial Class UC1
    Inherits System.Web.UI.UserControl
 
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ' show the other control
        Dim wuc As Web.UI.UserControl = CType(LoadControl("~/UC2.ascx"), Web.UI.UserControl)
        Dim holder As PlaceHolder = CType(ControlExtensions.FindControlRecursive(Page, "PlaceHolder1"), PlaceHolder)
 
        wuc.ID = "UC2"
        wuc.Visible = True
 
        holder.Controls.Add(wuc)
 
        Dim hf As Label = CType(ControlExtensions.FindControlRecursive(Page, "hf"), Label)
        hf.Text = "UC2"
    End Sub
End Class

UC2.ascx
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="UC2.ascx.vb" Inherits="UC2" %>
 
UC2<br />
<asp:Button ID="Button1" runat="server" Text="Open UC1" />
UC2.ascx.vb
Partial Class UC2
    Inherits System.Web.UI.UserControl
 
    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ' show the other control
        Dim wuc As Web.UI.UserControl = CType(LoadControl("~/UC1.ascx"), Web.UI.UserControl)
        Dim holder As PlaceHolder = CType(ControlExtensions.FindControlRecursive(Page, "PlaceHolder1"), PlaceHolder)
 
        wuc.ID = "UC1"
        wuc.Visible = True
 
        holder.Controls.Add(wuc)
 
        Dim hf As Label = CType(ControlExtensions.FindControlRecursive(Page, "hf"), Label)
        hf.Text = "UC1"
    End Sub
End Class

ControlExtensions.vb
Imports Microsoft.VisualBasic
 
Public Class ControlExtensions
 
    ''' <summary>
    ''' recursively finds a child control of the specified parent.
    ''' </summary>
    ''' <param name="control"></param>
    ''' <param name="id"></param>
    ''' <returns></returns>
    Public Shared Function FindControlRecursive(ByVal control As Control, ByVal id As String) As Control
        If control Is Nothing Then
            Return Nothing
        End If
 
        'try to find the control at the current level
        Dim ctrl As Control = control.FindControl(id)
 
        If ctrl Is Nothing Then
            'search the children
            For Each child As Control In control.Controls
                ctrl = FindControlRecursive(child, id)
                If Not ctrl Is Nothing Then
                    Exit For
                End If
            Next child
        End If
 
        Return ctrl
    End Function
 
 
End Class


/Janne
Maria Ilieva
Telerik team
 answered on 13 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?