Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
237 views

Hi,

We have two Radgrids on a web content page. For one grid,  the edit form is an aspx page. When you click edit in the grid, an aspx page is loaded into the edit section of the grid. We created an eventhandler for onbeforeunload event for the aspx page, so when user leaves the aspx page(have the edit section open) and click on a button, linkbutton, leave the content page...etc, a popup will display. This works great except clicking the Add New Record in the other grid displays our pop up and clicking the +sign(left to Add New Record) doesn't, which confuses our users. Refresh button and its sign have the same issue.

Could any body help me?
Thanks & Regards,
Zwu

Remi
Top achievements
Rank 1
 answered on 13 Apr 2010
5 answers
115 views
Hi,

How i will know that what is attached in editor content (using image manager and document manager etc....) when i submit all data.

here attachment means Images, Document, etc..........
Rumen
Telerik team
 answered on 13 Apr 2010
1 answer
144 views
I basically want to use the Tool / ToolTipified Grid from the Telerik, I followed pretty much the same instructions with a bit of differences in ascx.  But it gave me the error:

RadToolTipManager response error:
Exception=Sys.WebForms.PageRequetManagerServerErrorException: Object reference not set to an instance of an object.


And the tooltip fires but content is not populated.

Below are my codes:

Default.aspx
<telerik:RadAjaxPanel runat="server" ID="AjaxPanel">         
      
         <telerik:RadGrid  ID="RadGrid1" runat="server" AllowMultiRowSelection="true" 
                AllowSorting="True" AutoGenerateColumns="False" GridLines="Both"    
                Skin="Black" SelectedItemStyle-ForeColor="Aqua" OnSortCommand="RadGrid1_SortCommand">  
             <MasterTableView  ClientDataKeyNames="NodeName" RowIndicatorColumn-Display="false" TableLayout="Auto" AllowMultiColumnSorting="true" DataKeyNames="NodeName"    > 
             <Columns> 
               
            <telerik:GridBoundColumn HeaderText="Terminal" DataField="NodeName" SortExpression="NodeName" ItemStyle-Wrap="false"   
                     ItemStyle-HorizontalAlign="Center" UniqueName="DisplayName">  
                <ItemStyle HorizontalAlign="Left" Wrap="False" /> 
                 </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn HeaderText="IP Address" DataField="IPAddress" SortExpression="IPAddress" ItemStyle-Wrap="false"   
                     ItemStyle-HorizontalAlign="Center" UniqueName="IpAddress" HeaderStyle-HorizontalAlign="Center" AllowSorting="false" > 
                 </telerik:GridBoundColumn> 
                        
                       <telerik:GridBoundColumn HeaderText="Last Online Time" SortExpression="LastOnline"  ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center" UniqueName="LastOnlineTime" HeaderStyle-HorizontalAlign="Center" AllowSorting="false" > 
                 </telerik:GridBoundColumn> 
                    
                  <telerik:GridTemplateColumn HeaderText="Product" SortExpression="ProductName">  
                    <ItemTemplate> 
                        <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#"><img src="Style/Images/page2.gif" border="0" /></asp:HyperLink> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn>          
               
                         
             </Columns> 
             <RowIndicatorColumn> 
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                </MasterTableView> 
                <ClientSettings EnableRowHoverStyle="true" >  <Selecting AllowRowSelect="true"/>  
                                   
                  <ClientEvents OnRowCreated="RadGrid1_RowCreated" OnRowDeSelected="RadGrid1_RowDeselected" OnRowSelected="RadGrid1_RowSelected" OnRowContextMenu="RowContextMenu" /> 
                      
                    </ClientSettings> 
                  
                 </telerik:RadGrid> 
      
   
       
     
   <asp:Timer ID="Timer1" runat="server" EnableViewState="False" Interval="500000" OnTick="Timer1_Tick">  
        </asp:Timer> 
      
     </telerik:RadAjaxPanel> 
 
      
   
     
    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
       <AjaxSettings> 
           <telerik:AjaxSetting AjaxControlID="Timer1">  
               <UpdatedControls> 
                   <telerik:AjaxUpdatedControl ControlID="AjaxPanel" /> 
               </UpdatedControls> 
               <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> 
                </UpdatedControls> 
 
           </telerik:AjaxSetting> 
       </AjaxSettings> 
    </telerik:RadAjaxManager> 
      
    <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose"   
        Width="250" Height="350" runat="server"  RelativeTo="Element"  OnAjaxUpdate="OnAjaxUpdate"   
        Position="MiddleRight" > 
    </telerik:RadToolTipManager> 
 
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" CssClass="LoadingPanel" > 
    </telerik:RadAjaxLoadingPanel> 
     

