Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
78 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
271 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
87 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
224 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
7 answers
234 views
Hi,
I have code to show/hide detail tables inside rad grid in rdGrid_PreRender method. I have this code run on !IsPostback and handling expand/collapse inside ItemComand event handler.

        private void ShowHideQualifications(GridTableView tableView)
        {
            GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView);
            bool atleastOneTableExists = false;
            foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
            {
                foreach (GridTableView nestedView in nestedViewItem.NestedTableViews)
                {
                    TableCell cell = nestedView.ParentItem["ExpandColumn"];
                    if (nestedView.Items.Count > 0)
                    {
                        atleastOneTableExists = true;
                    }
                    if (nestedView.Items.Count == 0)
                    {
                        cell.Controls[0].Visible = false;
                        nestedView.Visible = false;
                    }
                    cell.Controls[0].Visible = nestedViewItem.Visible = atleastOneTableExists;
                }
                atleastOneTableExists = false;
            }
        }

Now the issue is with paging. When I click on any other page, the grid is posting back and so the code in PreRender doesn't run to hide the detail tables. If I change the code to run always, it runs even when expand/collapse buttons are clicked.

How can I fix it? Any help is greatly appreciated.

Thanks,
BC.
Mira
Telerik team
 answered on 19 May 2011
1 answer
146 views
I have a radscheduler component on an asp.net page - connected to a sql server data source.  I have stored procedures for the select, add, update and delete procedures. 

On the 'select' stored procedure, if I DON'T set the default values for the begin and end dates, the stored procedure doesn't select any records.  How can I check the 'dates' that the radscheduler is displaying and then submit those dates to the 'select' stored procedure?  (Obvously, the select stored procedures requires a date range)

Thanks!
Richard
Top achievements
Rank 1
 answered on 19 May 2011
1 answer
188 views
Hi,

    i am using Rad grid and in side i am binding three columns (Start time,End time and Time Difference)
inside the Start time and End time columns i am using Rad Time Picker controls. and inside the Time difference column i am using label control . my question is when i am chaging time(start time or end time) i need to update the time difference in client side.
can you please tell me the solution for this

if possible send me a sample please

FYI: i have attached my grid screen shot please verify
Shinu
Top achievements
Rank 2
 answered on 19 May 2011
1 answer
72 views
Hi,

I'm using Radeditor to do some HTML file editing on my website and all the Images on my HTML page is from a shared path that I have assigned to my RadEditor Image manager. When I include any Image on to the content area of the RadEditor it shows the complete shared path in the image src attribute.

Is there any way that I could show just a relative path ?

For example : my images are in a shared path //serverName/FolderName/Images and I'm using an image from this path which  is shown in the HTML view as <image src ="//serverName/FolderName/Images/a.jpeg "/>

Is it possible to make the RadEditor to show just a relative path like  <image src ="/Images/a.jpeg "/> in the HTML view, I saw some ideas from other threads related to this topic but they are not applicable to the latest version of RadControls. Please let me know your thoughts on this.

Thanks,
Mani
Rumen
Telerik team
 answered on 19 May 2011
1 answer
79 views
Hi is there a way how to get full access to the AsynUpload used in the FileExplorer. I want to use some clientside events on the FileExporer related to the AsyncUploader like OnClientFilesSelected. However I can't seem to find these in the FileExplorer.

Thanks a lot
Peter Filipov
Telerik team
 answered on 19 May 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?