Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
186 views

Hi,

I have a problem using the RadCombo with IE8.  The list of items exceeds the height of the control (see attached file).

How could i fix this issue?

I'm using version 2009.2.826.

Thank You!

Hans Gunnar
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
132 views
 

Protected Sub BtnInsert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnInsert.Click
following is my code and the radwindow is not closing while website hosted in IIS
by directly running from visual studio its working

''''''' client side
   function CloseAndRebind(args) {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }

            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

                return oWindow;
            }



''''''server side      
Try
 
                If Not ViewState("FileName") Is Nothing Then
                    sSql = " insert into Images(Name, Description, ImageName) values('" & DoInsertable(txbName.Text.Trim) & "','" & DoInsertable(txbDescription.Text.Trim) & "','" & DoInsertable(ViewState("FileName")) & "')"
                    ExecuteQuery(sSql)
                    ViewState("FileName") = Nothing
                    ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", True) ''check here
                Else
                    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "newkey", "<script>alert('No File Exists');</script>", False)
                End If
          

        Catch ex As Exception
            ScriptManager.RegisterStartupScript(Me, Me.GetType(), "mykey", "<script>alert('" & Err.Description & "');</script>", False)
        End Try
    End Sub
Georgi Tunev
Telerik team
 answered on 09 Feb 2010
3 answers
133 views
I used RadWindow in ASP.NET and I am now trying to convert to ASP.NET AJAX and I cannot get it to work. Here is my code:

    <asp:ScriptManager runat="server" ID="scriptManagerCLProxy">
  <Services>
    <asp:ServiceReference
       path="~/WebServices/CheckFileStatus.asmx" />
  </Services>
</asp:ScriptManager>
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow
                    id="RadWindow1"
                    runat="server"
                    showcontentduringload="false"
                    width="400px"
                    height="400px"
                    title="Critical Comments"
                    behaviors="Default">
                </telerik:RadWindow>
            </Windows>
            </telerik:RadWindowManager>
<script language="javascript" type="text/javascript">
    function CheckCriticalComments() {
        var oWindow = null;
        var CCFlag = document.getElementById("txtCCFlag").value;
        alert("CCFlag=" + CCFlag);
        if (CCFlag == "Y") {
            CCFlag = "N";
            radopen("CriticalComments.aspx", "RadWindow1");
        }
    }
</script>

All I get is an "object required" error message on the "radopen" statement.

Please help.

Thanks,
Georgi Tunev
Telerik team
 answered on 09 Feb 2010
1 answer
116 views
Hi,

I need to close a rad window after making an ajax call.

 
            function closeandredirect() { 
                GetRadWindow().BrowserWindow.location.href = '/main/sdfds_Select.aspx'; 
                GetRadWindow().close();       //closes the window      
            } 
            function GetRadWindow() { 
                var oWindow = null; 
                if (window.radWindow) 
                    oWindow = window.radWindow; 
                else if (window.frameElement.radWindow) 
                    oWindow = window.frameElement.radWindow; 
                return oWindow; 
            }  

                lblCloseWindow.Text = "<script type='text/javascript'>closeandredirect();</script>"; 
                lblCloseWindow.Visible = true; 

I tried using the above code. and did not work for me.
But it does work if i change the EnableAJAX  property of radajaxmaanger to false.


Georgi Tunev
Telerik team
 answered on 09 Feb 2010
7 answers
130 views

Dear,

always i m getting error when i work on Client side Datetimepicker.

very simple criteria. datetpicker1 date become the selected and minimumdate of datepicker2.

WIn7 VS2010 IE8 and telerik 2009 Version Q2 2009 released 08/26/2009
ERROR:

Message: Object doesn't support this property or method
Line: 72
Char: 13
Code: 0
URI: http://localhost:49204/WebSite1/ 

var DateFrom;
var DateTo;
var RDP1;
var RDP2;
 

function pageLoad() {

        

            myLabel = document.getElementById("lblNts");

            RDP1 = document.getElementById("RadDatePicker1");
            RDP2 = document.getElementById("RadDatePicker2");

        }
 

