Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Hi,
I currently open a page from another radwindow using the code...

Protected Sub RadGrid1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGrid1.SelectedIndexChanged
    If RadGrid1.SelectedItems.Count > 0 Then
        For Each item As GridDataItem In RadGrid1.SelectedItems
            Dim strid As String
            strid = item("UniqueID").Text
            Session("Selected") = "Selected"
            Session("ID") = strid
 
            Dim newwindow As New RadWindow
            newwindow.NavigateUrl = "MessageForm1.aspx"
            RadWindow1.Windows.Add(newwindow)
            newwindow.Width = Unit.Pixel(600)
            newwindow.Height = Unit.Pixel(650)
        Next
    End If
End Sub

And everything opens fine, until I come to closing it, I know everything works because It works perfectly using "response.redirect"
When I close it using the following code...
Protected Sub btnSave_Click(sender As Object, e As System.EventArgs) Handles btnSave.Click
 
    Dim log As New dbMessageLog()
    log.ForID = Convert.ToInt32(ddlFor.SelectedValue)
    log.From = Convert.ToString(ddlFrom.SelectedValue)
    log.Customer = txtCustomer.Text
    log.Telephone = txtTelephone.Text
    log.Email = txtEmail.Text
    log.Urgent = Convert.ToInt32(chkUrgent.Checked)
    log.TakenByID = Convert.ToInt32(ddlTakenBy.SelectedValue)
    log.TakenOn = Convert.ToDateTime(DatePicker.SelectedDate)
    log.Actioned = 1
    log.StatusID = Convert.ToInt32(ddlStatusID.SelectedValue)
    log.Message = txtMessage.Text
    log.Subject = TextBox1.Text
 
    If lblMessageID.Text = zero Then
        log.Create(log)
    Else
        log.UniqueID = lblMessageID.Text
        log.Update(log)
    End If
    InjectScript.Text = "<script type='text/javascript'>CloseAndRebind();</" + "script>"
    Session("ID") = zero

On First Click...
It saves the data but doesn't close the window, and displays the old values
the screen flickers slightly as well
However
On a second click of the save button it works fine

It also does it when I click on the "x" at the top right of the page
so i guess it's something to do with the opening code?

Thanks in advance
Ryan
Marin Bratanov
Telerik team
 answered on 03 Sep 2012
3 answers
109 views
This is probably a simple answer, and I'm just not seeing it.
I'm using the Custom Advanced Form example, and what I would like to do is hide the Resource drop down list located within the user controls based on a value on my Scheduler page. For example, if lblOwner.text="N" on the scheduler page, then hide the resource drop down on the advanced form when editing or creating an appointment.

How would I go about accessing those controls?
Boyan Dimitrov
Telerik team
 answered on 03 Sep 2012
6 answers
245 views
Hey,

So - from what we've noticed, this small breaking change actually did quite a number on our site. We've had to implement a site wide control skin to set EnableSingleInputRendering=false for all applicable RadControls.

For one, we noticed that when EnableSingleInputRendering=true, which is the default now, that the final input dom element gets the style "color: transparent;" when the control is not in focus. Why is this?

Thanks,
Kori
Vasil
Telerik team
 answered on 03 Sep 2012
1 answer
167 views
I am trying to use the social share on a page, but the Captcha will not render for the "share via Email"
The site is using the state server "process" for session state and there is caching on the server. 

I have configured the web.conf but I'm not sure what else to try. Is there a way to turn it off and obviously stop its validation as well?

Many Thanks for any help.
Marin Bratanov
Telerik team
 answered on 03 Sep 2012
1 answer
99 views
Hi !!

I have a RadTreeview, in which I allow to move or copy nodes across the same treeview. The concept is on Node drop I return a jQuery dialog box that asks "What operation do you want to perform?" with link buttons Move, Copy or Cancel. On clicking move button I want to move the selected nodes with hierarchy below the destination node, On clicking copy button I want the selected nodes remains on their same position but a copy of them created below the destination node. So that I want the object of Source RadTreeNode(s), destination RadTreeNode and drop position. As I click the move or copy button, it make the page_load() event in which I lost that objects. Can any one have idea how to persists it? Awaiting for your valuable response.

