Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
213 views
I have a radgrid, which has a nested template view with another grid in the nested view.  I have a column that contains a hyperlink, which i only want displayed if the user is in a particular role.  I have the role part down, but my problem is I cannot access the grid through the vb.net code behind window.

I try me.gridSchedule, but it is not in the list.

How can I hide this column programmatically?

Thanks...Brian
Jayesh Goyani
Top achievements
Rank 2
 answered on 29 Aug 2012
2 answers
44 views
I have copied the source code from the VB version of the demo which demonstrates how to pop up a custom control with database content.

I also duplicated the database tables.

I can get 95% of the way, and then I find an error that makes no sense to me. The attached screen shot indicates a problem with creating an instance of the custom control as "ProductDetailsVB" not defined. This is actually detected in VS2010, but I ran the code to create a better error description.

I have confirmed that the ASCX control works with static placement on another page. In order to run the demo code, I have commented out two lines "Dim Details as ProductDetailsVB..." and "details.ProductID. When I do this I get the appropriate behavior for the popup control, minus actual database content because it is not receiving the ProductID.

I have created the control as "ProductDetailsVB.ascx" to match the source code. But I do note that the online demo references "ProductDetailsCS.ascx" which would not be appropriate for a VB programmer such as myself.

This is my first custom control, and I have no clues as to the error, and am doubly confused over the reference to CS in a VB demo.
Partial Class pop2
    Inherits System.Web.UI.Page
    Protected Sub OnAjaxUpdate(sender As Object, args As ToolTipUpdateEventArgs)
        Me.UpdateToolTip(args.Value, args.UpdatePanel)
    End Sub
    Private Sub UpdateToolTip(elementID As String, panel As UpdatePanel)
        Dim ctrl As Control = Page.LoadControl("ProductDetailsvb.ascx")
        panel.ContentTemplateContainer.Controls.Add(ctrl)
        Dim details As ProductDetailsVB = DirectCast(ctrl, ProductDetailsVB)
        details.ProductID = elementID
    End Sub
    Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
        If e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then
            Dim target As Control = e.Item.FindControl("targetControl")
            If Not [Object].Equals(target, Nothing) Then
                If Not [Object].Equals(Me.RadToolTipManager1, Nothing) Then
                    'Add the button (target) id to the tooltip manager
 
                    Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("ProductID").ToString(), True)
                End If
            End If
        End If
    End Sub
    Protected Sub RadGrid1_ItemCommand(source As Object, e As GridCommandEventArgs)
        If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then
            RadToolTipManager1.TargetControls.Clear()
        End If
 
    End Sub
 
End Class




Tomica
Top achievements
Rank 2
 answered on 29 Aug 2012
2 answers
67 views
I have a simple RadMenu, with several RadMenuItem's. After the page loads, and sits there for a while, it seems that when I mouse over when of the menu items, it is doing some type of AJAX postback to the server (e.g. it can hang or delay showing the highlighted button). Is this correct ... is it doing AJAX calls for just displaying simple menu items? Is there a way to disable any/all AJAX stuff for the menu ... I just want to use it for simple menus with an onClick javascript handler.
Thanks
Jay O'Brien
Top achievements
Rank 1
 answered on 29 Aug 2012
4 answers
108 views
I´m not complaining... just reporting a less normal behaviour of this wonderfull grid!
In IE everyting is ok but in firefox, crome or safari the vertical scroll bar fails to display on the first time the grid is shown. Afterwards it shows normaly.
Joao
Top achievements
Rank 1
 answered on 29 Aug 2012
1 answer
112 views
Hello All,
I am using telerik RadEditor. I do not want any scroll bar to this editor so I have given AutoResizeHeight="true".
It works fine in Design mode but if I switch to HTML mode then this editor get a vertical scroll bar.
following is the code,
<
telerik:RadEditor runat="server" ID="contentHeaderEditor" Width="100%" AutoResizeHeight="true"
                                            EnableResize="false" ToolsFile="~/XML/ContentHeaderTools.xml"
                                            EditModes="Design,Html" SkinID="Telerik">
