Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
115 views
Hi,

I've encountered a problem after upgrading from RadControls for ASP.Net AJAX 2008 Q3 1314 to 2009 Q2 826.

I'm using rad windows and when the user closes one they get a warning in a rad confirm box, if they click ok the window should close if they click cancel it stays.

This all worked great in the 2008 Q3 release but in the newer 2009 Q2 release when you click ok on the rad confirm box the window doesn't close.

Here are the scripts I am using to open the windows and to handle the showing on the confirm box:

    function OpenAWindow(url, title) {  
        var win = radopen(url, null);  
        win.set_title(title);         
        win.set_status("");  
        win.add_pageLoad(function() { win.set_status(""); });  
        alert(win.offsetLeft);  
    }  
      
    function OnBeforeClose(sender, arg) {  
        function callbackFunction(arg) {  
            if (arg) {  
                sender.remove_beforeClose(OnBeforeClose);  
                sender.close();  
                if (!AnyWindowsVisible()) {  
                    document.getElementById('<%= btnClose.ClientID %>').click();  
                }  
            }  
        }  
        arg.set_cancel(true);  
        var messageBody = document.getElementById('<%= hdnWarningMessage.ClientID %>').value;  
        var messageTitle = document.getElementById('<%= hdnWarningTitle.ClientID %>').value;  
        radconfirm(messageBody, callbackFunction, 300, 100, null, messageTitle);  
    }  
 
    function AnyWindowsVisible() {  
        var result = false;  
        var manager = GetRadWindowManager();  
        for (var i = 0; i < manager.get_windows().length; i++) {  
            if (manager.get_windows()[i].isVisible()) {  
                result = true;  
                break;  
            }  
        }  
        return result;  
    }  
 
    function OnClientShow(sender) {  
        sender.add_beforeClose(OnBeforeClose);  
    } 
and the html:

<asp:UpdatePanel ID="pnlScript" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">  
    <ContentTemplate> 
        <asp:Literal ID="litScriptAnchor" runat="server" /> 
        <asp:HiddenField ID="hdnWarningMessage" runat="server" /> 
        <asp:HiddenField ID="hdnWarningTitle" runat="server" /> 
    </ContentTemplate> 
</asp:UpdatePanel> 
<div class="TelerikWindowRestrictedZone_Container">  
    <div class="TelerikWindowRestrictedZone_Header">  
    </div> 
    <div id="WindowContainer" class="TelerikWindowRestrictedZone_Body">  
    </div> 
</div> 
<asp:UpdatePanel ID="pnlWindowCommands" runat="server">  
    <ContentTemplate> 
        <asp:Button ID="btnClose" runat="server" Text="close" OnClick="btnClose_Click" Style="display: none;" /> 
    </ContentTemplate> 
</asp:UpdatePanel> 
<asp:UpdatePanel ID="pnlWindows" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">  
    <ContentTemplate> 
        <telerik:RadWindowManager ID="ucRadWindowManager" RestrictionZoneID="WindowContainer" OnClientDragEnd="FixFocus" OnClientResize="FixFocus" OnClientCommand="FixFocus" OnClientShow="OnClientShow" PreserveClientState="true" runat="server" Skin="Telerik">  
        </telerik:RadWindowManager> 
    </ContentTemplate> 
</asp:UpdatePanel> 

any ideas?

Thanks,

Ian
ian webster
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
86 views
Hello,

I am searching for the faster method to do an order input.
As this is a very common request, I suppose that Telerik has already some idea on the best optimized solution.

I need to enter a variable number of order items, each line being
- a radCombobox to select a product, selecting the product should fill next fields with default alue
- a Price non editable display box
-  an editable quantity input box with a default value of 1
-  a non editable bow with total=price*quantity

A button sould allow adding a new order line, anoter suppressing a line (just as in RadUpload)

Products/Prices come from a very large table which necessitate calling a web service to find the product with its name.

Users should see the grand total of order refreshed after any change in quantity or product, they could change product and quantity without having to click a button: simply entering the new value.

