Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
152 views
Hi!
I've written some code that will enable/disable buttons and context menu options based on certain conditions on the folders. I started out with the sample found here http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/prevent-delete-of-top-folder.aspx but have refactored out the event hookups to javascript like this: (instead of hooking them in the aspx markup of the File Explorer control)

Sys.Application.add_load(function (sender, args) {   
    $('.RadFileExplorer_Default').each(function () {
        var id = $(this).attr('id');
        var oExplorer = $find(id);
 
        OnClientFolderChange(oExplorer);
        oExplorer.add_folderLoaded(OnClientFolderChange);
        oExplorer.add_folderChange(OnClientFolderChange);
        oExplorer.add_itemSelected(OnClientItemSelected);
 
        oExplorer.get_tree().add_contextMenuShown(OnClientContextMenuShown);
    });   
});

The problem I have is that after any kind of moving files and folders through drag and drop operations in the file explorer the ContextMenuShown event doesn't trigger any more so all options are available in the menu for all folders. The events for the File Explorer still works though.

Any help on this is appreciated.
Dobromir
Telerik team
 answered on 30 Aug 2011
1 answer
143 views
I have a C#.NET page setup with a left and right RadPane. The left pane contains several radgrids situated in a RadPanelBar. (similar to an Outlook layout). In the RadPanelBar i have three RadPanelItems: one RadPanelItem contains a customer RadGrid, the second contains a customer Query Builder Form with three buttons and the third RadPanelItem contains two Grids. Those two grids contain info about saved queries and any lookup results, respectively. Here are the grid names for easy reference going forward (code will be provided below).

customerGrid, existingQueryGrid, custQueryResultsGrid

I have a RadToolTipManger assigned to customerGrid on ItemDatabound to display customer info on mouseover. I also have a separate RadToolTipManager for existingQueryGrid (also assigned target controls on databound) so the user can mouseover the saved lookup by name and view the lookup filter details.

I also have two user controls setup in the right side RadPane which contain radgrids with their own RadToolTipManager connections working in a similar way.

Scenario 1) When one submits a lookup from the query form, it populates existingQueryGrid (tooltips are bound on page load) and/or the custQueryResultsGrid depending on the query request ("save", "save and lookup" or just "lookup").Upon completion of the AJAX, any grids that were not Rebound no longer have the RadToolTips working. For example if one hits the "save" command then only the existingQueryGrid  is updated (since they only wanted to save the query) and therefore ToolTips are recreated and include a new record (works fine); however, since the customerGrid was not rebound here, the ToolTip for that Target Control set is no longer working.

Scenario 2) When one clicks a record from customerGrid, it loads the contact information into the user controls in the right pane and all the ToolTips are initialized and working when the respective user control Radgrids for Accounting and Product info are first bound. At this point the ToolTIp on the customerGrid is no longer functioning, and if  any other type of command is performed on customerGrid  like paging or filtering, the user control RadGrid ToolTips for the Accounting and Product  are no longer functiong until they are paged or sorted (at which point it works again).

All RadGrids and their respective tooltips are placed in the RadAjaxManager (and RadAjaxManager Proxy for user controls) settings so when one updates, the tooltip also should update. I am providing some relevant code:

MAIN PAGE (CLIENT SIDE)


