Datagrid Footer!

A

Adam Knight

Hi all,

I am using a datagrid footer as a container for some data entry
controls.
Above the datagrid is another data entry point which needs to be filled
out before prior to entering data in
these controls.

Q?
How can i reference the controls in the datagrid footer so as to disable
them.
When i do a trace i can see the controls, just not sure how to access
them using the datagrid api.

Will I have to use the datagrids onItemDataBound event?

I would prefer not to in this instance.

Cheers,
Adam
 
S

S.M. Altaf [MVP]

Adam,

You'll have to use the ItemDataBound event here. The reason is, as the
controls in the datagrid are rendered, each one can be accessed in the
ItemDataBound event. You will need to handle the event, so that you can
dynamically create the javascript code that will render the controls in the
footer enabled, as you disable them in the loop itself. The function you
create can be called from the "data entry points above the datagrid," with
whatever logic you have. The call would simply enable them. You can use the
Page.RegisterClientScriptBlock method to register the function on the page.

I am already assuming that you know how to use the ItemDataBound event in
this case. In case you don't ask, and we can post a small example for you.

-S.M. Altaf
[MVP - VB]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,114
Latest member
GlucoPremiumReview
Top