-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: DIGITAL PIRATE
Message 2 in Discussion
Hi, Few ideas, 1. For each row that is created and bounded to data in datagrid,
OnItemDataBound event is trigerred. You could possibly manipulate here (find the
control and make its visible to false)... try it for yourself !!! NOT TESTED...and
also make sure u wire up OnItemDataBound event. 2. Use the same OnItemDataBound
event to check if the value is null ... and then if its null .. dont post back ..
instead use a javascript to inform user that he can edit it. ... code, protected
void OnRowRender(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e){
if(e.Item.ItemType != ListItemType.Header && e.Item.ItemType != ListItemType.Footer){
LinkButton btnDelete = (LinkButton)(e.Item.Cells[5].Controls[0]);
btnDelete.Attributes["onclick"] = "javascript:return confirm('Are you sure you
want to delete?')"; The code, uses . confirm() method ..so, u need to replace
with alert ... and return false ..to stop post back HTH, Shamir
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]