Default.aspx.vb
 
    Private Sub UpdateToolTip(ByVal elementID As StringByVal panel As UpdatePanel)  
        Dim ctrl As Control = Page.LoadControl("ctrlGridRowDetail.ascx")  
        panel.ContentTemplateContainer.Controls.Add(ctrl)  
        Dim details As ctrlGridRowDetail = DirectCast(ctrl, ctrlGridRowDetail)  
        details.rowID = elementID  
    End Sub 
 
    Sub OnAjaxUpdate(ByVal sender As ObjectByVal args As ToolTipUpdateEventArgs)  
        Me.UpdateToolTip(args.Value, args.UpdatePanel)  
    End Sub 
 
 Private Sub RadGrid1_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If (TypeOf (e.Item) Is GridDataItem) Then 
 
 
            Dim target As Control = e.Item.FindControl("targetControl")  
            If Not [Object].Equals(target, NothingThen 
                If Not [Object].Equals(Me.RadToolTipManager1, NothingThen 
 
                    Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("NodeName").ToString(), True)  
 
                End If 
            End If 
 
 
        End If 
 
 
    End Sub 
 
 Protected Sub RadGrid1_SortCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridSortCommandEventArgs)  
        RadToolTipManager1.TargetControls.Clear()  
End Sub 

Controls
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ctrlGridRowDetail.ascx.vb" Inherits="ClientWebApp.ctrlGridRowDetail" %> 
 
  <asp:Label runat="server" ID="lblTitle"></asp:Label> 
  <asp:Label ID="lblAttribute" runat="server"></asp:Label> 

 Private row As String 
 
    Property rowID() As String 
        Get 
            Return row  
        End Get 
        Set(ByVal value As String)  
            row = value  
        End Set 
    End Property 
 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
                 BindNodeInfo()  
 
    End Sub 
 
    Protected Sub BindNodeInfo()  
                 <<-- Populate Data here and attach result to a string builder -->   
                lblAttribute.Text = sb.ToString()  
    End Sub 
 
 
Svetlina Anati
Telerik team
 answered on 13 Apr 2010
1 answer
99 views
Using version: Version 2009.3.1208 (Dec 8, 2009)

I have disabled the RemoveJavascript filter using the following code:
            RichTextEditor.DisableFilter(EditorFilters.RemoveScripts);
            RichTextEditor.DisableFilter(EditorFilters.EncodeScripts);

Now, in the UI in HTML mode I paste in the following code:
<script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script>if (WIDGETBOX) WIDGETBOX.renderWidget('ea4c7da5-c69b-4b5d-be46-c584cc005caf');</script><noscript>Get the <a href="http://www.widgetbox.com/widget/magic8ball">Magic 8 Ball</a> widget and many other <a href="http://www.widgetbox.com/">great free widgets</a> at <a href="http://www.widgetbox.com">Widgetbox</a>! Not seeing a widget? (<a href="http://docs.widgetbox.com/using-widgets/installing-widgets/why-cant-i-see-my-widget/">More info</a>)</noscript>

Click Save and the radEditor's contents at the server are:
<script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script>

Can someone explain to me why the other script content has been removed?

Thank you,

Llad








Rumen
Telerik team
 answered on 13 Apr 2010
4 answers
146 views

When I use the Telerik Editor, and clik on the Image Manager, a window with folders and files on the server appear.
When I try to move between folders or files with the up/down arrow keys, the whole explorer moves instead of changing the image preview between folder or files, as windows explorer does.
Is there any way to make that the up/down arrow keys change between files, to see different image previews without having to use the mouse?
Thank you!

Rumen
Telerik team
 answered on 13 Apr 2010
0 answers
93 views
Hey

Is there a way to dynamically set the height of the tree view to the available height of the screen?

Thanks
Rishi
Top achievements
Rank 1
 asked on 13 Apr 2010
5 answers
151 views
Hello, please see the following link, it is my source code:
http://www.fronseetechnology.com/ShortSalesWeb/Default.aspx

