Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
80 views

Hi All,

I customize a webpart in SharePoint 2010.

My webpart have a RadGrid to edit data from the DB.

And I put three dropdownlist controls in the grid row.

The problem is that

Everything is fine. After I add the ajaxManager scripts, than postback the page, the page display word doesn’t change.

Please do help me resolving this. I am using the trial version of Telerik.Web.UI.dll 2013.1.417.35

Please do send me a sample which does the similar functionality.

Thanks in advance.

Marin
Telerik team
 answered on 22 May 2013
1 answer
58 views
<telerik:GridTemplateColumn HeaderText="End Date" HeaderStyle-ForeColor="Black" ColumnEditorID="GridTextBoxColumnEditor6"
                    AllowFiltering="true" AutoPostBackOnFilter="true" HeaderStyle-Width="138px" DataField="EndDate"
                    CurrentFilterFunction="Contains" DataType="System.DateTime">
                    <ItemTemplate>
                        <%#Eval("EndDate")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadDatePicker ID="radDpEDate" runat="server" MinDate="1/1/1900" MaxDate="12/31/9999" />
                        <asp:RequiredFieldValidator ID="reqDpEndDate" runat="server" ErrorMessage="End Date Required"
                            CssClass="ErrorInSFSE" ControlToValidate="radDpEDate" ValidationGroup="g"> </asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cmpSdandEd" runat="server" ControlToCompare="radDpSDate"
                            ControlToValidate="radDpEDate" Type="Date" Operator="GreaterThanEqual" ErrorMessage="End Date is GreaterThanEqual start Date"
                            CssClass="ErrorInSFSE" ValidationGroup="g"> </asp:CompareValidator>
                        <asp:Label ID="lblEdate" runat="server" Text=' <%#Eval("EndDate")%>' Visible="false"></asp:Label>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>


.aspx.cs


in item_bound()
{
 if (e.Item.OwnerTableView.IsItemInserted)
                {
                    Label lblServiceID = (Label)e.Item.FindControl("lblServiceID1");
                    Label lblFedTaxId = (Label)e.Item.FindControl("lblFedTaxID1");
                    lblServiceID.Parent.Parent.Visible = false;
                    lblFedTaxId.Parent.Parent.Visible = false;
                    RadDatePicker radDpEnd = (RadDatePicker)e.Item.FindControl("radDpEDate");
                    radDpEnd.SelectedDate =Convert.ToDateTime("12/31/9999");

                }
}
I am want like this .when  first time page load default "select date"  is "12/31/9999"  ,but we give chance to user, change the  date when he click on date picker I want give present date  calender not "12/31/9999" calender.
when again user clicks i want, takes the user to "12/31/999" .
1. In odd no.of clicks , i am display the current date and year "05/17/2013".
2.In even no.of click ,I am display default calender  "12/31/9999".
Kostadin
Telerik team
 answered on 22 May 2013
3 answers
103 views
Now, I'm using RadScheduler to book the ticket for a cinema.
for example, on 21/05/2013,  for this movie named "Movie1", if the tickets still avaliable, TimeSlotContextMenu should Show, otherwies , need to hide TimeSlotContextMenu.
Kate
Telerik team
 answered on 22 May 2013
1 answer
106 views
I am using manual upload, so have a button to initiate the upload. However, prior to uploading, I need to verify a set number of files have been selected for upload. So far this seems to work
var upload = $find('<%= radAsyncUpload.ClientID %>');
if ( upload._fileInput.files.length != required ) {
    $(".filesRequiredMessage").show();
}
but is delving into the internals of the control. Is there an approved method? getUploadedFiles() doesn't work, as the files haven't been uploaded yet.
Peter Filipov
Telerik team
 answered on 22 May 2013
6 answers
210 views
Hi,
I'm using ASP.NET AJAX with a RadCalender and a Rad Scheduler, when i'm logging in to my "site"  the page is loading and there will be an error: GetAppointments is returning null. The Error message says: Microsoft JScript: Can't get the value for the "Appointments": object is null or undefiend.