Thanks,
Dev
Boyan Dimitrov
Telerik team
 answered on 03 Sep 2012
1 answer
87 views
Hello,
I have InsertExternalVideo in RadEditor. All of a sudden it stopped working. Now i get the error you see in the attachment.
Here is the code:
<telerik:RadEditor ID="RadEditor1" Runat="server" EditModes="Design" ExternalDialogsPath="~/Telerik/EditorDialogs/">
        <Tools>
        <telerik:EditorToolGroup>
        <telerik:EditorTool Name="Bold" />
        <telerik:EditorTool Name="Italic" />
        <telerik:EditorTool Name="Underline" />
        <telerik:EditorTool Name="Undo" />
        <telerik:EditorTool Name="Redo" />
        <telerik:EditorTool Name="InsertExternalVideo" Text="YouTube" />
        </telerik:EditorToolGroup>
        </Tools>
        </telerik:RadEditor>

The file ~/Telerik/EditorDialogs is there. This happens both on my local and remote server.
This worked before and I did not do any changes to the file. Do you know why this is?
Rumen
Telerik team
 answered on 03 Sep 2012
5 answers
178 views
Hello,

The date selected into the RadDatePicker in format of 11/05/2012 and after getting the output which was coded in RadDatePicker1_SelectedDateChanged,the displayed date changes to 2012-05-11-00-00-00 and then goes back to11/05/2012. This causes a flicker issue in the field.Could I get Solution for this to overcome the flickering effect?

I reffered the below link related to this issue but couldn't find the solution.
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/raddatepicker-format-switiching-on-button-click.aspx

My Code is as below:
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" AutoPostBack="true" OnSelectedDateChanged="RadDatePicker1_SelectedDateChanged"
                       ShowPopupOnFocus="true">
                   </telerik:RadDatePicker>
protected void RadDatePicker1_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    {
        GetApptData();
        lblPSelectedDate.Text = RadDatePicker1.SelectedDate.Value.ToShortDateString();
    }
Milena
Telerik team
 answered on 03 Sep 2012
1 answer
85 views
Hi, 

   I Have a RadEditor inside a RadGrid ItemTemplate like this:

 <EditItemTemplate>
              <telerik:RadEditor ID="descriptionEditor" Runat="server" EditModes="Design" Font-Size="X-Small" Height="300px" Skin="Sunset" Width="100%" Html='<%# Bind("description") %>' Font-Names="Segoe UI,Arial,sans-serif" >


   But when i change the content while "editing", later in codebehind UpdateCommand event, i get the previous value of "desciption" and not the update one (see the codebehind below: If description is "aaa", and i edit to "bbb", the variable newdescription in the event is still "aaa".

 protected void grid_UpdateCommand(object source, GridCommandEventArgs e)
        { 
            if (e.CommandName == RadGrid.UpdateCommandName)
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                if (e.Item is GridEditFormItem)
                {
                    RadEditor descriptionEditor = (RadEditor)item.FindControl("descriptionEditor");


                    string newDescription = descriptionEditor.GetHtml(EditorStripHtmlOptions.None);
                    onProgressReportGrid.Rebind();


                }
            }
        }

Can you help me, please ?
Kind regards
Rumen
Telerik team
 answered on 03 Sep 2012
1 answer
242 views
Hi All

I'm using the asyc upload and on my dev machine it all works OK.
On the staging server used for testing the upload doesn't work. When you select a file the red blob icon stays red (normally it would turn green)
I can confirm that the onclientValidation event is being fired, as we use this to detect a file size problem.
I have set permission on the upload folder and the App_Data folder and it has made no difference - is the client validation fired if permissions are wrong on the server folders?

What else should I be looking for?

Andy
Genady Sergeev
Telerik team
 answered on 03 Sep 2012
1 answer
94 views
Hey Guys,

I'm having trouble updating a listview attached to a RadDataPager based on a FireCommand using the result of .NET's History mechanism attached to the scriptmanager.

I write the history point fine, I retrieve it fine when the user hits "back" - the Navigate event fires and I see the correct index.