function DateSelected(sender, e) {
 
           var minDate = new Date();
            var nMonth;
           
            DateFrom = e.get_newDate().toDateString();
           
            var myFDate = DateFrom.split(" ");
           
           
            if (myFDate[1] == 'Jan') {
                nMonth = '01';
            } else if (myFDate[1] == 'Feb') {
                nMonth = '02';
            } else if (myFDate[1] == 'Mar') {
                nMonth = '03';
            } else if (myFDate[1] == 'Apr') {
                nMonth = '04';
            } else if (myFDate[1] == 'May') {
                nMonth = '05';
            } else if (myFDate[1] == 'Jun') {
                nMonth = '06';
            } else if (myFDate[1] == 'Jul') {
                nMonth = '07';
            } else if (myFDate[1] == 'Aug') {
                nMonth = '08';
            } else if (myFDate[1] == 'Sep') {
                nMonth = '09';
            } else if (myFDate[1] == 'Oct') {
                nMonth = '10';
            } else if (myFDate[1] == 'Nov') {
                nMonth = '11';
            } else if (myFDate[1] == 'Dec') {
                nMonth = '12';
            } else {
                nMonth = 'NA';
            }

            minDate.setFullYear(myFDate[3], nMonth - 1, myFDate[2]);

            RDP2.set_selectedDate(minDate);

}

 
<telerik:RadDatePicker ID="RadDatePicker1" Runat="server" MinDate="<%#DateTime.Now %>">
<ClientEvents OnDateSelected="DateSelected" />
<DateInput DateFormat="dd-MM-yyyy"></DateInput>
</telerik:RadDatePicker>

 

waseem
Top achievements
Rank 2
 answered on 09 Feb 2010
0 answers
206 views
Hi all,
 I read the tutorials hoe to use inline templates to create appointment, but I have some bit confusion using it.Because my application using a resource grouping and I only need Inline insert and edit templates no advanced form needed.As my code looks like

