473,322 Members | 1,494 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,322 software developers and data experts.

DataGrid_ItemDataBound

hey all,

i was just wondering about ItemDataBound (and the other similar events
ItemCommand for that matter), I notice that in my brief experience that these
procedures can get pretty lengthy.

What are some of you out there to keep things organized since so many
different scenarios can happen. Is it possible to have additional handlers?
if so how would that look or work?

thanks,
rodchar
Nov 19 '05 #1
1 1039
Well, first of all I haven't seemed to notice them getting that long, but
maybe that's just because what I want my code to do isn't as complex as what
you want yours to do. Anyway, what I would suggest as a way of keeping
things organized would be to break it down into several procedures that are
called from ItemDataBound. For example, you might want to create a procedure
for each field used in the databinding. I might be able to make a few more
suggestions if you told me what is making ItemDataBound so long or showed me
the code (it's possible that there is a quicker method of achieving what you
want). Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
hey all,

i was just wondering about ItemDataBound (and the other similar events
ItemCommand for that matter), I notice that in my brief experience that
these
procedures can get pretty lengthy.

What are some of you out there to keep things organized since so many
different scenarios can happen. Is it possible to have additional
handlers?
if so how would that look or work?

thanks,
rodchar

Nov 19 '05 #2

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

Similar topics

1
by: Newbie | last post by:
Hello! I am working with 2 webforms. The first webform has a 2 weborm textboxes that I use as a placeholders. The second webform is a popup window that has a DataGrid in it. The DataGrid has 2 ...
4
by: CGuy | last post by:
Hi, I have a datagrid that has one ButtonColumn which is bound to a database field. My requirement is that when the page containing the datagrid is loaded, I would like the ButtonColumn to be...
2
by: Stephen | last post by:
Hi, I have a datagrid which displays a list of names and a button next to each name. In the Datagrid_ItemDataBound event I attach an attribute to each button which sets the onclick event of...
2
by: rodchar | last post by:
Hey all, how do i get to the fields of the datarow of the datasource thats about to be bound to the datagrid row? e.item.cells(2).text = ??? datarow.field.value hope this makes sense,...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
1
by: geronimi | last post by:
I want to create a linkbutton in a cell because not every row needs one (so I can't setup a linkbuttoncolumn instead of a boundcolumn.) First, i create a linkbutton in the datagrid_ItemDataBound...
15
by: Laser Lu | last post by:
Hi, all, I was tangled by the DataGridItem.DataItem property. I tried to invoke that property to get and display the contents that was bound to the currently selected row. However, an exception...
2
by: IndiraPriyaDarshini | last post by:
Hello, am devoloping a project.. i wanna to uswe the ItemDataBound property to my project.. but i can not find that property..i tried a lot.. am new to this field.. pls help me....
0
by: 1333 | last post by:
I have this code where if the value is 1 then format the out put to yes else no. When I run my page the datagrid just displays the numerical values 1 and 2. When I run in debug mode my breakpoint at...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.