Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
Javascript error in igtbl_rowsAddNew
posted

I'm trying to use an UltraWebGrid with an AddNewRow at the bottom.  I've done this before using LoadObDemand="XML" without a problem.  In this case I need to be able to reload different sets of data into the grid and want to not use LoadOnDemand but instead make calls to DataBind to load the data.  After entering data on the new line and clicking off that line I get an "Object expected" error in Infragistics calling the igtbl_rowsAddNew function.  I've recreated the problem in a small test app which I've posted below.  Any suggestions would be appreciated.

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
      <igtbl:UltraWebGrid ID="grdTest" runat="server" Browser="Xml" Height="130px">
        <Bands>
          <igtbl:UltraGridBand DataKeyField="RecordID" CellClickAction="Edit">
            <AddNewRow View="Bottom" Visible="Yes">
            </AddNewRow>
            <Columns>
              <igtbl:UltraGridColumn Key="RecordID" BaseColumnName="RecordID" Hidden="true">
              </igtbl:UltraGridColumn>
              <igtbl:UltraGridColumn Key="Team" BaseColumnName="TeamID" Width="150" AllowUpdate="Yes">
                <Header Caption="Team">
                </Header>
              </igtbl:UltraGridColumn>
              <igtbl:UltraGridColumn Key="Hours" BaseColumnName="Hours" Width="100" AllowUpdate="Yes">
                <Header Caption="Hours">
                </Header>
              </igtbl:UltraGridColumn>
            </Columns>
          </igtbl:UltraGridBand>
        </Bands>
        <DisplayLayout Name="grdTest" RowHeightDefault="20px" TableLayout="Fixed" ViewType="Flat">
          <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
            Font-Names="Arial,Verdana" Font-Size="9pt">
            <BorderDetails ColorLeft="Window" ColorTop="Window" />
            <Padding Left="3px" />
          </RowStyleDefault>
          <HeaderStyleDefault ForeColor="#333333" BackColor="#D0EBD0" BorderStyle="Solid" Font-Size="9pt"
            HorizontalAlign="Center" VerticalAlign="Middle" Height="30px">
            <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
          </HeaderStyleDefault>
          <FrameStyle BackColor="#f2f2f2" BorderStyle="None" Font-Names="Arial,Verdana" Font-Size="9pt"
            Width="550" Height="130">
          </FrameStyle>
        </DisplayLayout>
      </igtbl:UltraWebGrid>
     </form>
</body>
</html>

Partial Public Class IGGridTest
  Inherits System.Web.UI.Page

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim RecordsList As New List(Of RecordType)
    grdTest.DataSource = RecordsList
    grdTest.DataBind()
  End Sub

  Protected Sub grdAllocated_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.LayoutEventArgs) Handles grdTest.InitializeLayout
    grdTest.DisplayLayout.AutoGenerateColumns = False
  End Sub

End Class


<Serializable()> _
Public Class RecordType
  Private m_recordID As Integer
  Private m_TeamID As Integer
  Private m_Hours As Double

  Public Property RecordID() As Integer
    Get
      Return m_recordID
    End Get
    Set(ByVal Value As Integer)
      If Not m_recordID.Equals(Value) Then
        m_recordID = Value
      End If
    End Set
  End Property

  Public Property TeamID() As Integer
    Get
      Return m_TeamID
    End Get
    Set(ByVal Value As Integer)
      If Not m_TeamID.Equals(Value) Then
        m_TeamID = Value
      End If
    End Set
  End Property

  Public Property Hours() As Double
    Get
      Return m_Hours
    End Get
    Set(ByVal Value As Double)
      If Not m_Hours.Equals(Value) Then
        m_Hours = Value
      End If
    End Set
  End Property

End Class

Parents
No Data
Reply Children
No Data