<telerik:RadScheduler ID="scheduler" runat="server" Width="100%" Height="80%" Skin="Office2007" 
                  DataKeyField="Name" DataStartField="Start" DataEndField="End" DataSubjectField="Subject" 
                  ShowFooter="false" MinutesPerRow="15" TimeLabelRowSpan="4" RowHeaderWidth="40px" 
                  ShowFullTime="true" OverflowBehavior="Scroll" ShowAllDayRow="false" Font-Names="Segoe UI" 
                  Font-Size="12px" GroupBy="Provider" GroupingDirection="Horizontal" HoursPanelTimeFormat="h ttt" 
                  MinimumInlineFormHeight="180" MinimumInlineFormWidth="250" OnAppointmentCreated="OnAppointmentCreated" 
                  OnAppointmentCommand="OnAppointmentCommand" OnFormCreated="OnFormCreated" OnFormCreating="OnFormCreating"> 
                  <InlineInsertTemplate> 
                    <fieldset> 
                      <table> 
                        <tr> 
                          <td><label>Subject</label> </td> 
                          <td> 
                            <asp:TextBox ID="txtSubject" runat="server" Width="160px" Height="50px" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>Type</label> </td> 
                          <td> 
                            <asp:DropDownList ID="ddlType" runat="server" Width="160px" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>Start</label> </td> 
                          <td> 
                            <telerik:RadDateTimePicker ID="tpStartTime" runat="server" Width="160px" Skin="Office2007" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>End</label> </td> 
                          <td> 
                            <telerik:RadDateTimePicker ID="tpEndTime" runat="server" Width="160px" Skin="Office2007" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td></td> 
                          <td align="right"> 
                            <table> 
                              <tr> 
                                <td> 
                                  <asp:Button ID="btnSave" Text="Save" runat="server" CommandName="Insert" /> 
                                </td> 
                                <td> 
                                  <asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /> 
                                </td> 
                              </tr> 
                            </table> 
                          </td> 
                        </tr> 
                      </table> 
                    </fieldset> 
                  </InlineInsertTemplate> 
                  <InlineEditTemplate> 
                    <fieldset> 
                      <table> 
                        <tr> 
                          <td><label>Subject</label> </td> 
                          <td> 
                            <asp:TextBox ID="txtSubject" runat="server" Width="160px" Height="50px" Text='<%# Bind("Subject") %>' /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>Type</label> </td> 
                          <td> 
                            <asp:DropDownList ID="ddlType" runat="server" Width="160px" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>Date</label> </td> 
                          <td> 
                            <telerik:RadDateTimePicker ID="dpStartDate" runat="server" Width="160px" Skin="Office2007" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td><label>End Date</label> </td> 
                          <td> 
                            <telerik:RadDateTimePicker ID="dpEndDate" runat="server" Width="160px" Skin="Office2007" /> 
                          </td> 
                        </tr> 
                        <tr> 
                          <td></td> 
                          <td align="right"> 
                            <table> 
                              <tr> 
                                <td> 
                                  <asp:Button ID="btnUpdate" Text="Save" runat="server" CommandName="Update" /> 
                                </td> 
                                <td> 
                                  <asp:Button ID="btnCancel" Text="Cancel" runat="server" CommandName="Cancel" CausesValidation="false" /> 
                                </td> 
                              </tr> 
                            </table> 
                          </td> 
                        </tr> 
                      </table> 
                    </fieldset> 
                  </InlineEditTemplate> 
                  <AppointmentTemplate> 
                    <br /> 
                    <%# Eval( "Subject" )%> 
                    <br /> 
                    <asp:Label runat="server" ID="lblType" /> 
                  </AppointmentTemplate> 
                  <TimelineView UserSelectable="false" /> 
                  <TimeSlotContextMenuSettings EnableDefault="true" Skin="Office2007" /> 
                  <AppointmentContextMenuSettings EnableDefault="true" Skin="Office2007" /> 
                </telerik:RadScheduler> 
