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

Requirements

RadControls version

Q3 2008        

.NET version

3.5

Visual Studio version

2008

programming language

vb.net

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION

I have written a small code to test loding of menu from an object collection (Entity spaces)

RadMenu1.DataFieldID =

"MenID"

 

RadMenu1.DataFieldParentID =

"MenMenIDParent"

 

RadMenu1.DataNavigateUrlField =

"MenNavigateUrl"

 

RadMenu1.DataTextField =

"MenName"

 

 

Dim sp As MenuCollection = New MenuCollection

 

sp.GetMenuForUser(1)

RadMenu1.DataSource = sp

RadMenu1.DataBind()

the code runs but the menu is blank. any suggestion???
I checked my collection it is returning 16 entities/objects.

vikas
Top achievements
Rank 1
 asked on 12 Feb 2009
4 answers
152 views
The application I am building is using .NET theme files to properly apply skins to various elements.  My problem is simple:

In my skin file I have some items as follows:


 
<Telerik:RadTreeNode runat="server" SkinID="District" ImageUrl="images/icons/folder.gif" /> 
 <Telerik:RadTreeNode runat="server" SkinID="Location" ImageUrl="images/icons/house.gif" /> 

What I would like to do, is based on the data being bound to the treeview is assign a different SkinID to each node as they are created.

My problem is that the 2 events I have to work with, NodeCreated and NodeDataBound, won't accomplish this.  NodeCreated is too early because I can't determine the type of node being created because the DataItem value of e.Node is null.  NodeDataBound is too late because the node has already been added to the Controls collection and the SkinID cannot be assigned.

How would I go about accomplishing this?

Thanks

 

 

 

Sypher
Top achievements
Rank 1
 answered on 12 Feb 2009
3 answers
164 views
I have been unable to get RadControls to work with DotNetNuke 5.0. Has anybody succeeded in using them with DNN 5.0?

Are there any Telerik demos of RadControls, especially RadGrid, showing how to make them work with DotNetNuke 5.0?
Darrell
Top achievements
Rank 1
 answered on 12 Feb 2009
2 answers
157 views
All the examples have the insert form showing up at the top of the grid?. Is there a way to make it show at the bottom. My add button is there so it makes more sense to show at the bottom.

chris
Top achievements
Rank 1
 answered on 12 Feb 2009
1 answer
89 views

In IE8 beta there is one annoying issue when using RadSplitter and async postbacks with RadAjaxPanel. The RadSplitter simply moves downwards a bit when the async postback completes, leaving a gap of empty space above it. This happens at least when the RadSplitter is the parent element in the page, and it occurs regardless of width/height settings.

As quite a few of our users have installed IE8 and are complaining about this issue, could you please check whether it is a bug in IE8 or if RadAjaxPanel adds some content to the page causing the RadSplitter to move? The problem is simple to reproduce using the following code:
 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal">    
        <telerik:RadPane ID="RadPane1" runat="server">  
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
                <asp:Button ID="Button1" runat="server" Text="Click" /> 
            </telerik:RadAjaxPanel> 
        </telerik:RadPane> 
    </telerik:RadSplitter>    
    </form> 
</body> 
</html> 
 

Regards,
Sigmund Lunde
Omega AS
Sigmund Lunde
Top achievements
Rank 1
 answered on 12 Feb 2009
4 answers
112 views
Hi,

   I have a quick question about the RadSplitter object.

   Within my Radsplitter that is displayed on a FullScreenMode, I have a RadPane that contains a treeview control. This tree expands when clicked because it has a lot of entries on it, such that the said pane would have a vertical scrollbar. Now my problem is that whenever I expand the tree further down and click on the node, the whole splitter goes way above the screen. If you click a node much further down, it would be gone out of the view. It does not have a problem if you click on any of the nodes that are within the range of the initially loaded page. I am guessing the RadSplitter should also account the height of the radpane when it expands. How can I make this splitter stick so that it won't move up? 

   I really appreciate all the help! Thank you very much!

Regards,
Arthur
Hansik
Top achievements
Rank 1
 answered on 12 Feb 2009
1 answer
115 views
We have a page with a pair of grids - one containing selected items and one containing items that have not been selected.

We want to allow dragging within the grid of selected items, to allow for reordering, and we want to allow for dragging between the grids to allow items to be selected or unselected.

The complication is that we have a few items that we do not want to be draggable.  They should appear at the top of the grid of selected items, and they should stay there.  The user should not be able to drag them to another locating in the selected items grid, and the user should be able to drag them to the unselected items grid.  In other words, the user should not be able to unselect them or to reorder them.

Any advice as to how accomplish this?  There is an invisible GridBoundColumn in the grid called "Fixed" containing "True" or "False".  I've tried using this in OnItemDataBound to set item.Enabled = false, and the appropriate rows are appearing greyed out in the grid.  But I can still drag the disabled rows.

Any ideas?

Jeff
Top achievements
Rank 1
 answered on 12 Feb 2009
1 answer
86 views
Hi,
Thanks for resolving my problem in the past. Here is another one and I spent 3 hours on this & cant figure out. Please help

