FYI:
When I binded the data back to the grid on load, the event fired. Doesn't
make sense though, because when you add static columns
to the grid in Html, you don't have to do that. What this means is that if
you create the columns dynamically in code, you have to rebind the grid in
order to get the sort event, then figure out how to sort your data, and then
rebind once again. Two binds in one postback.
Either I'm missing something, or this is bad design on MS's part.
"Mark" <> wrote in message
news:...
> All-
>
> I'm basically creating a user control which contains a datagrid that will
be
> used throughout our application by all pages.
> My user control contains a datagrid control and I expose methods to add a
> bound column to the grid.
> So when they call this function and pass in the field name and title, I
> dynamically add this new bound column to the
> grid. It works when loaded for the first time and the paging works fine
> also.
> The only problem is that the Sort event doesn't fire. The bound columns
are
> being recreated when the page reloads,
> so the grid object has them. I don't get it.
>
>
> Any help would be great. Thanks
>
>
|