Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
47 views
When i set width of radgrid and set property AllowScroll="true" so it works Fine in Firefox and Chrome but in IE8 width is not set.
Code is below :

<telerik:RadGrid ID="grdAssetsIn" runat="server" OnLoad="grdAssetsIn_OnLoad" OnNeedDataSource="grdAssetsIn_NeedDataSource"
                                    SkinID="CR" GridLines="None" AllowPaging="True" EnableViewState="false" AutoGenerateColumns="False" OnItemDataBound="grdAssetsIn_ItemDataBound"
                                    AllowMultiRowSelection="true" Width="600px">
                                    <MasterTableView EnableViewState="true" Width="600px"  PageSize="10" EnableNoRecordsTemplate="true"
                                        DataKeyNames="AssetID" ClientDataKeyNames="AssetID" >
                                        <NoRecordsTemplate>
                                            <div style="text-align: left; >
                                                <asp:Label ID="lblEmptyMsg" runat="server" meta:resourcekey="lblEmptyMsg2Resource1"></asp:Label></div>
                                        </NoRecordsTemplate>
                                    </MasterTableView>
                                    <PagerStyle AlwaysVisible="True" />
                                    <ClientSettings EnableRowHoverStyle="true">
                                        <Selecting AllowRowSelect="True" />
                                        <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                                        <ClientEvents OnGridCreated="GridCreated" />
                                        <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
                                    </ClientSettings>
                                </telerik:RadGrid>
Pavlina
Telerik team
 answered on 12 Dec 2012
1 answer
47 views
HI,
I have added a GridCalculated column as below:
<telerik:GridCalculatedColumn DataFormatString="{0:C}" DataType="System.Double" HeaderText="Extended Price"
                    UniqueName="ExtendedPrice" DataFields="OrderQuantity,UnitPrice" Expression="{0}*{1}"
                    FooterText="Total : " Aggregate="Sum">
                </telerik:GridCalculatedColumn>

In the footer "Total : "  footer text is shown for the first time, when some postback happens the footer text is getting disappered. However the total amount is shown.  Only the the "Footer text" is not shown.

How to fix this?
Thanks
Pavlina
Telerik team
 answered on 12 Dec 2012
1 answer
111 views
Hi,

I calling this function from other page (gridview editclick event) .
 So then EditValue(refer code) has some value and binding in to treeview .

Private Sub BindTreeView(ByVal dt As DataTable, ByVal EditValue As String, ByVal searchedColumn As String)
        Try
            Dim siteData As New List(Of TreeViewCheckbox)()
            If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
 
                Dim i As Integer = 0
                Do While (i < dt.Rows.Count)
                    Dim row As DataRow = dt.Rows(i)
                    Dim srColumn As String = row(searchedColumn)
                    i = (i + 1)
                    siteData.Add(New TreeViewCheckbox(i + 1, 1, srColumn))
                Loop
            End If
 
            If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If
 
            tvChkSearchResult.DataTextField = "Text"
            tvChkSearchResult.DataFieldID = "ID"
            tvChkSearchResult.DataFieldParentID = "ParentID"
            tvChkSearchResult.DataSource = siteData
            tvChkSearchResult.DataBind()
 
            If (siteData.Count = 0) Then
                RadWindowManager1.RadAlert("No results found,Please try again.", 330, 100, Nothing, Nothing)
            Else
                tvChkSearchResult.ExpandAllNodes()
                HideControls(True)
            End If
        Catch ex As Exception
            RadWindowManager1.RadAlert(ex.Message, 330, 100, Nothing, Nothing)
        End Try
 
    End Sub

Here adding in to siteData ...
If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If

Once datasource set by sitedata then I need to call event to fillup other 3 textboxes values that based on node value selected(edit value).

How I can do fill up textboxes ? please help me on this.

Thanks in advance ..
Boyan Dimitrov
Telerik team
 answered on 12 Dec 2012
1 answer
92 views
Hi,

I have added treeview in my aspx page like this..
  <asp:TableCell CssClass="dfv">
   <telerik:RadTreeView ID="tvChkSearchResult" runat="server" OnNodeClick="tvChkSearchResult_NodeClick"
    AutoPostBack="True" Width="300px" Height="200px" CheckBoxes="True" TriStateCheckBoxes="true"
 CheckChildNodes="true">
  </telerik:RadTreeView>
