473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Limit a gridview to one column only...

Hello,

The aexview is showing four or five columns and most of the time only one or
two is (are) useful in our environment Also the view is too big for our usual
screens so I would like :
- to hide some column from this view if possible
- to create a listview of the same field but limited to the field needed

What is the best way to approach this? Is this possible without changing too
many screens?
I have tried :
<tr>
<td align="left" class="listview-item"><%#
DataBinder.Eval(Container.vReport, "Name") >
</td>
</tr>

but for now I am getting an error:
The following error occurred on the page 'Copy of ItemListView.aspx':
Object reference not set to an instance of an object.

Exception Trace:
System.NullReferenceException: Object reference not set to an instance of an
object. at Altiris.NS.UI.ItemListView.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain()What did I miss? A Namespace?

Where should the class="listview-item should be defined? I think I have an
error already on this?

I have added:

<%@ Assembly Name="System.Windows.Forms.Control" %>

to try to use the ListView control as:

<td>
<asp:ListView id="listView" runat="server"></asp:ListView>
</td>

but it is giving me an error before adding the Namespace:
Parser Error: Could not load type
Altiris.NS.UI.Controls.ViewControls.ListViewCtrl from assembly Altiris.NS.UI,
Version=6.0.6074.4, Culture=neutral, PublicKeyToken=d516cb311cfb6e4f.

or

after adding the Namespace:
Parser Error: File or assembly name System.Windows.Forms.Control, or one of
its dependencies, was not found.
<%@ Import Name="System.Windows" %>
<%@ Import Name="System.Windows.Forms" %>
<%@ Import Name="System.Windows.Forms.Control" %>
.....

When trying to add the Namespace as import I am getting the following error:
Parser Error: The 'Name' attribute is not supported by the 'Import'
directive.

What could be the correct syntax?

thanks,
--
Dominique
Aug 15 '06 #1
0 1377

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
4
by: Hans Merkl | last post by:
Hi, Is there a way to show the column headers of a GridView control even if there is no data? The only thing I see is the EmptyDataTemplate but I would also like to display the column headers. ...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
1
by: Eric | last post by:
I have a GridView control that I want to sort on multiple columns when I click a particular column. For example, I display Last name + ", " + First name in the first column and display id in the...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
3
by: Gunawan | last post by:
Dear All, I have data which display on the GridView. GridView contain 3 Column (ProductId, ProductCode and Description). I would like to display only Product Code and Description so I hide...
1
by: =?Utf-8?B?UGF0cmljayBG?= | last post by:
I have a gridview on the page that i want to dynamically populate with radiobuttons, so i went out on the net and found something that works perfectly, it created radionuttons and the postback with...
1
by: Jeff | last post by:
ASP.NET 2.0 I've got problems with the right column in my GridView. The GridView consist of 2 columns, the problem column is the column on the right side. The problem is that it looks like...
5
by: NKaufman | last post by:
<asp:GridView ID="Basic" runat="server" DataKeyNames="QuestionID,isHeading" AutoGenerateColumns="false" AllowPaging="true" PageSize="100"> <Columns> <asp:BoundField Visible="false"...
4
by: Randy Smith | last post by:
Hi, I would like to limit my user selection to only one row in the GridView at a time. Is there any way to set this? TIA, Randy
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.