bou63
Posts: 9
|
Posted: 08/17/2004, 11:57 AM |
|
How can I bind the DataProvider to other controls like the vs.net datagrid. I have tried assigning the datasource of the datagrid to the DataProvider. But keep getting errors that it can't find the fields.
Thanks,
Bo
_________________
Bo |
|
|
Stan
|
Posted: 08/18/2004, 11:44 PM |
|
Hi
You should not use AutoGenerateColumns option for DataGrid with CCS datasource (set it to false). And also use TemplatedColumn instead DataBoundColumn. Something like following
<asp:TemplateColumn>
<HeaderTemplate>
<b> Name </b>
</HeaderTemplate>
<ItemTemplate>
<asp:Label
Text='<%# ((agesItem)Container.DataItem).age_name.GetFormattedValue() %>'
runat="server"/>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox
runat="server"/>
</EditItemTemplate>
</asp:TemplateColumn>
Stan
|
|
|
Bo
|
Posted: 08/21/2004, 10:45 PM |
|
Thanks Stan!
"Stan" <Stan@forum.codecharge> wrote in message
news:841244c65592a9@news.codecharge.com...
> Hi
>
> You should not use AutoGenerateColumns option for DataGrid with CCS
datasource
> (set it to false). And also use TemplatedColumn instead DataBoundColumn.
> Something like following
>
> <asp:TemplateColumn>
> <HeaderTemplate>
> <b> Name </b>
> </HeaderTemplate>
> <ItemTemplate>
> <asp:Label
> Text='<%#
> ((agesItem)Container.DataItem).age_name.GetFormattedValue() %>'
> runat="server"/>
> </ItemTemplate>
>
> <EditItemTemplate>
> <asp:TextBox
> runat="server"/>
> </EditItemTemplate>
> </asp:TemplateColumn>
>
> Stan
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|