Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 views
Good Morning All 


I am Opening a Page as a Popup i am using Telerik WIndow which has similar functionality when opening a Popup like this 

 
function OpenPopUp(val_real, vis) {
          var myWidth = 0, myHeight = 0;
          if (typeof (window.innerWidth) == 'number') {
              //Non-IE
              myWidth = window.innerWidth;
              myHeight = window.innerHeight;
          } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
              //IE 6+ in 'standards compliant mode'
              myWidth = document.documentElement.clientWidth;
              myHeight = document.documentElement.clientHeight;
          } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
              //IE 4 compatible
              myWidth = document.body.clientWidth;
              myHeight = document.body.clientHeight;
          }
 
 
          myWidth = myWidth / 2 - 150;
          myHeight = myHeight / 2 - 50;
          window.open('MyPage.aspx?Val=' + val_read, 'width=700,height=160,top=' + myHeight + ',left=' + myWidth)
          return false;
 
 
      }

this "myPage.aspx" page has a button that person some updates to the Database on the server side. This is opened as a popup and there is a grid below , so what i want to do after the Update to the Database has happened , i want to refresh the Grid, i have this code 
 
//This code is used to provide a reference to the radwindow "wrapper"
     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 az well)            
         return oWindow;
     }
 
 
     function CloseOnReload() {
         //alert("Dialog is about to close itself");
         GetRadWindow().close();
         RefreshParentPage();
     }
 
 
     function RefreshParentPage() {
         //alert("Dialog is about to reload parent page");
         GetRadWindow().BrowserWindow.location.reload();
     }
 
 
     function RedirectParentPage(newUrl) {
         alert("Dialog is about to redirect parent page to " + newUrl);
         GetRadWindow().BrowserWindow.document.location.href = newUrl;
     }
 
 
     function CallFunctionOnParentPage(fnName) {
         alert("Calling the function " + fnName + " defined on the parent page");
         var oWindow = GetRadWindow();
         if (oWindow.BrowserWindow[fnName] && typeof (oWindow.BrowserWindow[fnName]) == "function") {
             oWindow.BrowserWindow[fnName](oWindow);
         }
     }
 
 
     function RefreshParentPageWithoutWarning() {
         GetRadWindow().BrowserWindow.document.forms[0].submit();
     }


and on the server side i have this 


Response.Write("<Script>return RefreshParentPageWithoutWarning();</script>")
 

or 

SavetoDB(Values)
ScriptManager.RegisterStartupScript(Page, Me.GetType(), "", "RefreshParentPageWithoutWarning()", True)
 


My problem here is that it Refresh the page before it does a Database Update, and if it refreshes the page , the Database update ends up not being done. 


Thanks
     
Vuyiswa
Top achievements
Rank 2
 answered on 24 Feb 2012
6 answers
353 views
Hi,

We had the page which was already in .NET and was working perfectly fine previously. We just modified the same page to add few additional telerik controls (mainly Tabs and RadListBox)..
Some of users are facing the above error and they are using IE7.
We are not able to re-create the issue.
Could you please suggest what could be the issue..

Thanks
Best Regards
Yogesh
Peter Filipov
Telerik team
 answered on 24 Feb 2012
3 answers
554 views
Is it possible to access other controls in EditTemplate when in edit mode beside the drop down list, because drop down list causes post back we can handle the event and access the other controls like you mentioned above. What I want to do is when user click the edit button on row item, I want to access a textbox which is in the EditTemplate and enable a required field validator on this text box. The field is required or not required depends on the drop down list in the form but since user is in edit mode he is not changing item on the drop down box.

If there a way please also let me know the event in which I should access them.

Please help me, I have spend so much time and still haven't found a solution yet.

Thanks in advance,
Amit
Amit
Top achievements
Rank 1
 answered on 24 Feb 2012
3 answers
180 views
Hello. I have RadGrid with EntityDataSource. When I filter grid by column where expression is generated like :
where it.someValue = 'unicode text'
but it should be like
where it.someValue = N'unicode text'
Is there a way to make it work?
thanks in advance
Marin
Telerik team
 answered on 24 Feb 2012
1 answer
93 views
Hi,

I want to create a RadRotator with Charts (asp.net charting) inside.

I tried a lot of ways to create it, but I couldn't see the charts inside.

the first option:

ascx:

 

<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"

 

 

style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"

 

 

ItemWidth="100">

 

 

    <ItemTemplate>

 

 

    </ItemTemplate>
</telerik:RadRotator >

cs:

Chart chart = new Chart():
// adding chart styles, etc.
RadRotator1.Items.Add(new RadRotatorItem(chart))


second option:

 

 

<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"

 

 

 

 

 

style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"

 

 

 

 

 

ItemWidth="100" OnItemCreated="RadRotator1_ItemCreated">

 

 

 

 

 

    <ItemTemplate>

 

 

 

 

 

 

 

 

        <asp:Chart ID="crtAlerts" runat="server" style="width:100px; Height:100px; margin-top:3px; margin-left:60px">

 

        </asp:Chart

 

    </ItemTemplate>

 

 

 

 

 

</telerik:RadRotator>

cs:

 

 

