You need to use OnItemDataBound() and use DataGridID.findcontrol() on
that event.
It does not exist until the data is filled in to control.
Others will be able to elaborate. I wanted to point you in right direction.
On Sat, 22 Jan 2005 14:46:56 +0000 (GMT), santosh poojari
<[EMAIL PROTECTED]> wrote:
> Hi All,
> I have disabled the button in Datagrid and i want to make it enabled during
> run time such as
> public void Datagrid1_OnSelectedChanged( object sender ,System. )
> {
>
> ((Button)DataGrid1.FindControl("btnNext")).enabled=true;
> }
> I have tried this doing but it throws a runtime error
> "Object Reference does not contain instance of Button.
>
> please comment,
> San
>
> Yahoo! India Matrimony: Find your life partneronline.
>
> [Non-text portions of this message have been removed]
>
>
> ________________________________
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/