Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
I am experiencing a strange behavior with RadWindowManager1.RadAlert 
I have an aspx page with different controls(textbox,combobox etc).Same page comes as Radwindow in another asp page.
I am trying to save record and show "record added successfully" message via Radalert.
If I enter all the details correctly and click save button,I am getting the Radalert with message.But in case I show some error message as ,for eg  "name is required",and then click save button by entering all required fields,I am not getting the RadAlert,but the record gets saved in the database.I am not sure is this is the exact reason behind.

Please find below my code.
aspx:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
   <script type="text/javascript">
       function openWinRefClinic() {
           window.radopen("FrmReferralClinicGrid.aspx", "RefClinicDialog");
       }
 
       function confirmCallBackFn(arg) {
           if (arg == true) {
               document.getElementById("Button1").click();
           }
           else {
               document.getElementById("Button2").click();
           }
       }
 
       function alertAndNavigateDr() {
           window.location.href = "FrmReferralDoctorGrid.aspx";
       }
 
   </script>
   </telerik:RadCodeBlock>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>           
            <telerik:RadWindow ID="RefClinicDialog" Title="Referral Clinic Data" runat="server" Height="550px" Width="550px"
                Left="150px" Behaviors="Close" />
        </Windows>
    </telerik:RadWindowManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RCCountry">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RCCity" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RbSave">
                <UpdatedControls>
        
                    <telerik:AjaxUpdatedControl ControlID="RbSave" />
                    <telerik:AjaxUpdatedControl ControlID="Message" />
                    <telerik:AjaxUpdatedControl ControlID="lblerror" />
                    <telerik:AjaxUpdatedControl ControlID="lblName" />
                    <telerik:AjaxUpdatedControl ControlID="emailValidator" />
                    <telerik:AjaxUpdatedControl ControlID="lblContact" />
                    <telerik:AjaxUpdatedControl ControlID="lblLicence" />    
                    <telerik:AjaxUpdatedControl ControlID="lblScript" />                   
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RbClose">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RbClose" />
                </UpdatedControls>
            </telerik:AjaxSetting>            
        </AjaxSettings>
    </telerik:RadAjaxManager>
///
aspx.cs
protected void RbSave_Click1(object sender, EventArgs e)
      {         
         
 
          if (RCDrName.Text == "")
          {
              lblName.Visible = true;
              RCDrName.Focus();
              return;
          }
 
 
          if (RCClinic.SelectedIndex == 0)
          {
              lblerror.Visible = true;
              RCClinic.Focus();
              return;
          }
          if (RTMobile.Text == "")
          {
              lblContact.Visible = true;
              RTMobile.Focus();
              return;
          }
 
          if (RTLicenceNo.Text == "")
          {
 
              lblLicence.Text = "Please enter Health Authority License No!";
              lblLicence.Visible = true;
              RTLicenceNo.Focus();
              return;
          }
 
          
          if (!string.IsNullOrEmpty(Id))
          {
              bool statusU = _refDoctorService.UpdateDoctor(refdoctor);
              if (statusU == true)
              {
 
                  RadWindowManager1.RadAlert("Referral doctor data updated successfully!", 300, 100, "Update Referral Doctor", "alertAndNavigateDr", "myAlertImage.png");
              }
              else
              {
                  Message.InnerHtml = "Referral doctor data update failed";
                  return;
              }
 
          }
          else
          {
              //check if ref doctor exist             
              string search = " where Fld_RefDocName='" + refdoctor.Fld_RefDocName + "'" + " and " + " Fld_ClinicID=" + refdoctor.Fld_ClinicID;
              bool check = _refDoctorService.DoctorExists(search);
              if (check == true)
              {
                  RadWindowManager1.RadConfirm("Referral Doctor already exist!Do you want continue?", "confirmCallBackFn", 300, 100, null, "Warning", "myConfirmImage.png");
 
              }
              else
              {
                  bool result = _refDoctorService.SaveRefDoctor(refdoctor);
                  if (result == true)
                  {
                      RadWindowManager1.RadAlert("Referral doctor added successfully!", 300, 100, "Add Referral Doctor", "alertAndNavigateDr", "myAlertImage.png");
                  }
                  else
                  {
                      Message.InnerText = "Referral doctor is not added.Please try again!";
                      return;
                  }
              }
          }
          
           
      }
 
      protected void Button1_Click(object sender, EventArgs e)
      {
        //moving the fields
          bool result = _refDoctorService.SaveRefDoctor(refdoctor);
          if (result == true)
          {              
              RadWindowManager1.RadAlert("Referral doctor added successfully!", 300, 100, "Add Referral Doctor", "alertAndNavigateDr", "myAlertImage.png");               
          }
          else
          {
              Message.InnerText = "Referral doctor is not added.Please try again!";
              return;
          }
      }