protected void RadRotator1_ItemCreated(object sender, Telerik.Web.UI.RadRotatorEventArgs e)

 

{

 

 

 

 

    Chart crtAlertsPerSZ = e.Item.FindControl("crtAlerts") as Chart;
    //adding styles to the chart, etc..
}

In this case, OnItemCreated is not fired.


Is there a way to add asp.net chart control to rad rotator?

Thanks.

 

Slav
Telerik team
 answered on 24 Feb 2012
5 answers
339 views
I'm adding items to a RadListBox on the client side and would like to know if there was an easy way to conditionally set a CSS class. 

Currently I must insert each item and then call the get_element method on the RadListBoxItem. 

Ideally I would like to be able to set the CSS class on the RadListBoxItem, add it to a collection, and then use the ListBox's insertItems method to do a batch insert. 

Heres an idea of what I'm doing now.

function employeePickerOnSuccessCallBack(employeeInfo) {
    var listbox = $find(<%= RadListBox1.ClientId %>);
    listbox.trackChanges();
    var item = new window.Telerik.Web.UI.RadListBoxItem();
    item.set_text(employeeInfo.name);
    item.set_value(employeeInfo.value);
    listbox.get_items().add(item);
    if (!employeeInfo.IsActive) {
        var liElement = item.get_element();
        $(liElement).addClass("inactive");
    }
    listbox.commitChanges();
}


Edit: Added some code
Genady Sergeev
Telerik team
 answered on 24 Feb 2012
3 answers
123 views
Hi,

 When i insert  a Radcolorpicker control in Advance form. If i checked the recurrence checkbox and i try to scrolling the form, it moves the
radcolorpicker control. I tried to changes the position property even though it is not working. The happens only in IE with compatibility mode is on.

Can anyone help me to sort out this problem.



Thanks.
Slav
Telerik team
 answered on 24 Feb 2012
5 answers
226 views
May be I am asking too much, but if this feature is allowed your Scheduler will be unbeatable in the market.

> Can I customize footer myself? E.g. there is already a link there for Show All 24 hours. Nice. But I want to put links/icons for 'Show 24 hours', 'Show all day or business days in week view', have a slider control that increases or decreases the MinutesPerRow field. That way we get a ZOOM feature for the scheduler.

Let me know if I can define my own <FooterTemplate> within Scheduler and do all these.

Thanks,
Piyush
Peter
Telerik team
 answered on 24 Feb 2012
1 answer
98 views

I'm trying to implement dual listbox functionality that is nearly identical to the AJAX version of the code sample provided by Telerik:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/dual-listbox-functionality.aspx

However, I need to be able to select multiple rows to move between the two listboxes instead of one at a time as the sample does.  

If I set AllowMultiRowSelection = true for both grids and then attempt to move all items form one grid to the other, I get a JavaScript error.: 

Line: 4083
Error: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: element

The file that is throwing the error appears to be a Microsoft AJAX related scripting file:

// Name:        MicrosoftAjax.debug.js
// Assembly:    System.Web.Extensions
// Version:     4.0.0.0
// FileVersion: 4.0.30319.225
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.js
// Microsoft AJAX Framework.

It appears that some part of the AJAX scripting doesn't like it that one of the grids suddenly has no records.   I tried implementing buttons that move all items form one grid to the other via the code behind, and the JavaScript error still shows up.

Is there a fix or work around for this?  I haven't been able to find one yet :-(

Todd
Top achievements
Rank 1
 answered on 24 Feb 2012
1 answer
115 views
Hi there
             As i needed the culture property for telerik controls I have just upgraded my telerik version(2008) to 2010.3.1317.35. Once the upgradation done everything works fine but all the controls especially telerik RadGrid showing some style issue.
For instance the pagination has gone vertical instead of horizontal, also there are some spacing issues.
I have searched the telerik forums & followed the procedures carefully while upgrading, like replacing the old DLLs with new ones &
adding the references wherever needed. I couldnt get an idea of where im going wrong or what i need to do. Please assist me in this regard & help us sort it out as we're nearing our deployment. For ur info i've attached the screen shot & the mark-up code for that


