I've tried a few things, and there doesn't seem to be a way to do this. If
you want to make a column readonly, you have to define each column to be
bound using the <asp:boundcolumn> tag, and set the readonly attribute to
true for the column you want to be readonly.
Regards,
Mun
"Binny" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Thanks. But i see the duplicate columns. since they are
autogenerated also. Is there a way i can avoid this.?
thanks
-----Original Message-----
You can still use this tag. It will override the
autogenerated column. Therest of the columns will still be automatically generated.
Eg.
<asp:datagrid id="DataGrid1" runat="server" width="100%"
cellpadding="2"autogeneratecolumns="True">
<columns>
<asp:boundcolumn datafield="ID" headertext="ID"
readonly="True"/></columns>
</asp:datagrid>
Regards,
Mun