I then try to pass this index to FireCommand on my RadDataPager, but of course the listview and raddatapager, if they do receive the FireCommand, do not update.  Am I missing an AJAx wireup somewhere? I have a RadAjaxManager set up to update the listview and datapager based on the datapager itself but no luck.  I feel like the Navigate event needs to trigger my AjaxManager in some way?

Any ideas? Thanks.

Code below:

<%@ Master Debug="true" Language="C#" MasterPageFile="~/shared/templates/global/AH-Global-L1-2-Column.master" AutoEventWireup="true" CodeFile="listjobs.master.cs" Inherits="global_listjobs" %>
<%@ Reference Control="~/shared/controls/layout/widgets/JobSearchWidget.ascx" %>
<%@ Reference Control="~/shared/controls/ddls/CountrySelector.ascx" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="cpColumn1" Runat="Server">
    <h1 id="pageTop"><asp:Literal ID="litPageHeading" runat="server" Text="Search Jobs In the Arts" /></h1>
    <div id="searchListSearchWidget">
        <ah:JobSearchWidget ID="JobSearchWidget" runat="server" />
    </div>
    <div id="searchPageSupplementBox">
        <h2>Jobs quick links</h2>
        <ul>
            <li><a href="<%#Config.URLDomain %>jobs/advertise-a-job/" title="Advertise your job on artsHub">Advertise your job on artsHub</a></li>
            <li><a href="<%#Config.URLDomain %>jobs/new-jobs-in-the-last-7-days/" title="View jobs listed in the last 7 days">New jobs in last 7 days</a></li>
            <li><a href="<%#Config.URLDomain %>jobs/new-jobs-in-the-last-14-days/" title="View jobs listed in the last 14 days">New jobs in last 14 days</a></li>
            <li><a href="<%#Config.URLDomain %>jobs/-/-/volunteer/" title="View Volunteer opportunities">View volunteer opportunities</a></li>
            <li><a href="<%#Config.URLDomain %>job-seeker-list.aspx" title="Find the perfect employee on artsHub">Find the perfect employee on artsHub</a></li>
            <li><a href="<%#Config.URLDomain %>my-account/" title="Create a resume and be found!">Create a resume and be found!</a></li>
        </ul>
    </div>
 
    <div class="searchListingMREC"><ah:Banner ID="banSharedMREC" runat="server" ZoneName="V5_MREC_SHARED" /></div>
 
    <ahControls:ListView ID="rlvJobsListPage" runat="server" ItemPlaceholderID="phJobsList" DataSourceId="objJobList" OnItemCreated="rlvJobsListPage_ItemCreated"
         AllowCustomPaging="true" AllowPaging="true" PageSize="20" AllowSorting="True">
        <LayoutTemplate>
            <div id="searchList">
                <div id="phJobsList" runat="server"></div>
            </div>
        </LayoutTemplate>
        <EmptyDataTemplate>
            No records found
        </EmptyDataTemplate>
        <ItemTemplate></ItemTemplate>            
    </ahControls:ListView>
    <telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="20" PagedControlID="rlvJobsListPage" OnPageIndexChanged="RadDataPager1_PageIndexChanged">
        <Fields>
            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
            <telerik:RadDataPagerButtonField FieldType="Numeric" />
            <telerik:RadDataPagerButtonField FieldType="NextLast" />           
        </Fields>
    </telerik:RadDataPager>
    
    <asp:ObjectDataSource ID="objJobList" EnablePaging="True" SelectMethod="SearchJobsList" SelectCountMethod="SearchJobsList_Count" runat="server" TypeName="ArtsHub.BLL.Jobs.Job" OnSelecting="objJobList_Selecting">
        <SelectParameters>
            <asp:Parameter DefaultValue="" Name="searchString" Type="String" ConvertEmptyStringToNull="false" />
            <asp:Parameter Name="publicationId" Type="Int32" DefaultValue="1" />
            <asp:Parameter Name="listingTemplate" Type="int32" DefaultValue="0" />
            <asp:Parameter Name="category" Type="Int32" DefaultValue="0" />
            <asp:Parameter Name="opportunityType" Type="Int32" DefaultValue="0"  />
            <asp:Parameter Name="countryId" Type="Int32" DefaultValue="0" />
            <asp:Parameter Name="regionId" Type="Int32" DefaultValue="0" />
            <asp:Parameter Name="status" Type="Int32" DefaultValue="1" />
            <asp:Parameter Name="searchFuzzinessType" Type="Int32" DefaultValue="0" />
         </SelectParameters>
    </asp:ObjectDataSource>
 
    <telerik:RadAjaxManager ID="ramListJobs" runat="server" DefaultLoadingPanelID="alpListJobs">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadDataPager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rlvJobsListPage" LoadingPanelID="alpListJobs" />
                    <telerik:AjaxUpdatedControl ControlID="RadDataPager1" LoadingPanelID="alpListJobs" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="alpListJobs" runat="server" />
 
 
