how to set control properties at run time?

T

Tim Mackey

hi,
i have a DictionaryEntry[] of key/value property values, and i want to
apply them all to a control (datagrid) at run time. i tried using
attributes, but the docs say that these are for non-property items,
the following code outputs the formatting attributes as text directly
after the control is rendered on the page.

foreach(DictionaryEntry de in array)
this.DataGrid1.Attributes[de.Key.ToString()] = de.Value.ToString();

the reason i'm doing this at run time is because i'm creating a
datagrid on the fly with formatting options for it stored in a db.

any ideas?
many thanks
tim mackey.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top