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
420
WebDataGrid Style not applied at all - simple project
posted

I added a webdatagrid to a .NET 3.5 Web Application.  Set the StyleSetName=RedPlanet, then added code in the codebehind page_load to create a datatable, add three columns and three rows.  Then set datasource = datatable, and call Databind().

When I ran it the first time, I did not remember to put the scriptmanager on the screen.  Got an error, then added the Infragistics WebScriptManager.  The form shows an all white background and the data and column headers but absolutely no formating/styling.  What am I doing wrong.  This is as basic as it gets and it does not seem to be working out of the box.

This is with a downloaded version of 11v1. 

This is the page:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="TestIPS.WebForm1" %>
 
<%@ Register Assembly="Infragistics35.Web.v11.1, Version=11.1.20111.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI" TagPrefix="ig" %>
 
<%@ Register Assembly="Infragistics35.Web.v11.1, Version=11.1.20111.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
 
<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <ig:WebScriptManager ID="WebScriptManager1" runat="server">
    </ig:WebScriptManager>
    <div>
        <ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px" 
            StyleSetName="RedPlanet">
        </ig:WebDataGrid>
    </div>
    </form>
</body>
</html>
This is the code behind:
Public Class WebForm1
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgsHandles Me.Load
        Dim table As DataTable = New DataTable()
 
        Dim col As DataColumn = New DataColumn("Col1"GetType(Integer))
 
        table.Columns.Add(col)
 
        col = New DataColumn("Col2"GetType(String))
        table.Columns.Add(col)
 
        col = New DataColumn("Col3"GetType(String))
        table.Columns.Add(col)
 
        table.Rows.Add(1, "1""Stuff")
        table.Rows.Add(2, "2""More Stuff")
        table.Rows.Add(3, "3""Even More Stuff")
 
        WebDataGrid1.DataSource = table
        WebDataGrid1.DataBind()
    End Sub
 
End Class