Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
68 views

I've run into a little problem on my side with the radtreeview. I'm trying to build a treeview based on a folder structure on a server that will allow an user to select which folders another user has access to. I can dymanically load everything and save just fine. The problem is when I come back to a new instance of the radtreeview, I have just the basic level node (in this case folder) and the tri-state is uncheked as it doesn't have any children yet (as expected because the tree doesn't know about the folders yet).

What's the best way to pre-load this list of existing checked boxes and still allow it to load the rest of the folders via ajax when the user clicks on the node. There are about 100 folders, each with about 50 subfolders which each contain another 10-50 subfolders (around 100k folders in total). Because of this, preloading will be painfully slow. The thing is that each user only has about access to 20 or so folders usually under one of the lower chains.

If someone has some sample code or ideas for pre-loading specific levels, including checking only those, and then fully populating when the expand a higher level I would greatly appreciate it. I do have a web service that returns the list of folders they have access to but I'm not sure of when/how I should call it in the scope of this.

For the loading the nodes via AJAX we use the code below (which is pretty much from the samples):

I figured I'd attempt to load the list of authorized folders in the load method (as show below) but that fails:

Actual Control:

 

<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" TriStateCheckBoxes="True"
    OnClientLoad="load" OnClientNodeDataBound="nodeDataBound" OnClientNodePopulating="nodePopulating"
    OnClientNodeClicked="nodeClicked" OnClientNodePopulated="nodePopulated" Skin="Outlook">
    <WebServiceSettings Path="~/Services/Directories.asmx" Method="GetDirectories" />
    <DataBindings>
        <telerik:RadTreeNodeBinding ImageUrlField="ImageUrl" TextField="Text" ValueField="Value" />
    </DataBindings>
</telerik:RadTreeView>

The true problem is when I save back, if the user hasn't loaded the final nodes that are currently selected, they are lost.

Gary
Top achievements
Rank 1
 asked on 19 May 2011
2 answers
135 views
hi my dear friends :
i have a RadDataPager inside A RadListView...
also i have A RadComboBox That is in Ralationship with RadListView.Mean By SelectedIndexChanged Of It , RadListView Is Refreshed(DataBinded).
my Problem is when u change the RadListView Page at item #1 of RadComboBox and change the Item Of RadComboBox To Item#2 , so we still have the previous selected page!
how can i change the page of RadListView to 1 in SelectedIndexChanged Of RadComboBox?

thanks for reading and helping me
Majid Darab
Top achievements
Rank 1
 answered on 19 May 2011
1 answer
75 views
Hi,

   i am using rad scheduler control with recursive i need to disable the recurence action dialog when resizing and deleting the appointment. can you please tell how to do resizing and deleting with out recurrence action popup
Veronica
Telerik team
 answered on 19 May 2011
9 answers
337 views

In a MVC view page, I set the data source of the Grid control.
 
I want to conditionally populate the cells based on the data in the server side of the view in C#. How do I populate it?
 
I used to do it in the ItemDataBound server side event. Is there any way I can loop throgh the datasource and declarativley define the ItemTemplate of the GridTemplateColumn? Please let me know how I can do conditional display in server side.

Thanks

Jon Wood
Top achievements
Rank 1
 answered on 19 May 2011
5 answers
99 views
I have two RadGrids that have selectable rows that popup RadWindows.  When the windows close, I refresh the RadGrids to apply changes made in the windows.  I do this by using fireCommand with a sort (at the time I created this kind of logic with another app, sort was the only command that seemed to work all the time to refresh).  It works fine if I just refresh one grid that way, but if I try to do two, neither refreshes.  Do I need to do something extra to get both grids to fire a command in the same javascript function?
Mike Dennis
Top achievements
Rank 1
 answered on 19 May 2011
0 answers
76 views
Hi,
I've been implementing a RadGrid  using LINQ.
I've been trying to update the grid using a popup WebUserControl with AutomaticUpdates.
I've found (after a lot of tribulation) that if, in the WebUserControl, the field IDs are not identical to the DataBinding field names, the grid updates will not work.
Using the attached Northwind sample (which does work!), if you change the textbox ID in the customers.ascx WebUserControl to anything other than CompanyName (which is the database bind field name), the grid update fails e.g.

 

 

<telerik:RadTextBox runat="server" ID="txtCompanyName" Text='<%#DataBinder.Eval(DataItem,"CompanyName") %>' Width="150px" TextMode="MultiLine"/>

 