</asp:TableCell>

and binding here ...
Dim siteData As New List(Of TreeViewCheckbox)()
            If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
 
                Dim i As Integer = 0
                Do While (i < dt.Rows.Count)
                    Dim row As DataRow = dt.Rows(i)
                    Dim srColumn As String = row(searchedColumn)
                    i = (i + 1)
                    siteData.Add(New TreeViewCheckbox(i + 1, 1, srColumn))
                Loop
            End If
 
            If Not String.IsNullOrEmpty(EditValue) Then
                siteData.Add(New TreeViewCheckbox(1, 0, "Select All"))
                siteData.Add(New TreeViewCheckbox(2, 1, EditValue.Trim()))
            End If
 
            tvChkSearchResult.DataTextField = "Text"
            tvChkSearchResult.DataFieldID = "ID"
            tvChkSearchResult.DataFieldParentID = "ParentID"
            tvChkSearchResult.DataSource = siteData
            tvChkSearchResult.DataBind()


Now I would like to fill up values in to textboxes that is based on selection on treeview.

but these events are not firing..

Protected Sub tvChkSearchResult_NodeCheck(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvChkSearchResult.NodeCheck
       If tvChkSearchResult.SelectedNode.Checked Then
           Dim s As String = ""
       End If
   End Sub
 
   Protected Sub tvChkSearchResult_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvChkSearchResult.NodeClick
       If tvChkSearchResult.SelectedNode.Checked Then
           Dim s As String = ""
       End If
   End Sub

Please help me on how to fire events ?

Thanks in advance..
Boyan Dimitrov
Telerik team
 answered on 12 Dec 2012
1 answer
84 views
So for instance when someone selects an action that is handled by the server side node edit handler it works fine right then.  But if you susbsequently click refresh in the browser (IE8, IE9) it fires the exact same event again.  Not a very desirable behavior.

I've tried resetting the __EVENTTARGET and __EVENTARGUMENT values, but that doesn't work.  I've seen references to using $.ajaxSetup({cache:false});  to prevent that, but I'm not sure what Telerik's equivalent is.
Bozhidar
Telerik team
 answered on 12 Dec 2012
5 answers
391 views
Hi,

I am trying to create user control which has radgrid and sqldatasource controls. I added radgrid to a a new ascx as given below:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs"
    Inherits="Controls_WebUserControl"  %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDS" AllowFilteringByColumn="true"
    AllowPaging="True" AllowSorting="True" runat="server"  OnPageIndexChanged="RadGrid1_PageIndexChanged" Skin="Office2007" PageSize="10" EnableViewState="true">
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
    <MasterTableView>
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <Columns>
            <telerik:GridBoundColumn DataField="RollNo" SortExpression="RollNo" HeaderButtonType="TextButton" ShowSortIcon="true"
                AutoPostBackOnFilter="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="StudentName" SortExpression="StudentName" HeaderButtonType="TextButton"
                ShowSortIcon="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Address" SortExpression="Address" HeaderButtonType="TextButton" ShowSortIcon="true">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDS" ConnectionString="<%$ ConnectionStrings:cemiConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Student" runat="server" />


When I am changing pages using 1,2,3, it is working fine. But, when I click on pager images like next,previous,first, last is generating the following error:

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

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.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

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.




If the move the raggrid and sqldatasource to a new web page(default.aspx), everything is working fine.
Can I know the issue why it is generating error when I am adding it to user control???

Thanks,
Mahesh
Rafael
Top achievements
Rank 1
 answered on 12 Dec 2012
1 answer
72 views
I can not get the xmlserializer to work in the gridSettingsPersister.vb class. Once I move everything to use xmlserializer it blows up saying that the there is an error creating the xml document. The innerexception says.{"The type System.Collections.ArrayList may not be used in this context."}. Can anyone assist me on this one.  below is my code for the persister.

There error occurs here:"There was an error generating the XML document."

  Public Overloads Overrides Function ToString() As String
        Dim formatter As New XmlSerializer(Me.GetType())
        Dim writer As New StringWriter()
        formatter.Serialize(writer, Me) - ******** This is the error line 
        Return writer.ToString()
    End Function

Imports System
Imports System.Collections.Generic
Imports System.Web
Imports Telerik.Web.UI
Imports System.Web.UI.WebControls
Imports System.Collections
Imports System.Web.UI
Imports System.IO
Imports System.Xml.Serialization
 
 
''' <summary>
''' Imports and exports settings from a RadGrid instance.
''' </summary>
Public Class GridSettingsPersister
 
    ''' <summary>
    ''' Initializes an instance of GridSettingsPersister from a RadGrid instance
    ''' </summary>
    ''' <param name="grid">The RadGrid instance to import and exports settings</param>
    Public Sub New(ByVal grid As RadGrid)
 
        Me.New(grid, GridSettingsType.All)
    End Sub
 
    ''' <summary>
    ''' Initializes an instance of GridSettingsPersister from a RadGrid instance
    ''' and a collection GridSettingsType values
    ''' </summary>
    ''' <param name="grid">The RadGrid instance to import and exports settings</param>
    ''' <param name="persistedSettingFlags">
    ''' A collection of GridSettingType values specifying the type of grid settings
    ''' to import or export
    ''' </param>
    Public Sub New(ByVal grid As RadGrid, ByVal persistedSettingFlags As GridSettingsType)
        _grid = grid
        _persistedSettingTypes = persistedSettingFlags
        _settings = New GridSettingsCollection()
        _settings.ColumnSettings = New List(Of ColumnSettings)()
        _settings.AutoGeneratedColumnSettings = New List(Of ColumnSettings)()
    End Sub
 
    Private _grid As RadGrid
    Private _persistedSettingTypes As GridSettingsType
    Private _settings As GridSettingsCollection
 
    ''' <summary>
    ''' The underlyiong RadGrid instance to import or export settings from
    ''' </summary>
    Public ReadOnly Property Grid() As RadGrid
        Get
            Return _grid
        End Get
    End Property
 
    ''' <summary>
    ''' Gets or sets the GridSettingType flags that specify the grid settings to
    ''' export or import
    ''' </summary>
    Public Overridable Property PersistedSettingTypes() As GridSettingsType
        Get
            Return _persistedSettingTypes
        End Get
        Set(ByVal value As GridSettingsType)
            _persistedSettingTypes = value
        End Set
    End Property
 
    Protected Overridable Property Settings() As GridSettingsCollection
        Get
            Return _settings
        End Get
        Set(ByVal value As GridSettingsCollection)
            _settings = value
        End Set
    End Property
 
    ''' <summary>
    ''' Saves the current grid settings and returns the settings serilized to string
    ''' </summary>
    Public Overridable Function SaveSettings() As String
        Return GetSavedSettings().ToString()
 
        'save item to DB then return the data
 
    End Function
 
    ''' <summary>
    ''' Saves the current grid settings and retrieves the underlying
    ''' GridSettingsCollection instance that contains the grid settings
    ''' </summary>
    Public Overridable Function GetSavedSettings() As GridSettingsCollection
        If Grid Is Nothing Then
            Throw New NullReferenceException()
        End If
 
        If IsSettingSpecified(GridSettingsType.Paging) Then
            SavePagingSettings()
        End If
        If IsSettingSpecified(GridSettingsType.Grouping) Then
            SaveGroupByExpressions()
        End If
        If IsSettingSpecified(GridSettingsType.Sorting) Then
            SaveSortExpressions()
        End If
        If IsSettingSpecified(GridSettingsType.Filtering) Then
            SaveFilterExpression()
        End If
        If IsSettingSpecified(GridSettingsType.ColumnSettings) Then
            SaveColumnSettings()
        End If
 
        Return Settings
    End Function
 
    Protected Function IsSettingSpecified(ByVal settingType As GridSettingsType) As Boolean
        Return (PersistedSettingTypes And GridSettingsType.All) = GridSettingsType.All OrElse (PersistedSettingTypes And settingType) = settingType
    End Function
 
    Protected Overridable Sub SavePagingSettings()
        Settings.PageSize = Grid.MasterTableView.PageSize
    End Sub
 
    Protected Overridable Sub SaveGroupByExpressions()
        Settings.GroupByExpressionsStates = New Object(Grid.MasterTableView.GroupByExpressions.Count - 1) {}
        Dim i As Integer = 0
        While i < Settings.GroupByExpressionsStates.Length
            Settings.GroupByExpressionsStates(i) = (DirectCast(Grid.MasterTableView.GroupByExpressions(i), IStateManager)).SaveViewState()
            System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
        End While
    End Sub
 
    Protected Overridable Sub SaveSortExpressions()
        Settings.SortExpressionsState = (DirectCast(Grid.MasterTableView.SortExpressions, IStateManager)).SaveViewState()
    End Sub
 
    Protected Overridable Sub SaveFilterExpression()
        Settings.FilterExpression = Grid.MasterTableView.FilterExpression
    End Sub
 
    Protected Overridable Sub SaveColumnSettings()
        Settings.ColumnSettings.Clear()
        For Each column As GridColumn In Grid.MasterTableView.Columns
            Settings.ColumnSettings.Add(GetColumnSettings(column))
        Next
 
        Settings.AutoGeneratedColumnSettings.Clear()
        For Each column As GridColumn In Grid.MasterTableView.AutoGeneratedColumns
            Settings.AutoGeneratedColumnSettings.Add(GetColumnSettings(column))
        Next
    End Sub
 
    Private Function GetColumnSettings(ByVal column As GridColumn) As ColumnSettings
        Dim colSettings As New ColumnSettings()
        colSettings.UniqueName = column.UniqueName
        colSettings.Width = column.HeaderStyle.Width
        colSettings.Visible = column.Visible
        colSettings.Display = column.Display
        colSettings.OrderIndex = column.OrderIndex
        colSettings.CurrentFilterFunction = column.CurrentFilterFunction
        colSettings.CurrentFilterValue = column.CurrentFilterValue
 
        Return colSettings
    End Function
 
    Private Sub SetColumnSettings(ByRef column As GridColumn, ByVal setting As ColumnSettings)
        column.Display = setting.Display
        column.Visible = setting.Visible
        column.HeaderStyle.Width = setting.Width
        column.OrderIndex = setting.OrderIndex
        column.CurrentFilterFunction = setting.CurrentFilterFunction
        column.CurrentFilterValue = setting.CurrentFilterValue
    End Sub
 
    ''' <summary>
    ''' Loads grids settings from a serialized string
    ''' </summary>
    ''' <param name="value">The string that contains the serialized settings</param>
    Public Overridable Sub LoadSettings(ByVal value As String)
 
        'retrieve from database the serialized string of data and call load settings
 
        LoadSettings(GridSettingsCollection.LoadFromSerializedData(value))
    End Sub
 
    ''' <summary>
    ''' Loads grids settings from a byte array
    ''' </summary>
    ''' <param name="data">The byte array that contains the serialized grid settings</param>
    Public Overridable Sub LoadSettings(ByVal data As Byte())
        LoadSettings(GridSettingsCollection.LoadFromSerializedData(data))
    End Sub
 
    ''' <summary>
    ''' Loads grid settings from a GridSettingsCollection instance
    ''' </summary>
    ''' <param name="savedSettings">The GridSettingsCollection instance to load settings from</param>
    Public Overridable Sub LoadSettings(ByVal savedSettings As GridSettingsCollection)
        If Grid Is Nothing OrElse savedSettings Is Nothing Then
            Throw New NullReferenceException()
        End If
 
        Settings = savedSettings
 
        If IsSettingSpecified(GridSettingsType.Paging) Then
            LoadPagingSettings()
        End If
        If IsSettingSpecified(GridSettingsType.Grouping) Then
            LoadGroupByExpressions()
        End If
        If IsSettingSpecified(GridSettingsType.Sorting) Then
            LoadSortExpressions()
        End If
        If IsSettingSpecified(GridSettingsType.Filtering) Then
            LoadFilterExpression()
        End If
        If IsSettingSpecified(GridSettingsType.ColumnSettings) Then
            LoadColumnSettings()
        End If
    End Sub
 
    Protected Overridable Sub LoadPagingSettings()
        If Grid.MasterTableView.AllowPaging AndAlso Settings.PageSize > 0 Then
            Grid.MasterTableView.PageSize = Settings.PageSize
        End If
    End Sub
 
    Protected Overridable Sub LoadGroupByExpressions()
        If Settings.GroupByExpressionsStates Is Nothing Then
            Return
        End If
 
        Grid.MasterTableView.GroupByExpressions.Clear()
        For Each expressionState As Object In Settings.GroupByExpressionsStates
            Dim expression As New GridGroupByExpression()
            DirectCast(expression, IStateManager).LoadViewState(expressionState)
            Grid.MasterTableView.GroupByExpressions.Add(expression)
        Next
    End Sub
 
    Protected Overridable Sub LoadSortExpressions()
        If Settings.SortExpressionsState Is Nothing Then
            Return
        End If
 
        DirectCast(Grid.MasterTableView.SortExpressions, IStateManager).LoadViewState(Settings.SortExpressionsState)
    End Sub
 
    Protected Overridable Sub LoadFilterExpression()
        Grid.MasterTableView.FilterExpression = Settings.FilterExpression
    End Sub
 
    Protected Overridable Sub LoadColumnSettings()
        If Settings.AutoGeneratedColumnSettings.Count > 0 Then
            AddHandler Grid.ColumnCreated, New GridColumnCreatedEventHandler(AddressOf Grid_ColumnCreated)
        End If
 
        For Each colSetting As ColumnSettings In Settings.ColumnSettings
            Dim column As GridColumn = Grid.MasterTableView.GetColumnSafe(colSetting.UniqueName)
 
            If column IsNot Nothing Then
                SetColumnSettings(column, colSetting)
            End If
        Next
    End Sub
    Private Sub Grid_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs)
 
        Dim colSettings As ColumnSettings = Nothing
        For Each colSettings In Settings.AutoGeneratedColumnSettings
            If colSettings.UniqueName = e.Column.UniqueName Then
                colSettings = colSettings
                Exit For
            End If
        Next colSettings
        Dim column As GridColumn = e.Column
        If colSettings IsNot Nothing Then
            SetColumnSettings(column, colSettings)
        End If
 
    End Sub
 
 