<telerik:RadGrid ID="dgApplications" runat="server" Width="98%" AutoGenerateColumns="False"
        GridLines="None" OnDeleteCommand="dgApplications_DeleteCommand" AllowFilteringByColumn="false"
        AllowSorting="True" EnableAJAX="True" AllowPaging="True" PageSize="10" Skin="Office2007">
        <MasterTableView DataKeyNames="Id" HorizontalAlign="NotSet" CellSpacing="0">
            <Columns>
                <telerik:GridTemplateColumn UniqueName="Name" ItemStyle-Width="15%" AllowFiltering="False">
                    <ItemTemplate>
                        <asp:Panel ID="pnlAction" runat="server">
                            <p style="padding-left: 6px;">
                                <asp:HyperLink ID="lnkViewFile" CssClass="input-button-forms" runat="server" Visible='<%# ShowViewLink  %>'
                                    ToolTip="View File" Text="<%$ Resources:eRSOLanguage, View %>" />
                                <asp:HyperLink ID="lnkWorkOnFile" CssClass="input-button-forms" runat="server" Visible='<%# ShowWorkOnFileLink %>'
                                    ToolTip="Work On File" Text='<%# EditLinkText %>' />
                                <asp:HyperLink ID="lnkClone" CssClass="input-button-forms" runat="server" Visible='<%# ShowCloneLink %>'
                                    ToolTip="Clone File" Text="<%$ Resources:eRSOLanguage, ApplicationListClone %>" />
                                <asp:LinkButton ID="lnkUnlock" CssClass="input-button-forms" CommandName="Unlock"
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ApplicationReferenceNumber") %>'
                                    runat="server" ToolTip="Unlock" Text="Unlock" Visible="false" />
                                <asp:LinkButton ID="imgbtnDelete" CssClass="input-button-forms" runat="server" CommandName="Delete"
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ApplicationReferenceNumber") %>'
                                    AlternateText="<%$ Resources:eRSOLanguage, Delete %>" Text="<%$ Resources:eRSOLanguage, Delete %>" Visible='<%# HasDeletePermission %>' ToolTip="Delete"
                                    OnClientClick="javascript: return confirm('Localize(RemoveConfirmAL)');" />
                                <asp:HyperLink ID="ViewEventColumn" CssClass="input-button-forms" runat="server"
                                    Visible='<%# ShowEventLink %>' ToolTip="View Events" Text="<%$ Resources:eRSOLanguage, ApplicationListEvents %>" NavigateUrl='<%# "~/Researcher/HomePage/MyEvent.aspx?FileNo=" + DataBinder.Eval(Container.DataItem, "FileNo").ToString()+"&amp;ReturnAddress=~/Researcher/HomePage/MyApplicationList.aspx"%>' />
                                <asp:Label ID="lblAlreadyLocked" runat="server" CssClass="error-Message" Visible="False"></asp:Label>
                            </p>
                        </asp:Panel>
                        <asp:Panel ID="pnlError" Visible="False" Style="padding-left: 6px; padding-top: 4px;
                            padding-bottom: 4px;" runat="server">
                            <asp:LinkButton ID="lnkDeleteInvalidApp" CssClass="input-button-forms" runat="server"
                                CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ApplicationReferenceNumber") %>'
                                AlternateText="<%$ Resources:eRSOLanguage, Delete %>" Text="<%$ Resources:eRSOLanguage, Delete %>" Visible="true" ToolTip="<%$ Resources:eRSOLanguage, Delete %>" OnClientClick="javascript: return confirm('Localize(RemoveConfirmAL)');" />
                            <asp:Label ID="lblError" runat="server" CssClass="error-Message"></asp:Label>
                        </asp:Panel>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn SortExpression="ProjectTitleDisplay" ItemStyle-Width="20%"
                    DataField="ProjectTitle" UniqueName="ProjectTitleDisplay" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListProjectTitle %>"
                    ItemStyle-Height="22px" />
                <telerik:GridBoundColumn SortExpression="PrimaryInvestigatorFullName" ItemStyle-Width="15%"
                    DataField="PrimaryInvestigatorFullName" UniqueName="PIFullNameDisplay" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListPrincipalInvestigator %>" />
                <telerik:GridBoundColumn SortExpression="FileNo" DataField="FileNo" ItemStyle-Width="5%"
                    UniqueName="FileNo" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListFileNo %>" />
                <telerik:GridBoundColumn SortExpression="ApplicationFormName" ItemStyle-Width="15%"
                    DataField="ApplicationFormFullName" UniqueName="ApplicationFormName" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListApplicationFormName %>" />
                <telerik:GridBoundColumn SortExpression="WorkFlowStateName" ItemStyle-Width="10%" DataField="WorkFlowStateName"
                    UniqueName="WorkFlowStateName" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListWorkFlowState %>" />
                <telerik:GridBoundColumn SortExpression="ProjectStatusName" DataField="ProjectStatusName"
                    UniqueName="ProjectStatusName" HeaderText="<%$ Resources:eRSOLanguage, ApplicationListProjectStatus %>" />
                <telerik:GridBoundColumn SortExpression="LastSavedDate" ItemStyle-Width="10%" DataField="LastSavedDate"
                    UniqueName="LastSavedDate" DataFormatString="&lt;nobr&gt;{0:yyyy/MM/d}&lt;/nobr&gt;"
                    HeaderText="<%$ Resources:eRSOLanguage, ApplicationListLastSaved %>" />
                <telerik:GridTemplateColumn UniqueName="Message" ItemStyle-Width="10%" HeaderText="<%$ Resources:eRSOLanguage, Message %>"
                    AllowFiltering="False">
                    <ItemTemplate>
                        <asp:Label ID="lblLastWorkflowLog" runat="server" Text="Label"></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Left" />
                    <HeaderStyle ForeColor="Black" />
                </telerik:GridTemplateColumn>
            </Columns>
            <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="19px" />
            </ExpandCollapseColumn>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
        </MasterTableView>
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <GroupingSettings CaseSensitive="False" />
    </telerik:RadGrid>
Galin
Telerik team
 answered on 24 Feb 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
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
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?