</asp:Content>
 
public partial class global_listjobs : ArtsHub.ArtsHubPage
{
 
    protected override void OnLoad(EventArgs e)
    {
        ScriptManager.GetCurrent(this.Page).Navigate += new EventHandler<HistoryEventArgs>(CheckAJAXPaging);
 
        //Finally call base class constructor
        base.OnLoad(e);
    }
 
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (HttpContext.Current.Items["newIndex"] != null)
        {
            RadDataPager1.FireCommand("Page", HttpContext.Current.Items["newIndex"].ToString());
            ArtsHub.BLL.Emailing.Emailing.EmailBug("Firing page for newIndex = " + HttpContext.Current.Items["newIndex"].ToString(), "");
        }
        else ArtsHub.BLL.Emailing.Emailing.EmailBug("Context newIndex was null", "");
    }
 
    public void CheckAJAXPaging(object sender, HistoryEventArgs e)
    {
 
        ArtsHub.BLL.Emailing.Emailing.EmailBug("Check AJAX Paging fired - state was " + e.State.Count.ToString(), "");
        if (e.State.Count > 0) ArtsHub.BLL.Emailing.Emailing.EmailBug("Check AJAX Paging fired - key 0 was " + e.State[0].ToString(), "");
 
        if (e.State.Count <= 0)
        {
            // Setup default state
            HttpContext.Current.Items.Add("newIndex", "0");
            //RadDataPager1.FireCommand("Page", "0");
        }
        else
        {
            HttpContext.Current.Items.Add("newIndex", e.State[0].ToString());
 
            //RadDataPager1.FireCommand("Page", e.State[0].ToString());
        }
 
    }
 
    protected void rlvJobsListPage_ItemCreated(object sender, ListViewItemEventArgs e)
    {
        // Grab a reference to the data item
        ListViewDataItem currentItem = (e.Item as ListViewDataItem);
        Job thisListing = (Job)currentItem.DataItem;
 
        // Set the item template to use
        rlvJobsListPage.ItemTemplate = Templating.Render_ITemplate(ArtsHub.Globals.SectionIds.Jobs, thisListing.ListingTemplate, TemplateType.Summary, this);
    }
 
    protected void objJobList_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        string searchText = (JobSearchWidget.SearchString.Text.Trim().ToLower() == "search text") ? "" : JobSearchWidget.SearchString.Text.Trim();
        e.InputParameters["searchString"] = searchText;
        e.InputParameters["publicationId"] = ArtsHub.Config.PubNum;
        e.InputParameters["category"] = JobSearchWidget.CategorySelector.SelectedCategoryId;
        e.InputParameters["opportunityType"] = JobSearchWidget.OpportunityTypeSelector.SelectedOpportunityType;
        e.InputParameters["countryId"] = JobSearchWidget.CountrySelector.selectedCountryCode;
        e.InputParameters["regionId"] = JobSearchWidget.CountrySelector.selectedRegionId;
        e.InputParameters["searchFuzzinessType"] = JobSearchWidget.SearchAccuracyTypeSelector.SelectedSearchAccuracyType;
    }
 
 
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        rlvJobsListPage.DataBind();
    }
 
    protected void RadDataPager1_PageIndexChanged(object sender, RadDataPagerPageIndexChangeEventArgs e)
    {
       if (Page.IsPostBack) ScriptManager.GetCurrent(this.Page).AddHistoryPoint("p", e.NewPageIndex.ToString(), "Job Search Page " + e.NewPageIndex.ToString());
    }
 
}
Simon
Top achievements
Rank 1
 answered on 03 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?