|
 |
aspx thread: Insert data into a Listbox in a DataGrid
Message #1 by "telmo sa" <telmo_sa@h...> on Wed, 08 Nov 2000 12:46:22 WET
|
|
Hi!
I have a DataGrid that has the following template Column:
<asp:templatecolumn HeaderText="Atribuido a">
<template name="ItemTemplate">
<asp:Label id="AttrALabel" Runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "user") %>'></asp:Label>
</template>
<template name="EditItemTemplate">
<asp:ListBox id="ArrtALb" Runat="server"
SelectionMode="Multiple"></asp:ListBox>
</template>
</asp:templatecolumn>
How do i put data retrieved from a database in the ListBox when i hit the
edit command column (no present here)?
Thank you!
Telmo
Message #2 by "Fredrik Normen" <fredrik.normen@e...> on Wed, 08 Nov 2000 14:17:07 +0100
|
|
Hi,
Here is an example..
<asp:TemplateColumn HeaderText="CompanyName" SortField="CustomerId">
<template name="ItemTemplate">
<asp:Label Text='<%# Container.DataItem("CompanyName") %>'
runat="Server"/>
</template>
<template name="EditItemTemplate">
<asp:TextBox id="edit_@C..."
Text='<%# Container.DataItem("CompanyName") %>'
runat="Server"/>
</template>
</asp:TemplateColumn>
/Fredrik Normen
----- Original Message -----
From: "telmo sa" <telmo_sa@h...>
Date: Wednesday, November 8, 2000 1:46 pm
Subject: [aspx] Insert data into a Listbox in a DataGrid
> Hi!
> I have a DataGrid that has the following template Column:
> <asp:templatecolumn HeaderText="Atribuido a">
>
> <template name="ItemTemplate">
> <asp:Label id="AttrALabel" Runat="server" Text='<%#
> DataBinder.Eval(Container.DataItem, "user") %>'>
> </template>
>
> <template name="EditItemTemplate">
> <asp:ListBox id="ArrtALb" Runat="server"
> SelectionMode="Multiple">
> </template>
>
>
>
> How do i put data retrieved from a database in the ListBox when i
> hit the
> edit command column (no present here)?
>
> Thank you!
> Telmo
>
|
|
 |