Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
157 views
Hi,

I open  a traditional child window via javascript but I can't return data to my radeditor. I can successfully return to a textbox, but can't to the radeditor. I'm using window.opener.  


I am using master pages as well.

Thanks,


Mike
Rumen
Telerik team
 answered on 24 May 2011
5 answers
200 views
Hello!

I'm using the ViewState, I added paging to Radgrid. When I change page, ViewState is lost. What I can do to avoid this incident happen?

Greetings
Carlos Rodríguez
Carlos Rodriguez
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
185 views
i made this post in the asp.net forum and that might have been the wrong place so i'm adding it here too....

I'm trying to enable drag and drop from RadTreeView to RadEditor following the demo, but i also need to be able to insert text in HTML view. When i call $telerik.getBounds() on the return of editor.get_textArea(), the .x and .y are incorrect, something like 0,1. I am checking prior to this that they are indeed in html mode. This works fine for the alternative in design view and get_contentAreaElement(). Is there a way to get the bounds of the textArea, or just the entire control when in HTML view? ( i dont care if they are over the text box or the entire radEditor).

version 2011 q1 sp2
visual studio 2010 premium/c#
IE9 in standard and compatibility mode, IE8, firefox all do the same thing

function isMouseOverEditorCodeView(editor, events) {  
var textFrame= editor.get_textArea(); 
var textRect= $telerik.getBounds(textFrame); 
var mouseX = events.clientX;
var mouseY = events.clientY; 
if (mouseX < (textRect.x + textRect.width) && mouseX > textRect.x &&  
    mouseY < (textRect.y + xtRect.height) && mouseY > textRect.y) {  
return true;  
return false;  
}
Rumen
Telerik team
 answered on 24 May 2011
5 answers
252 views
Is there a way I can catch hold of the next 10 upcoming events for a user and display them in a listbox? The Recurrence rule poses a major roadblock here. Any light on this will be appreciated.

Sanjeev
Peter
Telerik team
 answered on 24 May 2011
4 answers
257 views
Hi I have a RadGrid

On the Grid ItemDatabound event i am adding a tooltip dependant of the Cell content, I call a seperate method that builds a string and assigns it as the tooltip.  All is working well but on one of the Tooltips the text is truncated, is there a max length setting on the tooltip ? If So is there a workaround to construct a longer string.

Im using a string builder to construct the string which is 743 characters. The tooltip seems to truncate anything after 512 characters

Any ideas ?

Thanks


Gimmik
Top achievements
Rank 1
 answered on 24 May 2011
4 answers
118 views

Hey.

I am using RadSheduler and it's  AppointmentTemplate.

In my ObjectDataSource for RadSheduler i have Tour objects, each of them include list of Drivers oneself (one tour may have many drivers).

like this:

Class Tour{                                    Class Driver{ 
   int ID,                                       int ID,
   Datetime StartDate,                           string Name,
   Datetime Enddate,                             Datetime Start, 
   List<Driver> Drivers                          Datetime End 
}                                              }

So, my sheduler datasource is list of tours.

Now i want to achieve these:

   1.) show the list of drivers in my AppointmentTemplate for each tour (main goal) - what is the best way to do this?

   2.) each driver has start and end dates (start represents the date when the driver started or joined the tour), they are alway between the tour's StartDate and EndDate. So, i'd like the driver name to appear under the date when he joined the tour. For instance - if tour StartDate is May 2, and driver1 started the tour, and driver2 joined on May 4 AppointmentTemp to look like something as in attached file. Is that possible anyway?

thanks.

Peter
Telerik team
 answered on 24 May 2011
3 answers
120 views
We have a license for the ASP.Net Ajax editor, but before I start messing around with it, can someone tell me if it even works in an MVC/Razor web project?

Thanks
Rumen
Telerik team
 answered on 24 May 2011
7 answers
542 views
I have a radGrid. I have a GridButtonColumn for a delete button. when the delete button is pressed, it brings up a rad confirm box via the following method:

