DataBinder.Eval Problem ?

O

Oney

I have two DataGrid on the same page and I fill them diffrent tables.I
created Template Columns for both DataGrid but I can not use Dynamic
Binding. It can not find columns.By the way I have to use aspx page
instead of web user control.

<%# DataBinder.Eval(Container.DataItem,"Id") %>

any idea how to use Container.DataItem?
 
D

DalePres

What errors are you getting? Your basic format looks correct. Are you
certain that you have assigned the datasource using

myDataGrid.DataSource = myTable;

And then you have to bind it:

myDataGrid.DataBind();

And both these things must happen before rendering, such as in the PreRender
event or Page_Load.

If this doens't help, try posting more of your code or the errors or
indications of failure that you are receiving.

Dale
 

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,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top