I am puzzled should I use RadInput controls with lot of javascript or RadGrid.

With radinput I get very fast process, but difficulty is addig a new row (how to add a radCombobox clientside ?) and reading the order lines server side when order is finshed.
With RadGrid, I need to click lot of button to go insert/edit mode and the various call back are slow because the full asp.net page lifecycle is slow.

Thanks for help.

CS
Nikolay Rusev
Telerik team
 answered on 22 Oct 2009
2 answers
100 views
Hi,

Is there a way to disable node expanding when drag is over the node? I have read somewhere that this is by default, and it seems you wanted to implement this to have windows like feature. But, I need to be able to disable this. Is there some workaround for this on client side?

Another issue related to dragging. When list of nodes is long and I need to drop node at the bottome of the treeview which is not displayed on the screen, auto-scroll does not work. It does not work on IE or Firefox. This can be achieved by using mouse scrolling wheel, but this is something our clients wont like.

Thanks,
Radovan
Radovan Radic
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
63 views
I can't seem to find the settings to make the splitter appear white, no border and show just a button to collapse or expand. I have it full screen and one at top, left, right, and bottom. I would like to it appear with a just a button, the background of the pages are white. Any help would be awesome. Thanks
Svetlina Anati
Telerik team
 answered on 22 Oct 2009
1 answer
230 views
Hi,

this is my  datepicker   <telerik:RadDatePicker ID="RadReceiveAFCA"     
                                                     DbSelectedDate='<%# Bind("ReceiveAFCA")  %>'
                                                     DateInput-DateFormat="dd/mmm/yyyy"   SharedCalendarID="sharedCalendar"  
                                                     Width="100px"    runat="server">
                                                 <DateInput ID="DateInput1" runat="server" DateFormat ="dd/MM/yyyy"  DisplayDateFormat="dd/MM/yyyy" />
                                                </telerik:RadDatePicker>

When i save null date table has mindate. (1/1/1900 ). How can i stop saving min date and save null?