http://www.telerik.com/community/forums/aspnet-ajax/grid/need-dynamic-confirmtext-on-programmatically-added-column.aspx

the radconfirm box works fine. it shows the right text and everything. the confirmFn gets the correct itemIndex value as well. but once the process hits the codebehind's ItemCommand event for the DeleteMember CommandName ItemIndex is always zero.

So when OK is clicked (in the radWindow), it continues on to the radGrid's ItemCommand event. Once it goes into this event it claims the e.Item.ItemIndex is 0 (first row in grid), even when I've clicked on a row that is definitely not 0 index.

this has been driving me crazy. I'd like to get it resolved ASAP. any help is appreciated.

my code:

javascript code for the confirm box:

<script type="text/javascript"
        function confirmFn(text, itemIndex) { 
           var callBackFn = function(arg) { 
                 if (arg) { 
                     var masterTable = $find("<%= rgMembers.ClientID %>").get_masterTableView(); 
                     masterTable.fireCommand("DeleteMember", itemIndex); 
                 } 
             } 
             radconfirm(text, callBackFn); 
         } 
          
 
    </script> 

ajaxmanager on page:

<telerik:RadAjaxManager ID="ramManageMembers" runat="server"
        <AjaxSettings> 
         <telerik:AjaxSetting AjaxControlID="ramManageMembers">   
                <UpdatedControls>   
                    <telerik:AjaxUpdatedControl ControlID="rgMembers" />   
                </UpdatedControls>   
            </telerik:AjaxSetting> 
                        <telerik:AjaxSetting AjaxControlID="rgMembers">   
                <UpdatedControls>   
                    <telerik:AjaxUpdatedControl ControlID="rgMembers" />   
                </UpdatedControls>   
            </telerik:AjaxSetting>             
        </AjaxSettings> 
    </telerik:RadAjaxManager> 


radGrid

<telerik:RadGrid ID="rgMembers" runat="server" Width="100%" ShowStatusBar="False" Skin="mySkin" EnableEmbeddedSkins="false" 
           AutoGenerateColumns="False" PageSize="10" AllowSorting="True" AllowMultiRowSelection="False" 
           AllowPaging="True" OnItemDataBound="rgMembers_ItemDataBound"
          
          <PagerStyle NextPageText="" PrevPageText="" AlwaysVisible="True" Mode="NextPrevAndNumeric"  Position="TopAndBottom" Font-Bold="False" Font-Italic="False"  
           HorizontalAlign="Right" PageButtonCount="8" PagerTextFormat="Page: {4} &nbsp;&nbsp; Displaying page {0} of {1}, items {2} to {3} of {5}."  
           Wrap="True" FirstPageImageUrl="" FirstPageText="" LastPageText="" VerticalAlign="Middle"   />     
         
          <MasterTableView Width="100%" DataKeyNames="ApplicantID"  AllowMultiColumnSorting="False">         
                
               <Columns> 
                   <telerik:GridBoundColumn UniqueName="gcApplicantID" SortExpression="ApplicantID" HeaderText="ApplicantID" HeaderButtonType="TextButton" 
                       DataField="ApplicantID" Visible="False" ItemStyle-HorizontalAlign="Right"
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn UniqueName="gcPassNumber" SortExpression="PassNumber" HeaderText="Pass #" HeaderButtonType="TextButton" 
                       DataField="PassNumber" Visible="True" DataformatString="{0:D5}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px"
                   </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn UniqueName="gcTitle" SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" 
                       DataField="Title" Visible="false"
                   </telerik:GridBoundColumn>                                      
                   <telerik:GridBoundColumn UniqueName="gcLastName" SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" 
                       DataField="LastName"
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn UniqueName="gcFirstName" SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" 
                       DataField="FirstName"  ItemStyle-Width="120px"
                   </telerik:GridBoundColumn> 
                   <telerik:GridBoundColumn UniqueName="gcMiddleName" SortExpression="MiddleName" HeaderText="Middle Name" HeaderButtonType="TextButton" 
                       DataField="MiddleName" Visible="false"
                   </telerik:GridBoundColumn>   
                           
                <telerik:GridTemplateColumn UniqueName="gtcEdit"
             <HeaderTemplate> 
                            Edit 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <div class="functionButtons"
                                <asp:Button runat="server" Text="" CssClass="btnEdit" ID="btnEdit"  CommandName="EditClicked"  /> 
                            </div> 
                        </ItemTemplate> 
            </telerik:GridTemplateColumn>      
             
            <telerik:GridButtonColumn UniqueName="gbcDelete" Text="" HeaderText="Delete" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"  
                   ButtonType="PushButton" ButtonCssClass="btnDelete" Visible="false"
                     
                    </telerik:GridButtonColumn>                                                          
               </Columns> 
           </MasterTableView> 
       </telerik:RadGrid> 