You will notice the US map, try hovering over some states, I know it does the issue for sure on CA.  You will notice all of the pop-ups I am getting and it is just not working.  I used the sample application here:
http://www.telerik.com/community/forums/aspnet-ajax/tooltip/imagemap-with-tooltip-and-database-data.aspx

and here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/imagemaptooltipmanager/defaultcs.aspx

- Im not sure what I have wrong, it looks like it is trying to work, but there are authentication issues (i imagine with the web service?).  Does anyone have any suggestions?   OH, a big thing I was thinking about, instead of using a web service (.asmx), cant I just call a [webmethod] directly in the code behind?  I have tried this with other code, but not this ImageMap and tooltipmanager.   I gave Everyone permission to the directory on the server, and still these issues.  Someone please help!!! Thank you

Joe






Svetlina Anati
Telerik team
 answered on 13 Apr 2010
1 answer
106 views
Is there an established way for creating an instance of an Appointment through using its ID without creating a scheduler and looping through all of the appointments?
Veronica
Telerik team
 answered on 13 Apr 2010
1 answer
235 views
Hi,

After looking at the doc, I can't find all the hooks I need for a seemingly logical scenario: I have many RadComboBoxes on a page, and I need to load one or the other of them via client "onclick" events. For example, when a user clicks a checkbox, I need to load a related RadComboBox and also set the selected index to the first item loaded. I cant expect the user to check the checkbox and then also click on the RadComboBox to trigger it. Does anybody have an example or a tip how to do this? The easy part is the Ajax loading, the difficult part seems to be: fire and event to get the RadComboBox to start its ajax loading and also set the first item as selected in the ComboBox.

I have seen this post:
http://www.telerik.com/community/forums/aspnet-ajax/combobox/ajax-refresh-of-radcombobox.aspx

but aside from being very complex for a simple scenario (which I could live with), it doesn't work :-) No matter where I put the AjaxManager etc on my (non trivial) page, I get:
Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error. ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
eb.UI.ControlCollection.AddAt(Int32 index, Control child)....
Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
inner exception stack trace ---
Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
...

It is wrapped, of course, just as in the example presented...


THANKS!
Richard
Veselin Vasilev
Telerik team
 answered on 13 Apr 2010
2 answers
110 views

Using RadGrid (asp.net 2.0) VS 2008, my grouped items are collapsed. I am grouping by multiple items, the initial view looks good, once I expand, I do not see the aggregate value. I have attached an image before and after expanding.

        <telerik:RadGrid ID="grid" runat="server" 
            DataSourceID="LinqDataSource1" AutoGenerateColumns="False"   
            AllowSorting="True" 
            GridLines="None" ShowGroupPanel="True" ShowFooter="true"   
            ongroupschanging="OnGroupChanged" Skin="WebBlue" 
             > 
            <ClientSettings AllowDragToGroup="true" AllowColumnsReorder="true"   
                ReorderColumnsOnClient="True"></ClientSettings> 
            <MasterTableView GroupsDefaultExpanded="false" ShowGroupFooter="true">  
                <Columns> 
                    <telerik:GridBoundColumn DataField="Participant" HeaderText="Participant"   
                        SortExpression="Participant" UniqueName="Participant">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="activityType" HeaderText="Activity Type"   
                        SortExpression="activityType" UniqueName="activityType">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Items" HeaderText="Items"  Groupable="false" 
                        SortExpression="Items" UniqueName="Items" Aggregate="sum" FooterText="Total: " FooterAggregateFormatString="Total: {0:###,###}">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="EntityType" HeaderText="Entity Type"   
                        SortExpression="EntityType" UniqueName="EntityType">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Entity" HeaderText="Entity"   
                        SortExpression="Entity" UniqueName="Entity">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Region" HeaderText="Region"   
                        SortExpression="Region" UniqueName="Region">  
                    </telerik:GridBoundColumn> 
                </Columns> 
                <GroupByExpressions> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="Participant" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="Participant"  HeaderText="Participant" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="activityType" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="activityType"  HeaderText="Activity Type" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="EntityType" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="EntityType"  HeaderText="Entity Type" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                </GroupByExpressions> 
            </MasterTableView>        
                                
        </telerik:RadGrid> 
      
 
Eli Yaacoby
Top achievements
Rank 1
 answered on 13 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?