I am using tooltip as a popup message control. I have two scenarios - one is using tooltip to display text and the other one is using tooltip to display content inside of control(s). In this case, i'll use label as the parameter for popup - see below

  Public Sub ShowPopupMessage(ByVal message As String)  
 
        Dim popupMessage As New Telerik.Web.UI.RadToolTip  
 
        pl.Controls.Add(popupMessage)  
 
        SetPopupControlProperties(popupMessage)  
        popupMessage.Text = message  
 
    End Sub 
 
 
    Public Sub ShowPopupMessage(ByVal lbl As Label)  
 
 
        Dim popupMessage As New Telerik.Web.UI.RadToolTip  
        pl.Controls.Add(popupMessage)  
 
        SetPopupControlProperties(popupMessage)  
 
        popupMessage.Controls.Add(lbl)  
 
    End Sub 

Let say I have two buttons and upon click - it will either call ShowPopupMessage(String) or ShowPopupMessage(Label control).

If I click on ShowPopupMessage(String) and then click on ShowPopupMessage(Label) - the 2nd popup does not show the right content. It is still showing ShowPopupMessage(String) content. Any idea? Thanks!


Richard
Top achievements
Rank 1
 answered on 12 Feb 2009
1 answer
191 views
Hi, I'm having problems to export the data of my grid.
My code to export the data:

Protected Sub btExpCsv_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btExpCsv.Click
      
        RadGrid1.ExportSettings.ExportOnlyData = True
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.OpenInNewWindow = True
        RadGrid1.MasterTableView.ExportToCSV()
    End Sub

    Protected Sub btExpExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btExpExcel.Click
       
        RadGrid1.ExportSettings.ExportOnlyData = True
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.OpenInNewWindow = True
        RadGrid1.MasterTableView.ExportToExcel()

    End Sub

    Protected Sub btExpPdf_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btExpPdf.Click
      
        Dim dataAtual As Date
        dataAtual = System.DateTime.Now
        RadGrid1.ExportSettings.ExportOnlyData = False
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.ExportSettings.OpenInNewWindow = True
        RadGrid1.ExportSettings.Pdf.AllowCopy = True
        RadGrid1.ExportSettings.Pdf.PaperSize = GridPaperSize.Oficio
        RadGrid1.ExportSettings.Pdf.PageTitle = "Relatório Pontos Analógicos - " & dataAtual
        RadGrid1.MasterTableView.ExportToPdf()
    End Sub

The grid:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" DataSourceID="sqlEventos"
                        GridLines="None" AutoGenerateColumns="False" AllowSorting="True"
                        Skin="Vista">
                        <HeaderContextMenu EnableTheming="True">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </HeaderContextMenu>
                        <MasterTableView DataSourceID="sqlEventos" PagerStyle-Mode="NextPrevAndNumeric" PageSize="25">
                            <RowIndicatorColumn Visible="True">
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="e3timestamp" HeaderText="Data/Hora"
                                    SortExpression="timestamp" UniqueName="column">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="cd_ponto_digital" HeaderText="Ponto"
                                    UniqueName="column1">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="txt_alarme" HeaderText="Mensagem"
                                    UniqueName="column2">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="fieldvalue" HeaderText="Valor"
                                    UniqueName="column3">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="quality" HeaderText="Qualidade"
                                    UniqueName="column4">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="timestamp" UniqueName="column4"
                                    Visible="false">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings AllowExpandCollapse="False" AllowGroupExpandCollapse="False"
                            ColumnsReorderMethod="Reorder">
                            <Selecting EnableDragToSelectRows="False" />
                            <Resizing AllowColumnResize="True" AllowRowResize="True"
                                EnableRealTimeResize="True" />
                        </ClientSettings>
                        <FilterMenu EnableTheming="True">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </FilterMenu>
                    </telerik:RadGrid>


I have no idea of what is causing the error below:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.GridTableView.PrepareExport() +14
   Telerik.Web.UI.Grid.Export.TableViewExporter.PrepareForExport() +171
   Telerik.Web.UI.Grid.Export.TableViewExporter.page_PreRender(Object sender, EventArgs e) +5
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8679510
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

Any help would be very appreciated.

Simón de Lizarza
Daniel
Telerik team
 answered on 12 Feb 2009
1 answer
296 views
Hi,
  I am using radGrid in ASPNET AJAX Q3 2008.  The enable the scrolling and changed my grid height to 200px, everything looks fine.  But whenever there is a postback on the page, the grid goes back to its original size, then changes back to 200px right away.  Is it a glitch of the grid or I missed something?

Wesley


Here is my code. It's a very simple page.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TelerikGrid._Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
            GridLines="None" Height="200px">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID"
                DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
            ReadOnly="True" SortExpression="ID" UniqueName="ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="StudyID" DataType="System.Int32"
            HeaderText="StudyID" SortExpression="StudyID" UniqueName="StudyID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FormTypeID" DataType="System.Int32"
            HeaderText="FormTypeID" SortExpression="FormTypeID" UniqueName="FormTypeID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FormName" HeaderText="FormName"
            SortExpression="FormName" UniqueName="FormName">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>

            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>



        </telerik:RadGrid>
        <br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnStrP4EDC %>"
            SelectCommand="SELECT [ID], [StudyID], [FormTypeID], [FormName] FROM [Forms]">
        </asp:SqlDataSource>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </div>
    </form>
</body>
</html>
Adam Cole
Top achievements
Rank 1
 answered on 12 Feb 2009
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?