Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
231 views
Hello,

I have a control that loads a RadTreeView using an object as the source and performing on-demand loading of child nodes via the OnNodeExpand event.  I also use a RadWindow to allow users to edit the tree nodes.  When the user saves their changes on the RadWindow, it fires an ajax event using javascript which then uses an ajax request to update the node in the tree.  This is working very nicely. 

However, when the user finishes editing and closes the RadWindow the RadTree no longer functions properly.  The OnNodeExpand event is no longer firing when trying to expand a node and the OnClientMouseOver I was using to display tooltips is not effective below the first level of nodes.  I've tried adding the NodeExpand event handler back in after the update just in case it's getting lost somewhere, but this doesn't seem to work.

Any ideas what I'm doing wrong?

Thanks,
Courtney

Here's my ajax request code
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    string[] values = e.Argument.Split(new[] { "|" }, 2, StringSplitOptions.None);
    string nodeId = values[0];
    string nodeText = values[1];
    foreach (RadTreeNode node in GroupTree.Nodes)
    {
        if (UpdateNode(node, nodeId, nodeText))
            break;
    }
    GroupTree.NodeExpand += (GroupTreeOnNodeExpand);
}
private static bool UpdateNode(RadTreeNode node, string nodeId, string nodeText)
{
    if (node.Attributes["id"] == nodeId)
    {
        node.Text = nodeText;
        return true;
    }
    foreach (RadTreeNode childNode in node.Nodes)
    {
        if (UpdateNode(childNode, nodeId, nodeText))
            return true;
    }
    return false;
}

 

 

Maria Ilieva
Telerik team
 answered on 15 Dec 2010
3 answers
239 views
Hello,
Actually, I have some problem with the Treeview item in particular onClientContextMenuItemClicking as shown below:

function
 onClientContextMenuItemClicking(sender, args)
{
        var menuItem = args.get_menuItem();
        var node = args.get_node();
        menuItem.get_menu().hide();
 
        switch (menuItem.get_value()) {
            case "SaveAs":
                Xlate.Web.Translation.service.ResourceFilesService.ExportResourceFile('108', PassServiceHandler, FailServiceHandler);
                break;
        }
    }
Save As menu item is supposed to save resx file [RESOURCE FILE in DOTNET]; it calls a webs service to get the file from the DB, and Download the file, but the below code didn't work out in this case, but when i tried it out without Ajax or Telerick controls, I could work it out:


[WebMethod()]
        public void ExportResourceFile(string fileId)
        {
            List<ISearchResult> searchResults;
            SearchCriteria searchCriteria;
            try
            {
                    searchCriteria = new SearchCriteria();
                    searchCriteria.ResourceFileID = int.Parse(fileId);
                    searchCriteria.SearchOption = SearchType.ResxKey;
                    
                    ResourceFile resourceFile = ResxFileManager.CreateResourceFile(searchCriteria);
 
                    MemoryStream memoryStream = new MemoryStream();
                    memoryStream = Manager.GenerateResxSourceCode(resourceFile);
                    memoryStream.Position = 0;
                    DownloadFile(memoryStream,resourceFile.Name);
             }
             catch (Exception ex)
             {
                 // set exception message              
                string errorMessage = String.Format("Failed to export resource fileid ={0}, error:{1}", fileId ,ex.Message);
 
                // trace call
                TraceUtil.Write("ResourceFilesService::ExportResourceFile", "Exception occured [{0}]", errorMessage);
 
                // publish and rethrow the exception
                BusinessException businessExc = new BusinessException(errorMessage, ex);
                throw (businessExc);
             }
          }
 
        private void DownloadFile(MemoryStream memoryStream,string fileName)
        {
            byte[] byteArray = memoryStream.ToArray();
            memoryStream.Flush();
            memoryStream.Close();
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=test.resx");
            HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString());
            HttpContext.Current.Response.ContentType = "application/octet-stream";
            HttpContext.Current.Response.BinaryWrite(byteArray);
 
        }


DownloadFile method should force the Browser to open Save Dialog File, is there anything wrong with the code above, Could you please Help.

Regards,
Hanan




