Home All Groups Group Topic Archive Search About
Author
21 Apr 2005 7:29 AM
Simon Abolnar
I have datagrid with buttons in one column.
In ItemDataBound I can disable cells by:

e.Item.Cells.Enabled=False

How can I do exact thing by disable only buttons, not entire cells.

Thanks for answer,

Simon

Author
21 Apr 2005 8:47 AM
Eliyahu Goldin
Simon,

This should do

e.Item.Cells.FindControl (buttonId).Enabled=False

Eliyahu

Show quoteHide quote
"Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message
news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl...
> I have datagrid with buttons in one column.
> In ItemDataBound I can disable cells by:
>
> e.Item.Cells.Enabled=False
>
> How can I do exact thing by disable only buttons, not entire cells.
>
> Thanks for answer,
>
> Simon
>
>
Author
21 Apr 2005 11:37 AM
Simon Abolnar
How can I find out buttonID?

Thanks for help!

Simon


Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl...
> Simon,
>
> This should do
>
> e.Item.Cells.FindControl (buttonId).Enabled=False
>
> Eliyahu
>
> "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message
> news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl...
>> I have datagrid with buttons in one column.
>> In ItemDataBound I can disable cells by:
>>
>> e.Item.Cells.Enabled=False
>>
>> How can I do exact thing by disable only buttons, not entire cells.
>>
>> Thanks for answer,
>>
>> Simon
>>
>>
>
>
Author
21 Apr 2005 12:58 PM
Brock Allen
It's the ID you've given the control in your ASPX page:

<asp:Button runat=server id=yourButtonID ... />

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> How can I find out buttonID?
>
> Thanks for help!
>
> Simon
>
> "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl...
>
>> Simon,
>>
>> This should do
>>
>> e.Item.Cells.FindControl (buttonId).Enabled=False
>>
>> Eliyahu
>>
>> "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message
>> news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl...
>>
>>> I have datagrid with buttons in one column.
>>> In ItemDataBound I can disable cells by:
>>> e.Item.Cells.Enabled=False
>>>
>>> How can I do exact thing by disable only buttons, not entire cells.
>>>
>>> Thanks for answer,
>>>
>>> Simon
>>>
Author
21 Apr 2005 2:02 PM
Eliyahu Goldin
If the column contains a button only, try (c#)

e.Item.Cells.Controls [0].Enabled=False

Eliyahu

Show quoteHide quote
"Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message
news:edM%237ZmRFHA.2252@TK2MSFTNGP15.phx.gbl...
> How can I find out buttonID?
>
> Thanks for help!
>
> Simon
>
>
> "Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
> news:%23$QfjWkRFHA.2736@TK2MSFTNGP09.phx.gbl...
> > Simon,
> >
> > This should do
> >
> > e.Item.Cells.FindControl (buttonId).Enabled=False
> >
> > Eliyahu
> >
> > "Simon Abolnar" <Simon.Abol***@tscng.net> wrote in message
> > news:e2%23tsPkRFHA.2736@TK2MSFTNGP09.phx.gbl...
> >> I have datagrid with buttons in one column.
> >> In ItemDataBound I can disable cells by:
> >>
> >> e.Item.Cells.Enabled=False
> >>
> >> How can I do exact thing by disable only buttons, not entire cells.
> >>
> >> Thanks for answer,
> >>
> >> Simon
> >>
> >>
> >
> >
>
>