Marin Bratanov
Telerik team
 answered on 03 Aug 2012
1 answer
59 views

I want to know if it is possible to change the day, week, month, and timeline from horizontal along the top to be display vertically on the left hand side then change the time which is vertically on the left hand side to horizontal along the top.

 
I have attached an image of what I need.

cheers

John M

Plamen
Telerik team
 answered on 03 Aug 2012
3 answers
104 views
Hi

I want to disable the 'delete a recurring appointment' popup (the one that asks whether they want to delete the series or the occurrence), instead I want to show an "Are you sure you want to delete...."
Due to the way I am using the scheduler I don't want to give the user the option of what to do with an appointment, I want to handle it my self.

I have tried setting DisplayDeleteConfirmation="False" but this only works with single occurrence appointments, the recurring ones still show.

Is there an event I can hook into to stop it displaying?

Bex
Bex
Top achievements
Rank 1
 answered on 03 Aug 2012
1 answer
33 views
I have been working on a new layout for an existing site. The layout uses jQuery for some styling and a notification system.

There is a number of stylesheets commented out for debugging and IE, eg:
    <!--<link href="Skin/v5/debug.css" rel="stylesheet" type="text/css" />-->
    <!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="Skin/v5/ie8minus.css1" /><![endif]-->

Everything works fine, except on pages using RadAjaxManager. When a postback through the ajaxmanager occurs, these stylesheets mysteriously get activated.

If I remove jQuery, it doesn't happen... however then I lose the notification system and styling which I require.

I've got no idea where to begin to track down how this is occurring? I am guessing something is clashing with jQuery and the RadAjaxManager.
In chrome dev tools the stylesheets still appear to be commented out, yet the styles are somehow applied after AJAX postbox.

The problem occurs in all browsers - I have tested in Chrome, IE9, IE8 and Firefox.

Any ideas?
Maria Ilieva
Telerik team
 answered on 03 Aug 2012
4 answers
109 views
Hi,
I am using RadTreeView in my project which is running in DNN website. I am using DNN 5.5.x and a DNN 6.x Environment for testing my project. The problem is that in DNN 6.x when i click a node, which is not the top level node, the page is reloaded or refreshed and the node click event is not firing. If i click the top level node, then the node click event fires without a page refresh. The exact same code works perfectly fine in DNN 5.5.x.
I am building the RadTreeView from the code behind. I load the tree with different nodes on NodeExpand event. Any help or suggestion or idea on fixing this issue in DNN 6.x will be a great help.
Mojeeb
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
84 views
hi
i am Creating task(appointment) then  another user can create task at the same time?is this a bug?
how can i ignore other user to create appointment on the others appointments created time?
thanks
Plamen
Telerik team
 answered on 03 Aug 2012
1 answer
41 views
Hi to all,
How can I do to create a TreeList that has:
First column : treview structure (this is simple, ok)
Second column: must read only
Third column: must edit mode, BUT only for line that is leaf of current node (relative of first column)

Can I do this?
Tsvetina
Telerik team
 answered on 03 Aug 2012
1 answer
157 views
I have a RadListbox with CheckBoxes set to true. What I'm doing is reading data in to the listbox from a sql database and having the checkbox be checked if the data is able to be crossreferenced with another table. 