instead of

 

 

<telerik:RadTextBox runat="server" ID="CompanyName" Text='<%#DataBinder.Eval(DataItem,"CompanyName") %>' Width="150px" TextMode="MultiLine"/>

 


This problem has taken me quiet a while to get to resolve, so i thought I would post the issue here for anyone else who's experiencing the same headache.
Thanks,
Vincent.
Vincent Russell
Top achievements
Rank 1
 asked on 19 May 2011
1 answer
111 views
There doesnt seem to be a way to hide a tab in the Ribbonbar? This would be a useful option to change options based on user access.
Helen
Telerik team
 answered on 19 May 2011
1 answer
261 views
Having a issue with getting the RadFileExplorer work with the example provided in
http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/dbfilebrowsercontentprovider/defaultcs.aspx

Following is the code used in my aspx file

<telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="750px" Height="500px"
OnClientItemSelected="OnClientItemSelected"
            Skin="Sitefinity">
<Configuration ViewPaths="~/Root/Default/ViewPath" UploadPaths="~/Root/Default/UploadPath"
   DeletePaths="~/Root/Default/DeletePath"  />
</telerik:RadFileExplorer> I have the ViewPaths, UploadPaths and DeletePaths set up in my solution as in the attached file (fileupload.png). The table structure is modeled according to the Items table with the addition of column CreatedBy. Have the following record in the Items table ItemID:1 Name: Root ParentID: NULL MimeType: NULL IsDirectory: True Size: NULL Content: NULL upsize_ts: NULL CreatedBy: nmarker Question 1: With the above setup I am unable to upload documents, or create Directories. Check file screenshot2.png My requirement is every logged in user to my website will have their own file structure defined in the DB. Have modified DataServer.cs
 private DataTable Data
    {
...                 SqlDataAdapter adapter = new SqlDataAdapter("SELECT ItemID, [Name], ParentID, MimeType, IsDirectory, [Size]FROM rbItems where CreatedBy='" + clsUtility.getLoggedInUserName() + "' ORDER BY ItemID", Connection);
        ...
    }
public byte[] GetContent(string path)
    {
..         SqlCommand command = new SqlCommand("SELECT Content FROM rbItems WHERE ItemID = @ItemID AND CreatedBy = @CreatedBy", Connection);
        ...
    }

    public void CreateItem(string name, string path, string mimeType, bool isDirectory, long size, byte[] content)
    {
..         SqlCommand command =
            new SqlCommand(
                "INSERT INTO rbItems ([Name], ParentId, MimeType, IsDirectory, [Size], Content, CreatedBy) VALUES (@Name, @ParentId, @MimeType, @IsDirectory, @Size, @Content, @CreatedBy)", Connection);
        ...
        command.Parameters.Add(new SqlParameter("@CreatedBy"clsUtility.getLoggedInUserName()));
...     }
Question 2: Can all logged in users share the same physical folder structure? as in fileupload.png? or should each user have their own folder structure defined? Please advise.
Pero
Telerik team
 answered on 19 May 2011
2 answers
85 views
I am relatively new to AJAX design patterns. I have a grid which usually shows multiple pages, as a simple publication catalog.

Let's say the user navigates to page 5 using the standard control, and then clicks a templated column entry that contains a hyperlink to a publication detail page.

Using the browser's Back button returns to the same grid, same data, but resets to showing the first page of results. I think this is expected because the paging is done on the client and disappears once the page is left via the hyperlink.

I have set the scroll bars for the grid, and enabled maintain position options, so if I return to the page, the proper grid page is displayed.

So, is there a way to get these in sync? Note that I have set a fixed client scrolling size, enabled saving of viewstate, etc.

As a test, I have set the selected page index as an IIS session variable, and then reset the grid upon return, but this seems like a NON-best practice, if you know what I mean.

Also note that my question is not at all related to browser history with the Back button, as far as I can tell, that has no relevance here.
Tomica
Top achievements
Rank 2
 answered on 19 May 2011
1 answer
221 views
Hi

What I specifically want to do is access the parent element of a grid row, specifically the the tbody element.

I am attempting to do this with the following JQuery snipet inside a RadScriptBlock

var

 

 

gridRowParent = $(".rgRow").parent;

Is this even possible.

Next I want to get the height of the gridRowParent.

Any pointers greatly appreciated.

 

Tsvetina
Telerik team
 answered on 19 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?