</telerik:RadEditor>
Can anybody help me to remove this vertical scroll bar in HTML mode.
Thanks
Rumen
Telerik team
 answered on 29 Aug 2012
5 answers
1.2K+ views
Hi all,
1. I have the Radgrid having updatable datasource (List<T>) that I store in the session's variable after updating/inserting.
2. All works OK excepting one thing:
3. Each time when I change the C# or aspx - add/remove some control, for example) first time after change the datasource extracted from session is null (when I want edit some row/insert new row)!
4, Second or more time (if I CHANGE NOTHING) all it's OK.

Can anybody give me prompt in this problem?
Thank you.

Boris


O'Man
Top achievements
Rank 1
 answered on 29 Aug 2012
3 answers
113 views
Hi, guys,

I selected some code in RadEditor's "Design" mode.
Then,I changed the mode to "Html" for editing,but the part which I selected in "Design" mode was onblur.

Can I keep the selected part in previous mode being selected after I swap the RadEditor's mode?


Best Regards,
Jack
Rumen
Telerik team
 answered on 29 Aug 2012
1 answer
47 views
RadRotator enables the left arrrow even though the InitialItemIndex is zero and WrapFrames is false. Logically, you can't go one page before the first item, yet RadRotator allows you to do that. What's even worse - when users click the left arrow the RadRotator silently loads third page and then locks up the users between first three pages that are even loaded in the reverse order (this is experienced with version 2012.1.215).

RadRotator also enabled the right arrow even though it does not know whether there are further items on the next page. And when users click that "Page Next" button one of two things happen - either the arrow gets disabled to mark that there is no more items (why RadRotator didn't find this out earlier? Isn't it missing a GetCount() method?) or it goes to next page and then again locks up users there and they cannot click on the "Previous Page" button. 

This happens slightly randomly, unfortunately, but often enough to confuse and scary users.

I believe this could be solved by preloading the first page not on demand but while page render. At this moment the RadRotator could be told the total number of items so it would behave properly when paging. I tried to fill the Items set of RadRotator from code behind and later turn on the load on demand but the RadRotator renders empty.

Can you please suggest a way of prefilling the first page from code behind and let the other pages be loaded on demand?
Slav
Telerik team
 answered on 29 Aug 2012
2 answers
142 views
I have a column that is a datetime but I only want to show time. I tried dataformatstring="{0:H:mm:ss}" but that didn't work. So, I went into my code behind and took the column and formatted it myself.
   Dim nt = ""
                    If (reader("NextContactTime").ToString <> "") Then
                        Dim tempTime As New DateTime
                        tempTime = reader("NextContactTime")
                        nt = tempTime.ToShortTimeString
                    End If

I then add nt to the data table that I bind my grid with. The problem is, when I use the built in sort function, it doesn't sort properly. I have the column type defined as datetime in my data table and I also made sure all of the days are the same. I.e. only the time is different they all are 01/01/2012 9:30:00 01/01/2012 9:45:00

What is the best way to show just time in a column and allow it to be sorted?
gezim
Top achievements
Rank 1
 answered on 29 Aug 2012
4 answers
179 views
Hi Team,

I have a peculiar problem and I am not sure if anyone had come across this problem earlier. however the issue goes like this..

I have a grid with combination of TemplateColumns and BoundColumns and when I filter the grid using the filters under template columns I can see the results in UI (grid) but when I do the same in BoundColumns I do not see any results.. !!!

Funny thing is I can see the output from the query and its returns the correct number of results from DB. and its also assigned to the GridDataSource in the NeedDataSource event. however I cannot find the GridDataItem in the ItemDataBoundItem, I can fetch only headeritem, filteritem and footeritem.

It shows "No records to display" even when there are lot of records assigned to the DataSource.
Here I am attaching the screenshot, where you can see that the records count is displayed but not the records.. !!

Any help is highly appreciated.

Thanks,
Preetham.
Preetham
Top achievements
Rank 2
 answered on 29 Aug 2012
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?