I am able to populate the listbox with data and have the checkboxes be checked or unchecked on page load. My problem is handing the ItemChecked event. I want to capture the event and pass the value of the list item that had it's check box checked or unchecked to a function in server side code. The function then either creates or deletes a record in my sql database for cross referencing.

For example I have a 4 items in the list, the items consist of a name and a value(a guid), items 1 and 3 are checked on load. When I check item 2 how do I capture the check event and then pass the GUID value to the code?

I attempted to follow the instructions listed here: http://www.telerik.com/help/aspnet-ajax/ajax-client-side-api.html but I had no luck in getting it to call the function much less figuring out how to pass the information I need in the arguments.

Maria Ilieva
Telerik team
 answered on 03 Aug 2012
3 answers
528 views
Hi everybody, I have a problem. I have a radgrid, I create a link button in this radgrid. When I click link button,"Update" link button and "Cancel" link button appears. How to change "Update" text and "Cancel" text? 
Have you any ideas? Thanks!
<telerik:RadGrid runat="server" ID="rgdThongTin" Height="350px" Width="100%" AutoGenerateColumns="false"
                          GridLines="None"
                          onneeddatasource="rgdThongTin_NeedDataSource"
                          ondeletecommand="rgdThongTin_DeleteCommand"
                          onupdatecommand="rgdThongTin_UpdateCommand"
                          oninsertcommand="rgdThongTin_InsertCommand">
                          <MasterTableView  DataKeyNames="STT" AllowMultiColumnSorting="True" Width="100%">
                              <Columns>
                                  <telerik:GridBoundColumn DataField="STT" UniqueName="STT" HeaderText="STT" Visible="false">
                                      <HeaderStyle Width="0px" HorizontalAlign="Left" VerticalAlign="Middle" Font-Bold="True" />
                                      <ItemStyle Width="0px" HorizontalAlign="Left" VerticalAlign="Middle" />
                                  </telerik:GridBoundColumn>
                                   
                                  <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn"
                                      EditText="Cập nhật">
                                      <HeaderStyle Width="100px" HorizontalAlign="Left" VerticalAlign="Middle" Font-Bold="True" />
                                      <ItemStyle Width="100px" HorizontalAlign="Left" VerticalAlign="Middle" />
                                  </telerik:GridEditCommandColumn>
 
                              </Columns>
                              <EditFormSettings CaptionFormatString="Edit details for employee with" CaptionDataField="MA_SO">
                                 
                              </EditFormSettings>
                          </MasterTableView>
                          <ClientSettings AllowColumnsReorder="true" EnableRowHoverStyle="true">
                              <Selecting AllowRowSelect="true" />
                              <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                              <ClientEvents OnRowDblClick="RowDblClick" />                         
                          </ClientSettings>
                      </telerik:RadGrid>
Jayesh Goyani
Top achievements
Rank 2
 answered on 03 Aug 2012
1 answer
462 views

Hi,

I am having a user control in RadAjaxPanel of a content page. Now i want to include an image button in the usercontrol which on clicking should export the page content  to a .doc file. i tried this code :
protected void Export(object sender, EventArgs e)
    {
        HttpContext.Current.Response.Clear();
        Response.ContentType = "application/msword";
        Response.AddHeader("Content-Disposition", "attachment;filename=Export.doc");
        StringBuilder strHTMLContent = new StringBuilder();
        strHTMLContent.Append("<html>");
        strHTMLContent.Append(lbExp.Text);
        strHTMLContent.Append("</html>");
        Response.Write(strHTMLContent);
        Response.End();
    }

This is working fine in a demo application with a single button,shows the download window and exports the content but in my application, it is showing the Sys.WebForms.PageRequestmanager.ParserErrorException owing to the RadAjaxPanel used.
I went through several methods of excluding the controls, etc but none works..

Please help me regarding this..
  

Daniel
Telerik team
 answered on 03 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?