<telerik:RadToolTipManager ID="RadToolTipManagerCustomer" Skin="Windows7" Width="300"
      OffsetX="5" Height="120" ShowDelay="500" runat="server" RelativeTo="Mouse" Position="MiddleRight"
      HideEvent="LeaveTargetAndToolTip" OnClientBeforeShow="RadToolTipCustomerBeforeShow" EnableViewState="false">
  </telerik:RadToolTipManager>
   <telerik:RadToolTipManager ID="RadToolTipQueryInfo" Skin="Windows7" Width="300"
      OffsetX="5" Height="120" ShowDelay="500" runat="server" RelativeTo="Mouse" Position="MiddleRight"
      HideEvent="LeaveTargetAndToolTip" OnClientBeforeShow="RadToolTipQueryInfo"  EnableViewState="false">
  </telerik:RadToolTipManager>
  <telerik:RadAjaxManager ID="RadAjaxManagerCRM" runat="server" OnAjaxRequest="RadAjaxManagerCRM_AjaxRequest">
      <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="customerGrid">
              <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="customerGrid" LoadingPanelID="RadAjaxLoadingPanelCRM" />
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipManagerCustomer" />
        </UpdatedControls>
          </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="existingQueriesGrid">
            <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="existingQueriesGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
                   <telerik:AjaxUpdatedControl ControlID="RadToolTipQueryInfo" />
            </UpdatedControls>
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="custQueryResultsGrid">
            <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="custQueryResultsGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
                   <telerik:AjaxUpdatedControl ControlID="RadToolTipManagerCustomer" />
            </UpdatedControls>
          </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="btnSaveQry">
             <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="existingQueriesGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
               <telerik:AjaxUpdatedControl ControlID="RadToolTipQueryInfo" />
               <telerik:AjaxUpdatedControl ControlID="qryBuilderFormUpdate" LoadingPanelID="RadAjaxLoadingPanelCRM" />
             </UpdatedControls>
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="btnSaveAndLookup">
               <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="existingQueriesGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipQueryInfo" />
                  <telerik:AjaxUpdatedControl ControlID="custQueryResultsGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipManagerCustomer" />
                  <telerik:AjaxUpdatedControl ControlID="qryBuilderFormUpdate" LoadingPanelID="RadAjaxLoadingPanelCRM" />
               </UpdatedControls>
          </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="btnLookup">
           <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="custQueryResultsGrid" LoadingPanelID="RadAjaxLoadingPanelCRM"/>
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipManagerCustomer" />
                  <telerik:AjaxUpdatedControl ControlID="qryBuilderFormUpdate" LoadingPanelID="RadAjaxLoadingPanelCRM" />
             </UpdatedControls>
          </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="RadAjaxManagerCRM">
              <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="customerGrid" LoadingPanelID="RadAjaxLoadingPanelCRM" />
                  <telerik:AjaxUpdatedControl ControlID="existingQueriesGrid" />
                  <telerik:AjaxUpdatedControl ControlID="custQueryResultsGrid" LoadingPanelID="RadAjaxLoadingPanelCRM" />
                  <telerik:AjaxUpdatedControl ControlID="qryBuilderFormUpdate" LoadingPanelID="RadAjaxLoadingPanelCRM" />
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipManagerCustomer" />
                  <telerik:AjaxUpdatedControl ControlID="RadToolTipQueryInfo" />
         </UpdatedControls>
          </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelCRM" EnableSkinTransparency="true"
      OnClientShowing="ClientShowingLoadingPanel" runat="server" Skin="Windows7">
  </telerik:RadAjaxLoadingPanel>

MAIN PAGE (SERVER SIDE for customerGrid)

protected void customerGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        if (Session["CurRepId"] != null)
        {
            ((RadGrid)CustomerGridPanelItem.FindControl("customerGrid")).DataSource = GetCompanies().Items;
        }
    }
 
protected void customerGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
           
            RadToolTipManagerCustomer.TargetControls.Add(((Telerik.Web.UI.GridTableCell)(e.Item.Controls[5])).ClientID, argument, true);
       
        }
    }
 
protected void customerGrid_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Sort" || e.CommandName == "Page" || e.CommandName == "Filter")
        {
            RadToolTipManagerCustomer.TargetControls.Clear();
         }
      
        if ((e.CommandName == "Filter"))
        {
            foreach (GridColumn column in e.Item.OwnerTableView.Columns)
            {
                column.CurrentFilterValue = string.Empty;
                column.CurrentFilterFunction = GridKnownFunction.NoFilter;
            }
        }
    }

 

MAIN PAGE (SERVER SIDE for existingQueryGrid)

protected void existingQueriesGrid_ItemCommand(object source, GridCommandEventArgs e)
 {
      if (e.CommandName == "Sort" || e.CommandName == "Page" || e.CommandName == "Filter")
      {
          RadToolTipQueryInfo.TargetControls.Clear();
       }
  
      if (e.CommandName == "RemoveQry")
      {
          deleteCustomQuery(Convert.ToInt32(e.CommandArgument));
          ((RadGrid)existingQueries.FindControl("existingQueriesGrid")).MasterTableView.Rebind();
      }
  }
  
protected void existingQueriesGrid_ItemDataBound(object source, GridItemEventArgs e)
  {
      if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
      {
          
         RadToolTipQueryInfo.TargetControls.Add(((Telerik.Web.UI.GridTableCell)(e.Item.Controls[4])).ClientID,fltrArg,true);
      }
  }
 
Let me know if you need more information or code. The above code pertains to Scenario 1 but I believe once we solve (1),
we will solve (2).

Thanks in advance


Marin Bratanov
Telerik team
 answered on 30 Aug 2011
