Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
203 views
Hi all,

I'm kinda wondering. I ran into the trouble with upload and ajax (which as I understand is not working). I followed the example of:

http://www.telerik.com/help/aspnet-ajax/upload_uploadingajax.html

But I still have no proper upload. Basicly I have a tabbed control ajaxfied. I created a small sample demonstrating where I am now:

-- aspx

<%

@ Page Language="vb" AutoEventWireup="false" CodeBehind="test.aspx.vb" Inherits="cms2009beheer.test" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<radscriptblock id="RadScriptBlock1" runat="server">

<script type="text/javascript">

// on upload button click temporarily disables ajax to perform

// upload actions

function conditionalPostback(sender, args)

{

if(args.EventTarget == "<%= Button1.UniqueID %>")

{

args.EnableAjax =

false;

}

}

</script>

</

radscriptblock>

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

Width="75px">

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

style="border: 0px;" />

</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True"

DefaultLoadingPanelID="RadAjaxLoadingPanel1">

<ClientEvents OnRequestStart="conditionalPostback" />

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1">

<Tabs>

<telerik:RadTab Text="t1">

</telerik:RadTab>

<telerik:RadTab Text="t2">

</telerik:RadTab>

</Tabs>

</telerik:RadTabStrip>

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">

<telerik:RadPageView runat="server" ID="p1">

<telerik:RadUpload ID="RadUpload1" runat="server" />

<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</telerik:RadPageView>

<telerik:RadPageView runat="server" ID="p2">

just a sample

</telerik:RadPageView>

</telerik:RadMultiPage>

</form>

</

body>

</

html>



-- vb

Partial

Public Class test

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

If RadUpload1.UploadedFiles.Count > 0 Then

System.Threading.Thread.Sleep(3000)

End If

 e

nd Sub

End

Class

This is just a simple test to see if I can touch the uploaded files

Veselin Vasilev
Telerik team
 answered on 02 Dec 2009
1 answer
101 views
When I apply

    <tools name="DropdownToolbar" dockable="true" >
        <tool name="ApplyClass" width="130px" popupwidth="130px"/>

The mouse over "gray" appears to be of fixed width.
See attached screenshot.

Marc




Dobromir
Telerik team
 answered on 02 Dec 2009
3 answers
123 views
Hi,

We are using UserControl editForm to insert/update records. We need to perform some client side validations .
So we have included a onclick attribute and associate a javascript function for the Update button inside the usercontrol.The Client side Onclick event is getting fired only on the parent page and not on the user control. so we placed the client side function on the parent page and upon returning true the pgae is not getting submitted.

Is something we are missing.Any help on this would be greatly apprecaiated.
Please find below the client sid ecode in the parent page

function

 

OnUpdateClick()

 

{

 

var hasActiveChild = document.getElementById("<%=hdnHasActiveChild.ClientID%>").value;

 

 

var confirmMsg = 'There are active children which would also become inactive, Do you want to continue?';

 

 

var hasConsolidation = document.getElementById("<%=hdnHasConsolidation.ClientID%>").value;

 

 

var allowPostBsckforActive = '';

 

 

var allowPostBsckforConsolidation = '';

 

 

 

 

if(hasActiveChild =='Yes' && isActiveChecked =='No')

 

{

 

var result = confirm(confirmMsg);

 

 

if(result)

 

{

document.getElementById(

"<%=hdnDeActiveChildProducts.ClientID%>").value = 'Yes';

 

allowPostBsckforActive =

'Yes';

 

 

}

 

else

 

{

document.getElementById(

"<%=hdnDeActiveChildProducts.ClientID%>").value = 'No';

 

allowPostBsckforActive =

'No';

 

}

}

 

//

 

 

 

if(hasConsolidation == 'Yes')

 

{

 

var result = confirm('The selected consolidation will be deleted, do you want to proceed?');

 

 

if(result)

 

{

document.getElementById(

"<%=hdnDeleteConsolidation.ClientID%>").value = 'Yes';

 

allowPostBsckforConsolidation =

'Yes';

 

 

}

 

else

 

{

document.getElementById(

"<%=hdnDeleteConsolidation.ClientID%>").value = 'No';

 

allowPostBsckforConsolidation =

'No';

 

 

}

}

 

 

if((allowPostBsckforConsolidation == 'Yes' && (allowPostBsckforActive=='' || allowPostBsckforActive=='No')) || (allowPostBsckforActive == 'Yes' && (allowPostBsckforConsolidation=='' || allowPostBsckforConsolidation=='No') ))

 

{

alert(

'true');

 

 

return true;

 

_doPostback();

}

 

else

 

{

alert(

'false');

 

 

return false;

 

}

}



Thanks and Regards
V.Balamurali
Veli
Telerik team
 answered on 02 Dec 2009
2 answers
63 views
Hi All,

How can i force user to enter values in to the fields in Insert/Update.
Like Showing a message box with message which fields are empty.

Please help me regarding this.
PM
Top achievements
Rank 1
 answered on 02 Dec 2009