This is my save code

 string sqlStr = "update  tbl_DATA_Docs set     DocuStartP     =    '" + dtpDocStart.SelectedDate  + "'    ,    " +
                            "    DocuStartF     =    '" + RadDocuStartF.SelectedDate + "'    ,    " +
                            "    DocuEndP     =    '" + RadDocuEndP.SelectedDate + "'    ,    " +
                            "    DocuStartA     =    '" + RadDocuStartA.SelectedDate + "'    ,    " +
                            "    DocuEndF     =    '" + RadDocuEndF.SelectedDate + "'    ,    " +
                            "    DocuEndA     =    '" + RadDocuEndA.SelectedDate + "'    ,    " +
                            "    SubmitForIDCP     =    '" + RadSubmitForIDCP.SelectedDate + "'    ,    " +
                            "    SubmitForIDCF     =    '" + RadSubmitForIDCF.SelectedDate + "'    ,    " +
                            "    SubmitForIDCA     =    '" + RadSubmitForIDCA.SelectedDate + "'    ,    " +
                            "    ReturnFromIDCP     =    '" + RadReturnFromIDCP.SelectedDate + "'    ,    " +
                            "    ReturnFromIDCF     =    '" + RadReturnFromIDCF.SelectedDate + "'    ,    " +
                            "    ReturnFromIDCA     =    '" + RadReturnFromIDCA.SelectedDate + "'    ,    " +
                            "    IssueForCommentsP     =    '" + RadIssueForCommentsP.SelectedDate + "'    ,    " +
                            "    IssueForCommentsF     =    '" + RadIssueForCommentsF.SelectedDate + "'    ,    " +
                            "    IssueForCommentsA     =    '" + RadIssueForCommentsA.SelectedDate + "'    ,    " +
                            "    ClientReturnedCommentsP     =    '" + RadClientReturnedCommentsP.SelectedDate + "'    ,    " +
                            "    ClientReturnedCommentsF     =    '" + RadClientReturnedCommentsF.SelectedDate + "'    ,    " +
                            "    ClientReturnedCommentsA     =    '" + RadClientReturnedCommentsA.SelectedDate + "'    ,    " +
                            "    ReceiveForCommentsP     =    '" + RadReceiveForCommentsP.SelectedDate + "'    ,    " +
                            "    ReceiveForCommentsF     =    '" + RadReceiveForCommentsF.SelectedDate + "'    ,    " +
                            "    ReceiveForCommentsA     =    '" + RadReceiveForCommentsA.SelectedDate + "'    ,    " +
                            "    IncorporateCommentsP     =    '" + RadIncorporateCommentsP.SelectedDate + "'    ,    " +
                            "    IncorporateCommentsF     =    '" + RadIncorporateCommentsF.SelectedDate + "'    ,    " +
                            "    IncorporateCommentsA     =    '" + RadIncorporateCommentsA.SelectedDate + "'    ,    " +
                            "    IssueForApprovalP     =    '" + RadIssueForApprovalP.SelectedDate + "'    ,    " +
                            "    IssueForApprovalF     =    '" + RadIssueForApprovalF.SelectedDate + "'    ,    " +
                            "    IssueForApprovalA     =    '" + RadIssueForApprovalA.SelectedDate + "'    ,    " +
                            "    ClientReturnFromIFAP     =    '" + RadClientReturnFromIFAP.SelectedDate + "'    ,    " +
                            "    ClientReturnFromIFAF     =    '" + RadClientReturnFromIFAF.SelectedDate + "'    ,    " +
                            "    ClientReturnFromIFAA     =    '" + RadClientReturnFromIFAA.SelectedDate + "'    ,    " +
                            "    ReceiveForComments2P     =    '" + RadReceiveForComments2P.SelectedDate + "'    ,    " +
                            "    ReceiveForComments2F     =    '" + RadReceiveForComments2F.SelectedDate + "'    ,    " +
                            "    ReceiveForComments2A     =    '" + RadReceiveForComments2A.SelectedDate + "'    ,    " +
                            "    IncorporateComments2P     =    '" + RadIncorporateComments2P.SelectedDate + "'    ,    " +
                            "    IncorporateComments2F     =    '" + RadIncorporateComments2F.SelectedDate + "'    ,    " +
                            "    IncorporateComments2A     =    '" + RadIncorporateComments2A.SelectedDate + "'    ,    " +
                            "    IssueForAFCP     =    '" + RadIssueForAFCP.SelectedDate + "'    ,    " +
                            "    IssueForAFCF     =    '" + RadIssueForAFCF.SelectedDate + "'    ,    " +
                            "    IssueForAFCA     =    '" + RadIssueForAFCA.SelectedDate + "'    ,    " +
                            "    ReceiveAFCP     =    '" + RadReceiveAFCP.SelectedDate + "'    ,    " +
                            "    ReceiveAFCF     =    '" + RadReceiveAFCF.SelectedDate + "'    ,    " +
                            "    ReceiveAFCA     =    '" + RadReceiveAFCA.SelectedDate + "'    ,    " +
                            "    OURACTION     =    '" + RadOURACTION.SelectedDate + "'    ,    " +
                            "    Progress     =    '" + txtProgress.Text + "'    ,    " +
                            "    CLIENTACTION     =    '" + RadCLIENTACTION.SelectedDate + "'    where DocNo= '" + DocNo + "'";

            SqlCommand cmd = new SqlCommand(sqlStr, Conn);
            cmd.ExecuteNonQuery();
            ltrPlan.Text = "<SPAN style='color=blue'><br>Succesfully Updated<br></SPAN>";
            cmd.Dispose();


Johny
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
79 views


Hi

I need to have headers as below for my requirement.

--------------------------------------------------------------------------------
                                      Section1                      section2
--------------------------------------------------------------------------------
Column1  column2        column3   column4     Column5  column6
---------------------------------------------------------------------------------

