Oct 10, 2007 at 12:56 PM

In our company we are still using RowSelectorColumn. I have a problem with one of our grids.
Lets say we have 4 rows and when we load 2 have their checkboxes set to checked. The user can select more or deselect the 2 there. The problem is with the first click. It never changes the state of the checkbox. Every other click after the first one changes the state.

Here the HTML code:

"<asp:datagrid id="dgLive" runat="server" AutoGenerateColumns="False" Width="100%">
<AlternatingItemStyle BackColor="#E7F0FA"></AlternatingItemStyle>
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" BackColor="White"></ItemStyle>
<HeaderStyle Font-Size="XX-Small" Font-Names="Verdana" ForeColor="White" BackColor="#336699"></HeaderStyle>
<asp:BoundColumn DataField="limit" HeaderText="Limit"></asp:BoundColumn>
<asp:BoundColumn DataField="facilitygrade" HeaderText="Facility Grade"></asp:BoundColumn>
<asp:BoundColumn DataField="facilitytype" HeaderText="Facility Type"></asp:BoundColumn>
<asp:BoundColumn DataField="Currency" HeaderText="Currency"></asp:BoundColumn>
<mbrsc:RowSelectorColumn HeaderText="Send To ACA" SelectionMode="Multiple" autopostback="False"></mbrsc:RowSelectorColumn>
<asp:BoundColumn DataField="lporigionalid" HeaderText="OriginalID"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="markup" HeaderText="markup"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="PricingID" HeaderText="PricingID"></asp:BoundColumn>

Here is the code I use to load the grid and set the checkboxes

"Dim objDSLive As DataSet
Dim objGrdItem As DataGridItem
Dim objRadio As ParticipantCheckBox"

In Page_Load:

"dgLive.DataSource = objDSLive

For Each objGrdItem In dgLive.Items
objRadio = New ParticipantCheckBox
objRadio = objGrdItem.Cells(4).Controls(0)
objRadio.ID = "rad" & objGrdItem.Cells(7).Text
objRadio.AutoPostBack = True
objRadio.EnableViewState = True
If Trim(objGrdItem.Cells(6).Text) = 1 Then
objRadio.Checked = True
objRadio.Checked = False
End If

Any help would be very much appreciated,
Nov 2, 2007 at 9:24 PM
Sorry, but the older controls aren't being supported.
Nov 5, 2007 at 7:57 AM
That's fine, I went back to using an ordinary checkbox in the datagrid and it works fine now.
Jan 9, 2008 at 6:35 AM
I am asking the same question. The RowSelectorColumn is no longer there. But there is a example on how to use this.

Can you give me a eg, on how to add this to the datagrid.