Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
85 views
Hi All,

I am attempting to achieve the following functionality: I would like to change the background color of the control the user's mouse is currently over when the user is dragging an item.

Reasoning: I allow the user to drag-and-drop items from a RadListBox onto the page. This drag-and-drop functionality creates RadDocks. Once a RadDock is on the page it set's its RadDockZone is forbidden to all other docks. As such, if I had two docks on the page, I indicate that a 3rd RadDockZone is a viable move option by changing that DockZone's background color to green. I would like this functionality to extend to when the user is first creating their RadDock -- I would like DockZone currently being hovered-over to turn green.

Is this possible? I'm looking through the OnClientDragging event, and I can see that it can return (X,Y) coordinates through use of the get_domevent() method. Is there a way to translate this hit coordinate into the control located at the coordinate? 

Thanks for your time,

Sean Anderson
Sean
Top achievements
Rank 2
 answered on 15 Jul 2011
3 answers
95 views
Hi,
in my scenario i've used AjaxManager inside Master page and AjaxManagerProxy inside the content page. I would to know the best approch to ajaxify the radlistview (sorting, paging) inside the content page considering that in  the master page there is radbutton that update radlistview.
Jayesh Goyani
Top achievements
Rank 2
 answered on 15 Jul 2011
2 answers
344 views
Hi All,

  I am adding comments to the database by opening the modal pop up extender. User can type the comment in the modal pop up text box and as soon as the user clicks Ok button, the comments go to the database, and i pull those saved comments from database and display them in the grid.
Everything works fine except when I put the ajax panel around the Ok button, the display of the saved comments stopped right away. I am not sure what am I doing wrong. Below is my code

<asp:LinkButton ID="lnkComments" runat="server" Text="Add Comments"></asp:LinkButton>
<div>
    <asp:Panel ID="panel1" runat="server" CssClass="modalPopup" Style="display: none"
        Width="500px" BackColor="#E6E6E6">
        <p>
            Please add the comments</p>
        <asp:TextBox ID="txt_comments" runat="server" TextMode="MultiLine" Width="480px"></asp:TextBox>
        <div>
          <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel_Ok" LoadingPanelID="RadAjaxLoadingPanel1">
            <asp:Button ID="OkButton" runat="server" Text="OK" OnClick="OkButton_Click" CommandName="Ok"  />
            <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
            </telerik:RadAjaxPanel>
        </div>
    </asp:Panel>
</div>
<div>
   
    <asp:ModalPopupExtender ID="ModalPopUp_Comments" runat="server" TargetControlID="lnkComments"
        PopupControlID="panel1" BackgroundCssClass="modalBackground" 
        CancelControlID="cancelButton" DropShadow="true">
    </asp:ModalPopupExtender>
          
</div>

and the code behind is

protected void OkButton_Click(object sender, System.EventArgs e)
  {
      ModalPopupExtender ModalPopUp_Comments = (ModalPopupExtender)RadGrid_cDetailsView.MasterTableView.Items[0].FindControl("ModalPopUp_Comments");
      TextBox txt_comments = (TextBox)RadGrid_cDetailsView.MasterTableView.Items[0].FindControl("txt_comments");
      RadGrid RadGrid_cComments =(RadGrid) RadGrid_cDetailsView.MasterTableView.Items[0].FindControl("RadGrid_cComments");
      ModalPopUp_Comments.Hide();
      cComments comments = new cComments();
      CiscHeader cHeader = new CiscHeader();
      cHeader.cId = Request.QueryString["ID"];
      if(txt_comments.Text != "")
      {
              //comments.UserId = HttpContext.Current.User.Identity.Name;
             // for testing purposes only
          comments.UserId = "Anjali";
              comments.UserComment = txt_comments.Text;
      }
      cHeader.AddcComments(comments);
      cScoringCtrl cscoringCtrl = new cScoringCtrl();
      cscoringCtrl.savecComments(cHeader);
      txt_comments.Text = string.Empty;
      cHeader.cComment.Clear();
      cscoringCtrl.getcComments(cHeader);
      RadGrid_cComments_Bind(cHeader, RadGrid_cComments);
   
  }
radGrid_cComments_Bind , refreshes the gris and shows the user comments right away.

Any help will be appreciated.
Anjali
Top achievements
Rank 1
 answered on 15 Jul 2011
2 answers
54 views
You know how you decorate the control with the NoBorders class...?

Can you also decorate it with a Scrollable class if the control has scrolling enabled?

For my .skin file I would like to always have NoBorders, however IF it's in scrolling mode, I'd like a bottom border.  But with the rendered CSS I don't seem to be able to do that.

Again, just to clarify....this is a feature request as you cannot use custom code to define a .skin file :)  So I don't need a sample, I'd just like to know in the CSS when this option is toggled.
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 15 Jul 2011
1 answer
234 views
Hello,
I have a Telerik Radgrid with Export to Excel, CSV and Word buttons on it. Since I am exporting huge amounts of data it takes some time for the Save pop up to display. Is there any way to specify the user that some background work is going on in order to prepare the excel or csv during that particular period of time.

I have gone through the following post, but I could not get an ideal solution.
http://www.telerik.com/community/forums/aspnet-ajax/grid/display-loading-panel-during-export.aspx

Could you suggest me any alternative such as the mouse icon turning to an hour glass or a loading panel getting displayed during the time etc?

Thanks,
M N V Koundinya
Daniel
Telerik team
 answered on 15 Jul 2011
2 answers
857 views
Hi

I am updating an old project to use some of the Telerik controls - I am new to your controls.  A standard ASP.NET Listbox was previously used in a modal popup to re-order items in a list  - once the user was happy with the new order of items they click a 'Save Order' button to save the new order of items and close the popup. The function that works fine and does this is:
 