visually column3 and column4 are under section1 header, Column5 and column6 will be under Section2 header

Can you please tell me how to achieve this?

Regards,
Satya.
Shinu
Top achievements
Rank 2
 answered on 22 Oct 2009
1 answer
168 views
Hello,

I have a radupload in a radgrid's edit form template and I've set the allowed file extensions in the properties window as well as set them in the validating file event method.  I also have a radupload in a form on my page outside of the grid and I don't think the allowed file extensions property worked correctly with that one either but it didn't matter because I have java script that I use in a custom validator  that took care of that along with making the upload a required field.  Do I have to have java script and the custom validator to have the allowed file extensions property to work or should I just have to set the files to be allowed in the property window?  If I do need to use the java script and custom validator how do I find a control that is in a grid's edit form template using javascript?

Thanks for the help,
Kirk
Genady Sergeev
Telerik team
 answered on 22 Oct 2009
1 answer
109 views
Hi,

The height of the header of my grid is not predefined. When all headers are single-row it's OK. But when some headers are two-row (the column header text something like this: First row<br/>Second row) it looks poorly: just above the vertical scrollbar it is single-row which produces unneccessary lines. See an example in the attached little print-screen.
This is when using IE, Chrome, Opera and Safari. When using FireFox it looks OK - the space above the scrollbar is colored as grid.BackColor, which is acceptable.

I'm using RadControls for ASP.NET AJAX Q2 2009.

Best regards
Tomasz
tmlipinski
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
93 views
How can i block Every last tuesday in Every Month..
Princy
Top achievements
Rank 2
 answered on 22 Oct 2009
2 answers
156 views
Hi there,

I try to use the RADEditor in a SharePoint PageLayout as a substiture for the PublishingWebControls:RichHtmlField.

First I tried to use telerik:RadHtmlField instead of the default MOSS-Tag. But I want to set my own, individual (dynamical) paths for the Editor's ImageManager, DocumentManager, etc. so I can't use the config-file. As a matter of this, I created my own class which has Telerik.SharePoint.FieldEditor.RadHtmlField as base-class and a public method that returns the radEditorControl:

    public class SLRADHtmlField : Telerik.SharePoint.FieldEditor.RadHtmlField 
    { 
        public MOSSRadEditor GetMOSSRADEditorControl() 
        { 
            return radEditorControl; 
        } 
    } 


Now I can replace <telerik:RadHtmlField id="..." FieldName="Resolution".../> by my own tag <sl:SLRadHtmlField id="..." FieldName="Resolution".../>

In the overridden OnLoadComplete-Method in my CodeBehind-Class now I have access to the RadEditor-Control by using the following code:

MOSSRadEditor RadEditor = SLRADHtmlField.GetMOSSRADEditorControl(); 


After this, I can modify ImageManager-settings and so on...

First trying seemed to be successful, the entered text was saved after submitting. So I tried some little more like formatting in bold, italic, underline. That was successfully too.. partial. The underline-style was not saved. After that, I tried to insert an image. Adding the image to the editor-field was successful too but after saving, the image was gone.

I had a look to the html-tab in the editor and both, the <span>-tag for the underlining and the <img>-tag were removed.
After a lot of googling and reading other threads in this forum, I found this page about contentfilters. Now I added this line to my code:

RadEditor.ContentFilters = EditorFilters.None; 


It prevents that the underline-tag is stored as <span> but remains as <u>-tag.
This solved the problem with the disappearing underline but not with the disappearing <img>-tag.

It seems that some special tags (like <span> or <img>) are stripped out completely but I haven't looked yet which other tags are also removed.

Meanwhile I don't have any ideas no more...

Could you please give me some guidance?

I installed the radeditormoss.wsp and added references in my Visual Studio project to the RadEditorSharePoint.dll Version 5.5.1.0 and because of that to the Telerik.Web.UI.dll Version 2009.2.826.20.

Greetings from Germany,
Ricky Mattischeck
Ricky Mattischeck
Top achievements
Rank 1
 answered on 22 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?