10 answers
501 views
I'm having an issue with style and formatting specifically with the docks - under localhost the style and formatting works as expected.  When I use my machine name to access the site under development the formatting goes out the door.

I've removed all css file references and put the style within the page and put inline style attributes to try and force the format.

Anything off the top of your head that might come to mind?

TIA,
-vic
Travis
Top achievements
Rank 1
 answered on 30 Aug 2011
1 answer
164 views
I am having issues where the Navigation bar is showing on PageLoad, but the rest of the calendar is not showing.  I have EnableViewState set to true.   The RadScheduler is inside a .ascx control.  If I click on anything in the calendar's Navigation Bar, I get the rest of the calendar to pop up.  Is there something else that I need to do?  Below is how I have the UpdatePanel defined and how the RadScheduler is defined...

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <telerik:RadScheduler Width="850" Height="600" ID="VMDSCalendarEvents" runat="server" FirstDayOfWeek="Sunday" SelectedView="MonthView" 
                                              WorkDayStartTime="7" EnableAdvancedForm="true" AllowInsert="true" TimelineView-ReadOnly="true"
                                              OnAppointmentDataBound="VMDSCalendarEvents_OnAppointmentDataBound" OnAppointmentCommand="VMDSCalendarEvents_OnAppointmentCommand" 
                                              OnAppointmentInsert="VMDSCalendarEvents_OnAppointmentInsert" OnAppointmentDelete="VMDSCalendarEvents_OnAppointmentDelete" 
                                              OnAppointmentUpdate="VMDSCalendarEvents_OnAppointmentUpdate" OnFormCreated="VMDSCalendarEvents_OnFormCreated" >
Adam
Top achievements
Rank 1
 answered on 30 Aug 2011
8 answers
162 views
Hi,

I am using RadAjaxPanel and inside that panel I have one radcombobox in which I am displaying All Countries. I want to ask that is it possible to show a flag of a country as a loading panel image when user selects a country from radcombobox ? and I would like to set that image URL from server-side.

<telerik:RadCodeBlock ID="radcodeblock" runat="server">
    <script language="javascript" type="text/javascript">
        function OnClientSelectedIndexChanged(sender, eventArgs) {
            var ajaxManager = $find("<%= rapPSMain.ClientID %>");
            var item = eventArgs.get_item();
            ajaxManager.ajaxRequest(item.get_text());
        }
    </script>
</telerik:RadCodeBlock>
<telerik:RadAjaxLoadingPanel ID="alpProductionSechduleMain" runat="server" Height="75px"
    MinDisplayTime="5" Width="75px">
    <asp:Image ID="imgAjaxImage" runat="server" AlternateText="Loading..." />
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="rapPSMain" RequestQueueSize="5" runat="server" Width="100%"
    OnAjaxRequest="rapPSMain_AjaxRequest" EnableOutsideScripts="True" HorizontalAlign="NotSet"
    ScrollBars="None" LoadingPanelID="alpProductionSechduleMain">
    <b>Order Destination :</b>  
    <telerik:RadComboBox ID="rcbCountry" runat="server" Skin="Vista" Height="100px" Width="200px"
        DataTextField="CountryName" DataValueField="CountryKey" AllowCustomText="true"
        AutoPostBack="true" MarkFirstMatch="True" HighlightTemplatedItems="True" DropDownWidth="200px"
        OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" EmptyMessage="- Select Country -">
    </telerik:RadComboBox>
</telerik:RadAjaxPanel>




Muhammad
Top achievements
Rank 1
 answered on 30 Aug 2011
1 answer
182 views
Unable to set Image of content menu item, will display first image of sprite (WebResource.png)

Using:
<%@ Register Tagprefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

<telerik:RadEditor ID="_radEditor" runat="server" ...
                    <ContextMenus>
                        <telerik:EditorContextMenu TagName="FONT">
                            <telerik:EditorTool Name="MyCustomAction" Text="Properties" ImageUrl="~/images/siteIcon.png" />
                        </telerik:EditorContextMenu>
                        <telerik:EditorContextMenu TagName="SPAN">
                            <telerik:EditorTool Name="MyCustomAction" Text="Properties" ShowIcon="false" />
                        </telerik:EditorContextMenu>
                    </ContextMenus>
Rumen
Telerik team
 answered on 30 Aug 2011