The CS code contains
protected void Page_Load( object sender, EventArgs e ) 
{ 
  if( !IsPostBack ) 
  { 
    ResourceType resType = new ResourceType( "Provider" ); 
    resType.ForeignKeyField = "ProviderID"; 
    resType.TextField = "FullName"; 
    resType.KeyField = "ProviderId"; 
    resType.DataSource = providerList; // A list of providers with name and Id
    scheduler.ResourceTypes.Add( resType ); 
  } 
} 
protected void OnAppointmentCreated( object sender, AppointmentCreatedEventArgs e ) 
{ 
} 
protected void OnAppointmentCommand( object sender, AppointmentCommandEventArgs e ) 
{ 
appointmentData = new DTO.AppointmentData(); // User defined Class to store appointment 
appointmentData.HospitalId = 1; 
appointmentData.CreatedBy = 9; 
appointmentData.Date = scheduler.SelectedDate; 
appointmentData.ProviderID = Convert.ToUInt32( e.Container.Appointment.Resources.GetResourceByType( "Provider" ).Key.ToString() ); 
TextBox reason = (TextBox) e.Container.FindControl( "txtSubject" ); 
appointmentData.VisitReason = reason.Text.Trim(); 
RadDateTimePicker startTime = (RadDateTimePicker) e.Container.FindControl( "tpStartTime" ); 
appointmentData.StartTime = Convert.ToDateTime( startTime.SelectedDate ); 
RadDateTimePicker endTime = (RadDateTimePicker) e.Container.FindControl( "tpEndTime" ); 
appointmentData.EndTime = Convert.ToDateTime( endTime.SelectedDate ); 
DropDownList type = (DropDownList) e.Container.FindControl( "ddlType" ); 
appointmentData.AppointmentType = type.SelectedValue; 
BookAppointment( appointmentData ); 
 
protected void OnFormCreated( object sender, SchedulerFormCreatedEventArgs e ) 
{ 
if( e.Container.Mode == SchedulerFormMode.Insert ) 
{ 
RadDateTimePicker startInput = (RadDateTimePicker) e.Container.FindControl( "tpStartTime" ); 
startInput.SelectedDate = DateTime.Now; 
RadDateTimePicker endInput = (RadDateTimePicker) e.Container.FindControl( "tpEndTime" ); 
endInput.SelectedDate = DateTime.Now.AddMinutes( 30 ); 
DropDownList type = (DropDownList) e.Container.FindControl( "ddlType" ); 
type.DataTextField = "Name"; 
type.DataValueField = "ConsultationDuration"; 
type.DataSource = GetAllAppointmentTypes(); // Returns a list of appointments 
type.DataBind(); 
} 
} 
 
protected void OnFormCreating( object sender, SchedulerFormCreatingEventArgs e ) 
{ 
} 

But when I insert a appointment the form created event fires twice and I don't get the start time and end time as I given, Also the Edit is not working. Another problem is when I insert a appointment for Resource3 it will come under both Resource1 and Resource3 in GUI

My requirement is to call a function to insert the appointment values to a DB table on click save or update.
I am stuck for three days for this. Can you please give me a guide to do this stuff?


Prajeesh Prabhakar
Top achievements
Rank 1
 asked on 09 Feb 2010
2 answers
407 views
in aspx file:
...
<telerik:RadGrid
        ID="grdList" runat="server"
        EnableViewState="false"
        Height="328px"
        AllowPaging="true"
        AllowSorting="true"
        AllowFilteringByColumn="true"
        AutoGenerateColumns="False"
        PageSize="12"
        Skin="WebBlue">
    <MasterTableView ClientDataKeyNames="Col1" EnableViewState="False">
        <Columns>
            <telerik:GridBoundColumn DataField="Col1"
                HeaderText="COL1" Visible="false">
                <HeaderStyle Width="80px" HorizontalAlign="left" />
                <ItemStyle Width="80px" HorizontalAlign="left" />
            </telerik:GridBoundColumn>                        
...

in aspx.cs file => Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ...
        GridBoundColumn col;
        col = (GridBoundColumn)grdList.MasterTableView.Columns[i];
        col.HeaderText = colHdrs[i];
        // colDataTypes[i].Equals array containing "date" or "string" or ...
        if (colDataTypes[i].Equals("date"))
        {
            col.DataType = Type.GetType("System.DateTime");
            col.DataFormatString = "{0:MM/dd/yyyy}";
        }
        col.Visible = true;
        ...
    }
}

I tried different values for DataFormatString and it always displays long date time format
when i set to bogus value: [0:MM/dd/yyyy] => all rows displayed the string [0:MM/dd/yyyy]

So i know the DataFormatString is being set for date column.
Murray
Top achievements
Rank 1
 answered on 08 Feb 2010
8 answers
248 views
When i export to "Word/CSV/Excel" the images on the grid are getting disabled. I have a RadGrid with FilteringByColumn enabled. This makes the grid to display a Filtering Menu which has a text box and an image button which can be clicked to filter. I also have buttons which allows the user to click and download to different formats. Once i download, the filtering image button gets disabled and does not show the filtering menu. Please can anybody show me how to enable the Filtering Menu.
Daniel
Telerik team
 answered on 08 Feb 2010
2 answers
252 views
My site is both used internally by our company (intranet) and externally by our clients (internet).  I would like to use the Telerik CDN, but disable it for our intranet users.  Is there a way to programmatically enable/disable CDN on the RadScriptManager and RadStyleSheetManager?
mlandauer
Top achievements
Rank 1
 answered on 08 Feb 2010
3 answers
232 views
Hi,

I am using Radgrid for Asp.net Ajax 2008 Q3 version. I am trying to display data hierarchically by using nested view template relations as explained in http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx.

However, after adding my radgrid I cannot see the <NestedViewSettings> tag, but can see <NestedViewtemplate>.

Is it because I am using an older version?

many thanks,

Anu
Daniel
Telerik team
 answered on 08 Feb 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?