End Class
 
''' <summary>
''' Enumerates the types of grid settings that can be persisted
''' </summary>
<Flags()> _
Public Enum GridSettingsType
    Paging = 1
    Sorting = 2
    Filtering = 4
    Grouping = 8
    ColumnSettings = 16
    All = 32
End Enum
 
''' <summary>
''' Represents a collection of grid settings
''' </summary>
<Serializable()> _
Public Class GridSettingsCollection
    Private _pageSize As Integer
    Private _groupByExpressionsStates As Object
    Private _sortExpressionsState As Object
    Private _filterExpression As String
    Private _columnSettings As List(Of ColumnSettings)
    Private _autoColumnSettings As List(Of ColumnSettings)
 
    Public Property PageSize() As Integer
        Get
            Return _pageSize
        End Get
        Set(ByVal value As Integer)
            _pageSize = value
        End Set
    End Property
    Public Property GroupByExpressionsStates() As Object()
        Get
            Return _groupByExpressionsStates
        End Get
        Set(ByVal value As Object())
            _groupByExpressionsStates = value
        End Set
    End Property
    Public Property SortExpressionsState() As Object
        Get
            Return _sortExpressionsState
        End Get
        Set(ByVal value As Object)
            _sortExpressionsState = value
        End Set
    End Property
    Public Property FilterExpression() As String
        Get
            Return _filterExpression
        End Get
        Set(ByVal value As String)
            _filterExpression = value
        End Set
    End Property
    Public Property ColumnSettings() As List(Of ColumnSettings)
        Get
            Return _columnSettings
        End Get
        Set(ByVal value As List(Of ColumnSettings))
            _columnSettings = value
        End Set
    End Property
    Public Property AutoGeneratedColumnSettings() As List(Of ColumnSettings)
        Get
            Return _autoColumnSettings
        End Get
        Set(ByVal value As List(Of ColumnSettings))
            _autoColumnSettings = value
        End Set
    End Property
 
    ''' <summary>
    ''' Returns the serialized object as string
    ''' </summary>
    Public Overloads Overrides Function ToString() As String
        Dim formatter As New XmlSerializer(Me.GetType())
        Dim writer As New StringWriter()
        formatter.Serialize(writer, Me)
        Return writer.ToString()
 
    End Function
 
    ''' <summary>
    ''' Returns the serialized object as byte array
    ''' </summary>
    Public Function ToArray() As Byte()
        Dim formatter As New XmlSerializer(Me.GetType())
        Using stream As New MemoryStream()
            formatter.Serialize(stream, Me)
            Return stream.ToArray()
        End Using
    End Function
 
    ''' <summary>
    ''' Gets the GridSettingsCollectionInstance from its serialized string data
    ''' </summary>
    ''' <param name="data">The object as serialized string data</param>
    Public Shared Function LoadFromSerializedData(ByVal data As String) As GridSettingsCollection
        Dim formatter As New LosFormatter()
        Return DirectCast(formatter.Deserialize(data), GridSettingsCollection)
    End Function
 
    ''' <summary>
    ''' Gets the GridSettingsCollectionInstance from its serialized byte array
    ''' </summary>
    ''' <param name="data">The object as serialized byte array</param>
    Public Shared Function LoadFromSerializedData(ByVal data As Byte()) As GridSettingsCollection
        Dim formatter As New XmlSerializer(GetType(GridSettingsCollection))
        Using stream As New MemoryStream(data)
            Return DirectCast(formatter.Deserialize(stream), GridSettingsCollection)
        End Using
    End Function