function onClientContextMenuItemClicking(sender, args) {
  
function onClientContextMenuItemClicking(sender, args) {
        var menuItem = args.get_menuItem();
        var node = args.get_node();
        menuItem.get_menu().hide();
 
        switch (menuItem.get_value()) {
            case "SaveAs":
                Xlate.Web.Translation.service.ResourceFilesService.ExportResourceFile('108', PassServiceHandler, FailServiceHandler);
                break;
        }
    }
     var menuItem = args.get_menuItem();
        var node = args.get_node();
        menuItem.get_menu().hide();

        switch (menuItem.get_value()) {
            case "Ssada





Sdfsefsqweq
function onClientContextMenuItemClicking(sender, args) {
        var menuItem = args.get_menuItem();
        var node = args.get_node();
        menuItem.get_menu().hide();
 
        switch (menuItem.get_value()) {
            case "SaveAs":
                Xlate.Web.Translation.service.ResourceFilesService.ExportResourceFile('108', PassServiceHandler, FailServiceHandler);
                break;
        }
    }
function onClientContextMenuItemClicking(sender, args) {
        var menuItem = args.get_menuItem();
        var node = args.get_node();
        menuItem.get_menu().hide();
 
        switch (menuItem.get_value()) {
            case "SaveAs":
                Xlate.Web.Translation.service.ResourceFilesService.ExportResourceFile('108', PassServiceHandler, FailServiceHandler);
                break;
        }
    }
Maria Ilieva
Telerik team
 answered on 15 Dec 2010
1 answer
162 views
Hi,

Please see attached image.

I'm using the popup edit form to insert/update records in a radgrid. The first time the edit form is opened the controls it contains flow outside the form bounds.

If I close and reopen the edit form, it sizes correctly. Any ideas?

Thanks,

James
Radoslav
Telerik team
 answered on 15 Dec 2010
5 answers
125 views
Hello friends,
I think i have a simple problem with the radgrid....that i cannot figure out....
please kindly help me in fixing what i am doing incorrectly,
i have written all the issue details in the attached project file. 
file linked below: Grid333 . zip
[URL=http://www.easy-share.com/1913236826/Grid333.zip]http://www.easy-share.com/1913236826/Grid333.zip[/URL]
[URL=http://www.mediafire.com/file/mcxxvce8uj3g4jh/Grid333.zip]http://www.mediafire.com/file/mcxxvce8uj3g4jh/Grid333.zip[/URL]
[URL=http://www.slingfile.com/file/6icllc]http://www.slingfile.com/file/6icllc[/URL]

Thanks and regards
prad



pshah
Top achievements
Rank 1
 answered on 15 Dec 2010
1 answer
114 views
Hello sir,

i have two usercontrol..which i placed in two radtab..now in 1st usercontrol i have gridview and user can select a row to see the details..when user click select then i want to show 2nd usercontrol which i placed in radtab2..how can i do this..
please help to find the way.

thanks
Shinu
Top achievements
Rank 2
 answered on 15 Dec 2010
1 answer
88 views

Hello,

Can you please confirm that Radcontrols for ASP. NET AJAX Q3 2009 SP2 - version 2009.3.1314 is IE8 compatible?
We are switching to windows 7/ie8 environment soon and on the preliminary testing we are seeing the controls layout look very different in IE8.
Please advise.


Thanks,
Sebastian
Telerik team
 answered on 15 Dec 2010
3 answers
135 views

I followed this demo 

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

And now it works perfectly in IE but in Firefox it makes the browser not responding. Are you aware of this issue?

This is just a copy/paste operation with the same data .. i even created DB with identical tables structure. 

Please let me know if i can fix this issue somehow. 

Thanks

Vasil
Telerik team
 answered on 15 Dec 2010
7 answers
145 views
The built-in icons are SUPER handy, but the single 30k sprite is WAY WAY to big.

Even just separate into two sprites...large icons and small icons...like if I just need one small checkmark and X, on the entire page\app, a 30k sprite ads a lot of overhead for me.  I'm not sure where I'd ever need to intermingle the icons (large and small)...buttons on a page should be consistent.  So you'd have large OR small buttons?

Ideally I'd like to see 4 sprites
1) Small Basic (checks, and X's...common stuff)
2) Small Tools (checkout, rss, etc...fringe stuff)
3) Large Basic
4) Large Tools

Could you at least consider it? :)  I'm seeing a noticeable "pop" when my buttons load.
Bozhidar
Telerik team
 answered on 15 Dec 2010
1 answer
68 views
Hi

I have a simple grid with no edit mode. See Pic at this URL
http://screencast.com/t/X1XtwRegixy

I want the user to be able to switch "Chart" without going into an edit mode.

I therefore created a user control made from a a radcombo which populates the combo and has an event attached to it which calls a method that updates the charttype in the database.

I have an additional property in my usercontrol which is the Primarykey (seriesID) required create the obj and run the update.

<telerik:GridTemplateColumn HeaderText="Chart" UniqueName="ColChart">
                                     <ItemTemplate>
                                     <uc3:kpidropdownchart ID="kpiDropDownChart1" runat="server" seriesid='<%#Bind("SeriesID") %>' selectedChart='<%#Bind("ChartType") %>'/>
                                     </ItemTemplate>
                                     </telerik:GridTemplateColumn>

The control populates correctly (I even added the primarykey into the item.text to show it is there - see pic above)
When The selected index is changed the event fires (pasisng all of the argument including old and new values) inside the user control, but all of the properties in the usercontrol now are empty ie the primaryKey (seriesID) required to run call my update method.


Any idea what I am doing wrong?

Imports Telerik.Web.UI
  
Public Class kpiDropDownChart
    Inherits System.Web.UI.UserControl
    Private _seriesid As Integer
    Private _selectedChart As String
    Private _chartid As Integer
  
    Public Property SeriesID() As Integer
        Get
            Return (_seriesid)
        End Get
        Set(ByVal value As Integer)
            _seriesid = value
        End Set
    End Property
    
    Public Property selectedChart() As String
        Get
            Return (_selectedChart)
        End Get
        Set(ByVal value As String)
            _selectedChart = value
        End Set
    End Property
  
  
    Protected Sub ddAddFieldChart_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles ddAddFieldChart.PreRender
        Dim chartTypeTable As DataTable = kpicommonListFns.GetTimeChartList
        Dim row As DataRow
        For Each row In chartTypeTable.Rows
            Dim CItem As RadComboBoxItem = New RadComboBoxItem
            CItem.Text = row("Description") & _seriesid
            CItem.Value = row("chartRef")
            CItem.ImageUrl = "~/images/chartImages/" & row("IconName")
            ddAddFieldChart.Items.Add(CItem)
        Next
        ddAddFieldChart.SelectedValue = _selectedChart
    End Sub
  
    Private Sub ddAddFieldChart_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles ddAddFieldChart.SelectedIndexChanged
  
        '###### when this even fires _seriesid = nothing ####################
        Dim thisSeries As kpiChartSeries = New kpiChartSeries(_seriesid)
        thisSeries.SetChartType(ddAddFieldChart.SelectedValue)
    End Sub
End Class


Thanks

johnathan
Daniel
Telerik team
 answered on 15 Dec 2010
1 answer
236 views
Hi ,

I need to allow scroll for Detail Table along with have static header . I have implemented solution based on the below link.
http://www.telerik.com/community/code-library/aspnet-ajax/grid/separate-scrolls-for-inner-tables-in-hierarchical-grid.aspx

Since detail table have large amount of data, when user scrolls down, he will not be able to see the Detail table header.
So please suggest the solution for the problem or Is there any work around for this?
Can we use Radgrid inside a RadGrid instead of DetailTable to solve this problem?

I have attached the screenshot for your reference. Screenshot1 shows the initial look of the grid and Screenshot2 shows after scrolling the DetailTable.

It is very urgent and important for me.Please reply as soon as possible.

when data is more in the grid user gets to see 4 scrolls. which is like confusing ... please refer the screen shot.

Thanks,
Nagendra



Tsvetoslav
Telerik team
 answered on 15 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?