473,395 Members | 2,689 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,395 software developers and data experts.

Conditionally adding/removing items to a DataGrid

Hi,

I'm working on an ASPX page which has a DataGrid. This DataGrid is bound
to a custom object. My requirement is that at rune time, I want the datagrid
to display the items that match a certain criteria.

For example, I have a custom collection named Users to which the DataGrid is
bound. The Users collection represents the entire list of users for my
system. But when displaying the datagrid, I want to display only those users
that have the "administrator" role. Is there any way in which I can do this
throuh the ItemDataBound event?

CGuy


Jul 21 '05 #1
0 1229

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

Similar topics

0
by: Andrés Giraldo | last post by:
Hi! I'm adding an asp button to a datagrid on the ItemDataBound event, when the user clicks on this button, I basically remove the button and create other 2 buttons... my problem is.. the 2 last...
0
by: Brian Greiwe | last post by:
I posted this in the datagrid forum but got no bites, so I thought I'd post it here as well for some help.... I've created a datagrid with 1 edititemtemplate column. When the user clicks...
0
by: CGuy | last post by:
Hi, I'm working on an ASPX page which has a DataGrid. This DataGrid is bound to a custom object. My requirement is that at rune time, I want the datagrid to display the items that match a...
2
by: Praveen Balanagendra via .NET 247 | last post by:
here is the source code private void AddRow() { TableCell tc = new TableCell(); tc.Controls.Add(new LiteralControl("NewRow")); DataGridItem di = new...
19
by: Sjaakie Helderhorst | last post by:
Hello, I need to add a Javascript event (onClick) to a servercontrol (asp:checkbox). Checkbox is named 'cbDoMail'. Assumed that 'cbDoMail.Attributes.Add("onClick", "doJavascriptThing()") would do...
2
by: Bob Hollness | last post by:
Hi group. I am a newbie to ASP.NET as you will see from some of the questions I may ask! I have a datagrid which I have populated from a database. It works great! I have added a column, via...
1
by: Srinivasa Rao | last post by:
I have binded the two datagrids from database from two different tables. In both datagrids, the first column contains checkbox. In between the datagrid, i have "Add -->" and "Remove -->" buttons in...
3
by: diesel | last post by:
Ok, once again I'm at my wits' end with a VB.Net problem. I have a button which opens a wizard that allows the user to enter a new record to a table. I have a datatable called dtItems that...
2
by: msrahul | last post by:
HI ALL Plz Help Me. I have a datagrid with a few colums. One column is conaining 1's or 0's. Its like a flag column. It either has 0 or 1. Now what i need is that if any row has 1 in this column...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.