radwindowmanager

    <telerik:RadWindowManager ID="rwmConfirmDelete" runat="server" KeepInScreenBounds="true" Title="Delete Member?" InitialBehaviors="Close,Move" Behaviors="Close,Move"  
             Skin="Simple" Width="450px"
            </telerik:RadWindowManager> 


radGrid ItemCommand event

 Protected Sub rgMembers_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgMembers.ItemCommand 
        Dim Applicant As New DAL.Applicant 
 
        Dim curUserID = AppSession.CurrentUser.UserID 
 
        Select Case e.CommandName 
            Case "EditClicked" 
                ApplicantID = CType(rgMembers.MasterTableView.DataKeyValues.Item(e.Item.ItemIndex)("ApplicantID"), Integer
 
                AppSession.CurrentApplicant = New DAL.Applicant(ApplicantID) 
 
                pnlsearch.Visible = False 
 
                appDetails.PopulateForm() 
 
            Case "ExportToExcel" 
                ConfigureExport() 
                'exporting data  
 
            Case "DeleteMember" 
                'show confirm box. 
 
                ApplicantID = CType(rgMembers.MasterTableView.DataKeyValues.Item(e.Item.ItemIndex)("ApplicantID"), Integer
 
                AppSession.CurrentApplicant = New DAL.Applicant(ApplicantID) 
 
                With AppSession.CurrentApplicant 
                    .Deleted = True 
                    .LastUpdated = Now 
                    .LastUpdatedID = curUserID 
                    .Update() 
                End With 
 
                rgMembers.Rebind() 
 
                MasterPage.PageStatusText = AppSession.CurrentApplicant.LastName + ", " + AppSession.CurrentApplicant.FirstName + " (Pass #: " + String.Format("{0:D5}", AppSession.CurrentApplicant.PassNumber.ToString) + ") has been successfully deleted." 
                
 
                AppSession.CurrentApplicant = Nothing 
 
            Case Else 
                Exit Sub 
        End Select 
 
    End Sub 


radGrid ItemDataBound

        If TypeOf e.Item Is GridDataItem Then 
            Dim item As GridDataItem = TryCast(e.Item, GridDataItem) 
            Dim cell As TableCell = item("gbcDelete"
            Dim btnDelete As Button = DirectCast(cell.Controls(0), Button) 
            btnDelete.Attributes.Add("onclick""confirmFn('Are you sure you want to delete member " + item("gcLastName").Text + ", " + item("gcFirstName").Text + " ?" + "','" + CStr(e.Item.ItemIndex) + "'); return false;"
 
        End If 
 
    End Sub 

help! thanks!



Paul J
Top achievements
Rank 1
 answered on 24 May 2011
3 answers
132 views
Hi,

I am using the mask for the Textbox to diplay time in format 12:05 AM in popup.The value is showing as 12:05 as default and AM/PM is disabled.

when focusing on the control(Textbox) the value AM/PM not displayed and after losing focues its displayied.
while clicking on the data in Textbbox AM/PM gets enabled

The properties are given as follows fior the textbox
<control id="txtTimeOfLoss">
<Type>TextBox</Type>
<MaskType>Time</MaskType>
<Mask>99:99</Mask>
<AcceptAMPM>true</AcceptAMPM>
<Width>60</Width>
</control>


O'Man
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
125 views
Hi,

I am trying to implement functionality where by all the controls on my aspx are covered by a div during a long running process.
This is for a  business app which will run on IE6. (Yes I know.)
I am trying to place a div over all controls on the page from the OnClientClick event of a button contained in an ascx which is on an aspx.
It almost works, however, even when I set the z-index of the div to 1000000 the Rad Menu is still on top. When I check the z-index using the IE Developer Toolbar it says that the Rad Menu z-index is 7000 (the default) and the div is 1000000. See the .jpg attached.
When I set the z-index of the menu to less than the ascx then it works, however, that means that the menu drop downs are also covered. 

So why is the menu on top? How can I cover all the controls to stop users fiddling while the upload is running?
Is there a way to temporarily bring the ascx to the front while processing and then send it back when finished?

Any help is appreciated.

Here is my code.
default.master that contains a RadMenu and content place holders contp1 and contp2.
BulkLoad.aspx which is derived from  default.master. 
 
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true"
    CodeBehind="BulkLoad.aspx.cs" Inherits="MyProject.WebApp.BulkLoad" %>
 
<%@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/Controls/BulkUploadControl.ascx" TagName="BulkUpload" TagPrefix="cag" %>
<%@ Register Src="~/Controls/BulkUploadAuditControl.ascx" TagName="BulkUploadAudit"
    TagPrefix="cag" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BottomPane" runat="server">
 
    <br />
    <div class="level2_tabstrip">
        <rad:RadTabStrip RegisterWithScriptManager="true" AutoPostBack="True" SelectedIndex="1"
            MultiPageID="RadMultiPage1" ID="rtsBulkLoad" runat="server" Skin="WebBlue">
            <Tabs>
                <rad:RadTab Text="Upload" PageViewID="Upload" Selected="True">
                </rad:RadTab>
                <rad:RadTab Text="Audit" PageViewID="Audit">
                </rad:RadTab>
            </Tabs>
        </rad:RadTabStrip>
    </div>
    <div class="level2_content">
        <rad:RadMultiPage RenderSelectedPageOnly="true" ID="RadMultiPage1" runat="server"
            SelectedIndex="1" Width="900">
            <rad:RadPageView ID="Upload" runat="server" Selected="true">
                <cag:BulkUpload runat="server" ID="BulkUpload1" BatchTypeDesc="" />
            </rad:RadPageView>
            <rad:RadPageView ID="Audit" runat="server">
                <cag:BulkUploadAudit runat="server" ID="BulkUploadAudit1" BatchTypeDesc="" />
            </rad:RadPageView>
        </rad:RadMultiPage>
    </div>
</asp:Content>

The BulkUploadControl contains this:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BulkUploadControl.ascx.cs"
    Inherits="Myproject.WebApp.Controls.BulkUploadControl" %>
<%@ Register TagPrefix="rad" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<script language='javascript' type='text/javascript'>
    function showLoading() {
        document.getElementById('blackOut').style.display = 'block';
        document.getElementById('blackOut').style.height = '500px';
        document.getElementById('blackOut').style.width = '942px';
    }
</script>
 
<rad:RadWindowManager ID="RadWindowManager1" runat="server" />
<asp:Panel runat="server" ID="pnlAccessDenied" Visible="true">
    You do not have permission for this function
</asp:Panel>
<asp:Panel runat="server" ID="pnlAccessOk" Visible="false">
    <br />
    <asp:Label ID="lblTitle" Font-Bold="True" Font-Size="X-Large" runat="server" Font-Names="Arial"></asp:Label>
    <br />
    <br />
    <asp:Label ID="lblText" Font-Bold="False" Font-Size="Small" runat="server" Font-Names="Arial"></asp:Label>
    <br />
    <br />
 <div id="blackOut" style="display: none; z-index: 1000000; position: absolute; background-color: black;
        filter: alpha(opacity=70); -moz-opacity: 0.7; opacity: 0.7; top: -300px;
        left: -10px; height: 1000px; width: 1500px;">
        <table width="1000px" style="height:1000px;">
            <tr>
                <td align="center" valign="middle" >
                    <h2 style="color: White; font-weight: bold">
                        Processing...</h2>
                </td>
            </tr>
        </table>
    </div>
    <table width="850" border="0" cellspacing="0" cellpadding="10" class="table_grid">
        <tr>
            <td>
                <b>Upload</b>
            </td>
            <td>
                <asp:Label runat="server" ID="lblReportingPeriodStatus" ForeColor="Red" Visible="false"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="100%">
                <input class="textbox" size="100" type="file" id="File1" runat="server" name="File1" />
                <asp:Button ID="buttonSubmit" class="button" runat="server" OnClick="btnSubmit_OnClick"
                    OnClientClick="showLoading();" Text="Upload" Height="23px" />
                <br />
                <br />
                <table width="850" class="table_grid3">
                    <tr>
                        <td width="200">
                            Local Path
                        </td>
                        <td class="td_clear">
                            <asp:Label runat="server" ID="lblLocalPath"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Batch ID
                        </td>
                        <td class="td_clear">
                            <asp:Label runat="server" ID="lblBatchID"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Loaded to Staging
                        </td>
                        <td class="td_clear">
                            <asp:Image ID="Image2a" runat="server" ImageUrl="~/Images/gtick01.gif" Visible="false" />
                            <asp:Image ID="Image2b" runat="server" ImageUrl="~/Images/gcross01.gif" Visible="false" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Status Message
                        </td>
                        <td class="td_clear">
                            <asp:Label runat="server" ID="lblStatusMessage"></asp:Label>
                        </td>
                    </tr>
                </table>
                <asp:Label runat="server" ID="lblSaveResults"></asp:Label><br />
                <asp:Label runat="server" ID="lblLoadResults"></asp:Label><br />
            </td>
        </tr>
    </table>
    <br />
    <rad:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowAutomaticDeletes="false"
        AllowAutomaticInserts="false" AllowAutomaticUpdates="false" OnItemDataBound="RadGrid1_ItemDataBound"
        EnableAJAX="True" Width="850px" AllowPaging="True" PageSize="50" Skin="WebBlue"
        Visible="false">
        <PagerStyle AlwaysVisible="true" Mode="NumericPages" />
        <SelectedItemStyle CssClass="selectedItem" />
        <EditItemStyle CssClass="selectedItem" />
        <ExportSettings IgnorePaging="true" />
        <MasterTableView CommandItemDisplay="Top" GridLines="Horizontal" EditMode="EditForms"
            TableLayout="Auto" AutoGenerateColumns="False">
            <CommandItemSettings ShowExportToCsvButton="true" />
            <Columns>
                <rad:GridBoundColumn Visible="false" UniqueName="field1" HeaderText="field1"
                    DataField="field1" />
                <rad:GridBoundColumn HeaderStyle-Width="50px" UniqueName="Row" HeaderText="Row" DataField="Row" />
                <rad:GridBoundColumn HeaderStyle-Width="50px" UniqueName="Column" HeaderText="Column"
                    DataField="Column" />
                <rad:GridBoundColumn HeaderStyle-Width="100px" UniqueName="ColumnName" HeaderText="Column Name"
                    DataField="columnName" />
                <rad:GridBoundColumn HeaderStyle-Width="100px" UniqueName="ColumnType" HeaderText="Column Type Expected"
                    DataField="columnType" />
                <rad:GridBoundColumn HeaderStyle-Width="100px" UniqueName="ColumnValue" HeaderText="Column Value"
                    DataField="columnValue" />
                <rad:GridBoundColumn UniqueName="ErrorText" HeaderText="Error" DataField="ErrorText" />
            </Columns>
        </MasterTableView>
    </rad:RadGrid>
</asp:Panel>
Kate
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?