1 answer
83 views
We upgraded Telerik Web UI from 2010.3.2015 to  2011.2.712 in our project.(Also other dlls,reporting , openaccess ... to latest versions)
Project is GIS base application and contains javascript files like: http://openlayers.org/api/OpenLayers.js , Jquery and special JS's.
Master pages contains RadScriptManager,RadAjaxManager and no problem with other pages or other projects , but on GIS pages including these javascript files giving following error.

In Telerik.Web.UI.WebResource_3.axd....
  //Microsoft JScript runtime error: 'propertyName' is null or not an object
in
_onInputPropertyChange:function(){if(!event.propertyName){event=event.rawEvent;
}if(event.propertyName=="value"){var c=this.get_text();  

//Microsoft JScript runtime error: 'type' is null or not an object
in
b=this.type=a.type.toLowerCase();   
and so on.
Also in openlayers and other javascript files getting null reference errors like this.


Web.config configuration is OK
<httpHandlers>
   <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false"/>
</httpHandlers>

<
system.webServer>     
<handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" 
       path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
 </handlers>
</system.webServer>

After these error occured I rereference old telerik.web.ui.dll 2010.3.2015. But problem is still going

These errors occures at internert explorer 8. Firefox and chrome dont gives error but maps are not working properly.
I recognize that,
Internet exporer 8 accepts global javascript defines null like :
var event = []; //global
when pass event to a function exporer 8 accepts null but other browsers accepts initialized as empty not null.

Is it possible a conflict telerik and other javascripts.All the system as same before upgrade process.It had been working properly but now we are in stuck , we didnt find any solution.


Thanks.
Maria Ilieva
Telerik team
 answered on 30 Aug 2011
1 answer
79 views
Hi,

I'm currently converting a big range of old MS Access databases based on SQL 97 to a web based interface. As upgrading/changing the SQL 97 server is out of the question, Linq (as well as entity framework etc) seems to be out of the question (unless you know any way to get this working?).

As we will need a large range of reuse, like simple editable tables, we wanted to make generic configurable controls. However it seems to me that the editable columns are a bit tedious and error prone to parse.

As for parsing the values of the editable column, the best (and only) example I found in your demos was this : http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editmodes/defaultcs.aspx

What I ideally would have wished for, was an easy way to access SQL rowtype, rowname and the new and old values as objects, such that I could easily insert everything chosen as old and new values in parametrized SQL, and leave the rest up to the SQL server.

However, it doesnt seem that I can find the SQL datatype, and parsing and ensuring no failure for all possible datatypes, will end up prooving quite tedious for a generic web control.

Do you have any experience, guides or ideas on how to best create generic dataupdating without the use of Linq?
Morten
Top achievements
Rank 1
 answered on 30 Aug 2011
1 answer
273 views
Hi,

Assume end user is trying to copy content from MS word and pasting into rad editor.

When he Right clicks and choose From MS word or use Ctrl+V , how to prevent him from copying

1.Any inserted files or any other objects from MS Word.
2.Tables in MS Word
3.Forecolor/backcolor information
4.Any hyperlinks

But he should be able to copy
1.Text with Fonts specific to what can be chosen from the RAD editor dropdown.
2.Text with Font size specific to what can be chosen from the RAD editor dropdown.
3.Normal formatting like Bold/Italic/Underline,alignment,bulleting etc.

Please help with this as this is very urgent.

Thank you.



Rumen
Telerik team
 answered on 30 Aug 2011
2 answers
129 views
Hi

I am evaluating RADGRID for my client who needs a plugin table/grid where he can insert/delete/edit rows and columns. He don't to do any coding. He just want to drag and drop the control with standard properties enabled which should allow him to do these operation binding to the database.

I thought RADGRID may be good fit but when I see examples it seems there are lot of code binding needed in both client and server side. At the same time I also saw some things about codeless insert/delete/update but I tried addig properties like below without any code and nothing happens. I don't get any edit functionality in the grid. What am I missing on codeless operations? 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" AllowPaging="true" PageSize="25" ShowStatusBar="true">

<PagerStyle AlwaysVisible="true" />

 <MasterTableView AutoGenerateColumns="true" EditMode="InPlace" />

 </telerik:RadGrid>

I check out the below articles and everything needs big chunk of code to make the manipulation work.
http://www.telerik.com/help/aspnet/grid/grdeditmodeinplace.html
http://www.telerik.com/help/aspnet/grid/grdinsertingvaluesinplaceandeditforms.html


I need a plug and play kinda of control for client to work without any big coding.

Vijai

 

Vijaianand
Top achievements
Rank 1
 answered on 30 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?