Protected Sub SaveOrder(ByVal sender As Object, ByVal e As EventArgs)
 
       Dim intID As Integer
       Dim intIndex As Integer
         Dim strUpdate As String
       Dim cmdUpdate As SqlCommand
 
       connTC.Open()
 
       For Each item As RadListBoxItem In ListBox1.Items 
 
           'get the ID of the item
           intID = item.Value
 
           'get the index number in the listbox
           intIndex = ListBox1.Items.IndexOf(item)
 
           'increase by 1 since listbox index starts at 0
           intIndex = intIndex + 1
 
           strUpdate = "Update tblGalleryImages SET fldOrder=@fldOrder WHERE fldGalleryImageID=@fldGalleryImageID"
 
           cmdUpdate = New SqlCommand(strUpdate, connTC)
           cmdUpdate.Parameters.AddWithValue("@fldOrder", intIndex)
           cmdUpdate.Parameters.AddWithValue("@fldGalleryImageID", intID)
 
           cmdUpdate.ExecuteNonQuery()
 
       Next
 
 
       connTC.Close()
 
 
       'hide the modal popup
       ModalTextPopup.Hide()
 
 
 
   End Sub



I have tried applying the same function to the RadListBox (ID =ListBox1) .  I have made the following change on one of the lines:

" For Each item As RadListBoxItem In ListBox1.Items"

However there is an error on the following line:

intIndex = ListBox1.Items.IndexOf(item)

I can not get the index of the Radlistbox item.  The error is:

'Telerik.Web.UI.ControlItemCollection.Protected Friend Overridable Function IndexOf(item As Telerik.Web.UI.ControlItem) As Integer' is not accessible in this context because it is 'Protected Friend'.

Any help in getting the index of the Radlistbox item would be appreciated.  The 'save order' must be done with an 'external' button as the user must be happy with the display order etc. before they save it - in other words I can not use Autopostback etc.

Thanks in advance.

Kevin



Kevin
Top achievements
Rank 1
 answered on 15 Jul 2011
1 answer
73 views
Hi All....
i am trying to implement the TabStrip wizard example from the demo page...

but my tabstrip in the first tab, there are child tabs...

i load a user control for the first child tab by default...

when the user click the next button in this user control, i noticed the second user control for the second child control is also loaded but the this tab is not selecetd!!! and the first child is still selected!!!!

i debugged the code that makes this tab to be seleceted and no exception occurrs!!!

also i changed the code to get the second child tab of the first tab to get it and and it is not null...

my page is containing the RadAjaxManager...
when i removed moved it the  second user control is loaded and its tab is seleced and enabled...

but when i click the first child tab its user control is displayed again but when i reclick the second tab the first user control of the first child tab is persist and i can see the second user control again...

how can i implement it with ajax and also make the wisard works properly????

i will be very gratefull for any comment...

thanks
Asa'ad...

Plamen
Telerik team
 answered on 15 Jul 2011
1 answer
65 views
hi i got problem, adding new nodes dynamically.
the nodetemplates are assigned by the templateneeded event:

protected void tree_TemplateNeeded(object sender, RadTreeNodeEventArgs e)
{
 
    ANDNode x=new ANDNode();
 
    e.Node.NodeTemplate = x;
 
}


my root node is a dropdownlist and when i change the selected index of the ddl, new child nodes should be added to the node.
My problem is, that the selectedchangedindex event will be not performed. Do you have an idea, why it will be not performed?

public class ANDNode : ITemplate
{
 
    public ANDNode()
    {
 
 
    }
    public void InstantiateIn(System.Web.UI.Control container)
    {
        DropDownList ddl = new DropDownList();
 
        ddl.AutoPostBack = true;
 
        ddl.ID = "ddl"+Guid.NewGuid().ToString();
        ddl.DataBinding+=new EventHandler(ddl_DataBinding);
        ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
         
        
        container.Controls.Add(ddl);
    }
 
    void  ddl_DataBinding(object sender, EventArgs e)
    {
        Global.FillExpressionItems((DropDownList)sender);
    }
 
 
    void ddl_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList ddl = (DropDownList)sender;
 
        RadTreeNode node = (RadTreeNode)ddl.NamingContainer;
        node.ExpandMode = TreeNodeExpandMode.ServerSide;
        node.Expanded = true;
 
        RadTreeNode child = new RadTreeNode();
        child.NodeTemplate = new ANDNode();
        node.Nodes.Add(child);
    }
 
}
Plamen
Telerik team
 answered on 15 Jul 2011
2 answers
98 views
Is there anyway to setup the FileExplorer so the right hand "FileView" side excludes folders and only shows files? I'd like to use the left hand "FolderView" side for navigation through my directory structure, and the right hand side for only accessing files.

P.S. Is there any way to hide the address/path bar?
Xorcist
Top achievements
Rank 1
 answered on 15 Jul 2011
7 answers
276 views
Hi all,

I've read the post here: http://www.telerik.com/support/kb/aspnet-ajax/general/adding-visual-studio-intellisense-support-for-radcontrols.aspx and then I noted a forum post showing how to get this functionality in a separate JS file.

So, I have this:

//Dashboard.js
/// <reference name="MicrosoftAjax.js"/>
/// <reference name="Telerik.Web.UI.Common.Core.js" assembly="Telerik.Web.UI"/>

and then I have Dashboard.aspx reference Dashboard.js:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True" EnablePageMethods="True">
    <Scripts>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Path="~/Scripts/Dashboard/Dashboard.js" />
    </Scripts>
</telerik:RadScriptManager>

I continue to not see the intellisense shown in screenshots. Doing $telerik does not find anything in the intellisense dropdown.

What am I doing wrong?

Thanks,

Sean
Martin
Telerik team
 answered on 15 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?