Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

Get error Type 'DataGridTableStyle' is not defined

I need to know what Namespace to import in order to use this control.
0
robjay
Asked:
robjay
  • 2
  • 2
1 Solution
 
robjayAuthor Commented:
0
 
Vivek ThangaswamyCommented:
HI

The following is the right way to include the namespaces in ASPX pages.

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Page Debug=True %>

----
Your
<%@ Import Namespace="System.Windows.Forms" %>
declaration contains correct structure, but namespace you used is Winforms Namespace, it cannot be used in ASP.NET
0
 
robjayAuthor Commented:
I have all of that, is there not anyway that I can use the DataGridTableStyle control then for an aspx page?
I need to set column widths dynamically.
0
 
Vivek ThangaswamyCommented:
Hi

Check out the below link, it is a example for Custom grid devlopment in ASP.NET, like you can create a custom Grid for your needs(like DataGridTableStyle property) etc,...
http://www.codeproject.com/aspnet/SPDataGrid.asp

Its good way to do that.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now