End Class
 
''' <summary>
''' Represents a collection of grid column settings
''' </summary>
<Serializable()> _
Public Class ColumnSettings
    Private _uniqueName As String
    Private _orderIndex As Integer
    Private _width As Unit
    Private _visible As Boolean
    Private _display As Boolean
    Private _currentFilterFunction As GridKnownFunction
    Private _currentFilterValue As String
 
    Public Property UniqueName() As String
        Get
            Return _uniqueName
        End Get
        Set(ByVal value As String)
            _uniqueName = value
        End Set
    End Property
    Public Property OrderIndex() As Integer
        Get
            Return _orderIndex
        End Get
        Set(ByVal value As Integer)
            _orderIndex = value
        End Set
    End Property
    Public Property Width() As Unit
        Get
            Return _width
        End Get
        Set(ByVal value As Unit)
            _width = value
        End Set
    End Property
    Public Property Visible() As Boolean
        Get
            Return _visible
        End Get
        Set(ByVal value As Boolean)
            _visible = value
        End Set
    End Property
    Public Property Display() As Boolean
        Get
            Return _display
        End Get
        Set(ByVal value As Boolean)
            _display = value
        End Set
    End Property
    Public Property CurrentFilterFunction() As GridKnownFunction
        Get
            Return _currentFilterFunction
        End Get
        Set(ByVal value As GridKnownFunction)
            _currentFilterFunction = value
        End Set
    End Property
    Public Property CurrentFilterValue() As String
        Get
            Return _currentFilterValue
        End Get
        Set(ByVal value As String)
            _currentFilterValue = value
        End Set
    End Property
 
End Class


Any help will be appreciated.
Thank You,
Brian
Antonio Stoilkov
Telerik team
 answered on 12 Dec 2012
1 answer
29 views
I am working with the Demo example at 
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

I have it working on my system with my data, but if you notice the Demo and my version seem to open the UserControl form of the 2nd record in the dataset.  I can't seem to find where in the code that is being specified and how to turn it off. I would like to use it to also be able to specify in a URL string to open a specified record, but if the string is empty not to auto load the 2nd record, as it is doing now.

THANKS!


Kostadin
Telerik team
 answered on 12 Dec 2012
1 answer
53 views
I've encountered unexpected error when I copied text file from a non-html source: System.Xml.XmlException: The 'span' start tag on line 290 position 43 does not match the end tag of 'p'. We're using radeditor on a .NET application and the source is from a test manager which is non html, I think it is in java.  I've already set ContentAreaMode="div" and ContentFIlters="RemoveScript, ConvertToXhtml, FixEnclosingP".
 Any idea what causes the issue. Thanks.
Rumen
Telerik team
 answered on 12 Dec 2012
1 answer
44 views
We have a RadToolTip containing a RadScheduler and two RadGrids. We want to keep these objects in sync, so we've employed a RadAjaxManager. Unfortunately, the events that we want to sync after are fired from controls within the NestedViews of the RadGrids. When EnableAjax is set to false, the following error is thrown:

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex

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:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex]
   Telerik.Web.UI.GridItemCollection.get_Item(String hierarchicalIndex) +153
   Telerik.Web.UI.GridDataItemCollection.get_Item(String hierarchicalIndex) +50
   Telerik.Web.UI.RadGrid.LoadClientState(Dictionary`2 clientState) +7307
   Telerik.Web.UI.RadCompositeDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +305
   Telerik.Web.UI.RadCompositeDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +73
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +1068
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2773

What can we do? Thanks.
Pavlina
Telerik team
 answered on 12 Dec 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
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
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?