M
Mats
Hi
I am working on a webapplication using Asp.net with C#. I
have Datagrid that have 3 colums two of them are text but
the last one is a CheckBoxList. I have manage to set data
to the CheckBoxList but I haven't found a way to select
those checkbox that I will.
I read data from a database and will make a table with two
text columns and one column filled with several
checkboxes. Each row can have different number of
checkboxes with different names. Some of the checkboxes
will be checked some ones not.
<aspataGrid id="dg" AutoGenerateColumns="False"
runat="server">
<Columns>
<asp:BoundColumn DataField="Name"
HeaderText="Sidnamn"></asp:BoundColumn>
<asp:BoundColumn DataField="Url"
HeaderText="Url"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Behörighet">
runat="server" ID="Checkboxlist2">
</asp:checkboxlist>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
The GetData() method is returning a DataView.
I have try to set selection I OnPreRender fore the page
but than I only can set selection I one row.
Can someone help me how to solve it
Thanks
/Mats
I am working on a webapplication using Asp.net with C#. I
have Datagrid that have 3 colums two of them are text but
the last one is a CheckBoxList. I have manage to set data
to the CheckBoxList but I haven't found a way to select
those checkbox that I will.
I read data from a database and will make a table with two
text columns and one column filled with several
checkboxes. Each row can have different number of
checkboxes with different names. Some of the checkboxes
will be checked some ones not.
<aspataGrid id="dg" AutoGenerateColumns="False"
runat="server">
<Columns>
<asp:BoundColumn DataField="Name"
HeaderText="Sidnamn"></asp:BoundColumn>
<asp:BoundColumn DataField="Url"
HeaderText="Url"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Behörighet">
DataValueField="ValueField" DataTextField="Name"" RepeatDirection="Horizontal"
runat="server" ID="Checkboxlist2">
</asp:checkboxlist>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
The GetData() method is returning a DataView.
I have try to set selection I OnPreRender fore the page
but than I only can set selection I one row.
Can someone help me how to solve it
Thanks
/Mats