4 answers
114 views
I have produced the following code sample:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="exampleForTelerik._Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
    <asp:UpdatePanel ID="updatePanel1" runat="server"
        <ContentTemplate> 
            <ajax:TabContainer runat="server" ID="tc"
                    <ajax:TabPanel runat="server" ID="tpGeneralInformation" HeaderText="General Information"
                        <ContentTemplate> 
            <telerik:RadEditor ID="edHeaderText" runat="server" EnableEmbeddedBaseStylesheet="true" Width="700px" ><CssFiles><telerik:EditorCssFile Value="" /></CssFiles></telerik:RadEditor> 
            </ContentTemplate> 
            </ajax:TabPanel> 
            <ajax:TabPanel runat="server" ID="tpSubmission" HeaderText="Submission"
                <ContentTemplate> 
                    <asp:Button runat="server" Text="Press me" /> 
                </ContentTemplate> 
            </ajax:TabPanel> 
            </ajax:TabContainer> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
    </form> 
</body> 
</html> 
 


After clicking the button in the second tab and then clicking back to the first tab, the formatting of the Editor gets completely messed up.  Is there an easy way to fix this?  Note that I have to include the empty
            <CssFiles><telerik:EditorCssFile Value="" /></CssFiles>
part of my code so that my master css file doesn't overwrite the css of the editor.


Thanks in advance,
Ben
Rumen
Telerik team
 answered on 02 Dec 2009
1 answer
45 views
Hello all ,

 Lemme know what s the replacement / Alternate for RadEditor.get_uniqueID() in Telerik Control 2009 ? i found get_id() method shall i proceed with this ?

-Prince
Rumen
Telerik team
 answered on 02 Dec 2009
4 answers
167 views
Hi,

Y have a problem with the rendering of radcontrol under IIS 6.0 on WS 2003.

I post 4 pictures to show you my problem.

see the image 1 =>gooddisplay_iss7_ws_seven.jpg
configuration:
  • OS: Windows Seven
  • browser :IE 8
  • ISS : ISS 7

see the image 2 =>gooddisplay_iss6_ws_2003_firefox.jpg
configuration:
  • OS: Windows Serveur 2003
  • browser :FireFox 3.5.5
  • ISS : ISS 6

see the image 3 =>baddisplay_iss6_ws_2003.jpg
configuration:
  • OS: Windows Serveur 2003
  • browser :IE 8
  • ISS : ISS 6

see the image 4 =>gooddisplay_iss7_ws_seven_firefox.jpg
configuration:
  • OS: Windows Seven
  • browser :Firefox 3.5.5
  • ISS : ISS 7

Could you explain me why I have a difference?

Thanks.

Dimo
Telerik team
 answered on 02 Dec 2009
2 answers
212 views
Hi,

First I want to give compliments about the amazing products telerik delivers. I'm using the Silverlight controls for a while and since I'm so satisfied I decided to use the radcontrols asp.net ajax as well.

At the moment I'm implementing the editor radcontrol in my website.

Everything is working fine, although I have one little question.
Is there a simple way to create some kind of text box in which I can put my image URL, instead of using the default image manager for inserting images? Something like the properties window, after right clicking an image.
If this is possible how am I able to do this, without to much trouble?

Looking forward for a reply.

With kind regards,

Dako
Dako -
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
249 views
Hi, 
 
I am using the radgrid with MasterTableView and DetailTables,in the detailTable ,there is GridTableView. 
In the GridTableView ,i have itemtemplate(Image button) column,my requirement is i want to bind the image url for that image button but i am unable to find the image button in the radgrid item data bound event.i am attaching the code below,please help me how i can aceive this : 