var i = g.Appointments || g;


Its the only the days where there is no appointment when this is happening otherwise its running ok.

Any suggestions?


Regards
Andreas

Karl
Top achievements
Rank 1
 answered on 22 May 2013
6 answers
336 views

Code-behind:
Imports Telerik.Web.UI
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
 
    Protected Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        Dim list As New ArrayList
 
        list.Add("blah")
        list.Add("blah 2")
        list.Add("this is an item")
        list.Add("another item")
 
        RadGrid1.DataSource = list
 
 
 
    End Sub
End Class

Markup:
<%@ 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="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Button runat="server" ID="showWindow" Text="click me" OnClientClick="radopen(null,'radWindow1'); return false;" />
    <telerik:RadWindowManager runat="server" ID="radWindowManager1" Modal="true" Style="z-index: 10000">
        <Windows>
            <telerik:RadWindow ID="radWindow1" runat="server" KeepInScreenBounds="true" Modal="true"
                Behaviors="Close" Width="700px" Height="400px" Title="test window">
                <ContentTemplate>
                    <div>
                        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" ShowGroupPanel="True"
                            Width="100%" AllowSorting="True" OnNeedDataSource="RadGrid1_NeedDataSource">
                            <MasterTableView CommandItemDisplay="Top" />
                            <ClientSettings AllowDragToGroup="True">
                            </ClientSettings>
                        </telerik:RadGrid>
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </div>
    </form>
</body>
</html>


Click on the button to open the radWindow with radopen(), click on the 'add' commanditem on the grid. Notice that it takes two clicks to get the edit form to show. This holds true with any of the grid's itemcommands as long as it is in the radwindow. If you move the radgrid outside of the radwindow, itemcommand events fire normally.

You'll also notice that the 'add' commanditem on the grid causes a postback on first click as well, and if you look at __EVENTTARGET request param, you'll notice that it correctly shows the button that causes the event, however the event never fires until you click it a second time.











Eyup
Telerik team
 answered on 22 May 2013
25 answers
794 views
I'm using The Q1 2009 Scheduler control with a Web Service data source.  I would like to pass some extra information to the GetAppointments web method that will determine which types of appointments are returned.  The only parameter of this method is of type SchedulerInfo and that object only has 2 properties: ViewStart and ViewEnd.  Is there a way to pass any additional information?  I would like to use the OnClientAppointmentsPopulating event to add more data to the Scheduler Info object.

Any ideas?

Thanks,
Dave
Plamen
Telerik team
 answered on 22 May 2013
1 answer
67 views
Hi,
This is possible using web services:
//RadScheduler Client side events
 function OnClientAppointmentsPopulating(sender, eventArgs) {
            debugger;
            eventArgs.get_schedulerInfo().physicianID = document.getElementById('PhysicianID1').value;
            eventArgs.get_schedulerInfo().visitStatus = status;
        }

in AppointmentSchedulerInfo class

    public int PhysicianID { get; set; }
    public string VisitStatus { get; set; }
    public AppointmentSchedulerInfo(ISchedulerInfo baseInfo, int physicianID,string visitStatus)
        : base(baseInfo)
    {
        PhysicianID = physicianID;
        VisitStatus = visitStatus;
    }
    public AppointmentSchedulerInfo()
    {
    }

how to achieve this functionality using WCF  ??

Please update me.

Regards,
Kuldeep
Plamen
Telerik team
 answered on 22 May 2013
1 answer
85 views
I am using radMenu inside a DIV tag and I am keeping text-align to right but menu still remains on the left of the DIV. Text inside the DIV aligns to right but menu keeps on left. I am using metro skin.
Princy
Top achievements
Rank 2
 answered on 22 May 2013
1 answer
48 views
MonthView:
on 21/05/2013, the color should be red (may be today is very important, need to flag the background color to red)
on 22/05/2013, the color should be green or other color.

Plamen
Telerik team
 answered on 22 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?