<
rad:RadGrid ID="radGridPlans" runat="server" 
            Skin="Outlook2007" 
            AutoGenerateColumns="False" 
            Width="100%" GridLines="None" 
            AllowPaging="True" PageSize="100" 
            AllowMultiRowSelection="True" 
            EnableAjax="True" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="80"    > 
            <MasterTableView 
                DataKeyNames="PlanMstrID" Name="PlanMasters" 
                CommandItemDisplay="Top" 
                EditMode="InPlace" Width="100%" 
                GroupsDefaultExpanded="False" 
                NoMasterRecordsText="Please select an item in the list on the left."
                <DetailTables  > 
                    <rad:GridTableView DataKeyNames="PlanID" Name="PlanHeaders" Width="100%" runat="server"  > 
                        <Columns> 
                            <rad:GridClientSelectColumn UniqueName="SelectColumn"
                                <HeaderStyle Width="16px" /> 
                            </rad:GridClientSelectColumn> 
                     
                         
                            <rad:GridTemplateColumn UniqueName="EditColumn" > 
                                <HeaderStyle Width="16px"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
                                <ItemTemplate> 
                                    <asp:ImageButton ID="btnEditPlan" runat="server" CommandName="EditPlan" ImageUrl="~/Images/Edit.gif"
                                    </asp:ImageButton> 
                                </ItemTemplate> 
                            </rad:GridTemplateColumn> 
                            <rad:GridButtonColumn UniqueName="DeleteColumn"    CommandName="DeletePlan" Text="Delete plan..." 
                                ConfirmText="Are you sure you want to delete this plan?" ButtonType="ImageButton" 
                                ImageUrl="~/Images/Delete.gif" 
                            > 
                                <HeaderStyle Width="16px" /> 
                                <ItemStyle HorizontalAlign="Center" Height="16px" Width="16px"    /> 
                            </rad:GridButtonColumn> 
                            <rad:GridBoundColumn UniqueName="PlanID" DataField="PlanID" HeaderText="PlanId" Visible="False"
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="PlanVersion" DataField="PlanVersion" HeaderText="Version"
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="PlanVersionDesc" DataField="PlanVersionDesc" HeaderText="Description"
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="PlanStatusName" DataField="PlanStatusName" HeaderText="Status"
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="PlanRevenueType" DataField="PlanRevenueType" HeaderText="Revenue Type" Visible="False"
                            </rad:GridBoundColumn> 
                             <rad:GridTemplateColumn UniqueName="RevenueType" DataField="PlanRevenueTypeID" HeaderText="Rev. Mode"
                                <HeaderStyle HorizontalAlign="Center" ></HeaderStyle
                                <ItemStyle HorizontalAlign="Center"></ItemStyle> 
                                <ItemTemplate> 
                                     <asp:Image  ID="imgRevType" runat="server" ImageUrl="" ToolTip="Room Revenue Type: Full Calendar=Monthly Revenues; Multiple Days=Daily Revenues..." /> 
                                </ItemTemplate> 
                            </rad:GridTemplateColumn> 
                             
                            <rad:GridBoundColumn UniqueName="LastEditUser" DataField="LastEditUser" HeaderText="Last Edited By"
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="LastEditTS" DataField="LastEditTS" HeaderText="Last Edited" 
                                DataFormatString="{0:MM/dd/yyyy hh:mm tt}" 
                            > 
                            </rad:GridBoundColumn> 
                            <rad:GridBoundColumn UniqueName="PlanMstrFiscalYear" DataField="PlanMstrFiscalYear" HeaderText="PlanMstrFiscalYear" Visible="False"
                            </rad:GridBoundColumn> 
                        </Columns> 
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px" /> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px" /> 
                        </ExpandCollapseColumn> 
                    </rad:GridTableView> 
                </DetailTables> 
                <CommandItemTemplate> 
                    <div style="padding:3px 3px;" > 
                        <asp:LinkButton ID="btnNewPlan" runat="server" CommandName="NewPlan"
                            <img style="border:0px;vertical-align:Middle;" src="~/Images/New.gif" runat="server" alt="" /> 
                            Create New Plan... 
                        </asp:LinkButton> 
                        &nbsp; 
                        <asp:LinkButton ID="btnDeletePlan" runat="server" CommandName="DeleteSelected" 
                            OnClientClick="javascript:return confirm('Delete selected plan(s)?')" > 
                            <img style="border:0px;vertical-align:Middle;" src="~/Images/Delete.gif" runat="server" alt="" /> 
                            Delete selected plan(s)... 
                        </asp:LinkButton> 
                    </div> 
                </CommandItemTemplate> 
                <Columns> 
                    <rad:GridBoundColumn UniqueName="PlanMstrId" DataField="PlanMstrId" HeaderText="PlanMstrId" Visible="False"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PropName" DataField="PropName" HeaderText="Property"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PlanTypeName" DataField="PlanTypeName" HeaderText="Type"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PlanMstrFiscalYear" DataField="PlanMstrFiscalYear" HeaderText="Year"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PlanStatusName" DataField="PlanStatusName" HeaderText="Status"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PlanVersions" DataField="PlanVersions" HeaderText="Versions"
                    </rad:GridBoundColumn> 
                    <rad:GridBoundColumn UniqueName="PlanHeaderLastEditTS" DataField="PlanHeaderLastEditTS" HeaderText="Last Edited" 
                        DataFormatString="{0:MM/dd/yyyy}" 
                    > 
                    </rad:GridBoundColumn> 
                </Columns> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn Visible="True"
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Top" /> 
            </MasterTableView> 
            <ClientSettings 
                EnableClientKeyValues="True" 
            > 
                <Selecting AllowRowSelect="True" /> 
                <Resizing AllowColumnResize="True" EnableRealTimeResize="True" /> 
                <Scrolling    UseStaticHeaders="True"/> 
            </ClientSettings> 
            <SortingSettings SortedBackColor="212, 208, 200" /> 
        </rad:RadGrid> 
======================================================================================================================
i want to find image button "btnEditPlan" from the above source and bind the Image URL for that in the item data bound.
 
 
Princy
Top achievements
Rank 2
 answered on 02 Dec 2009
3 answers
141 views
Hello,

I am looking for an input allowing to enter units values for all css admitted units, like 10px,50%,5em etc.

Could we do this with Telerik, I found nothing in library ?
Seems the only way is to create a composite control with a RadMaskedTextBox and a radCombobox ?


Thanks for ideas.
CS
Dimo
Telerik team
 answered on 02 Dec 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?