Hi,
I almost have the following working but am missing a little bit of information.
I have a RadGrid with the following definition in the Command Item Template:
Works great and shows exactly as I want.
I then have:
Again, seems to work OK. I look at the value in lblShowComplete when rebinding the grid and can evaluate whether to show complete records or not.
What I cannot seem to work out is how to keep the checkbox checked when the grid is re-displayed. I could do it by setting the CheckBox control, but don't know how to access it within the Command Item Template.
Any help appreciated
David Penny
I almost have the following working but am missing a little bit of information.
I have a RadGrid with the following definition in the Command Item Template:
<CommandItemTemplate> |
<table style="width: 100%;"> |
<tr> |
<td style="width: 50%;"> |
<a href="#" onclick="return ShowInsertForm();"> |
<img alt="Insert" border="0" height="20" src="AddRecord.gif" width="20"> |
Add New Record</a> |
</td> |
<td style="width: 50%" align="right"> |
<asp:CheckBox ID="chkShowCompleted" OnCheckedChanged="chkShowCompleted_CheckChanged" |
runat="server" Text="Show Completed" Width="163px" |
AutoPostBack="True" /> |
</td> |
</tr> |
</table> |
</CommandItemTemplate> |
Works great and shows exactly as I want.
I then have:
Protected Sub chkShowCompleted_CheckChanged(ByVal sender As Object, ByVal e As System.EventArgs) |
Dim chkbox As CheckBox = sender |
lblShowComplete.Text = "False" |
If chkbox.Checked Then |
lblShowComplete.Text = "True" |
End If |
RadGrid1.Rebind() |
End Sub |
Again, seems to work OK. I look at the value in lblShowComplete when rebinding the grid and can evaluate whether to show complete records or not.
What I cannot seem to work out is how to keep the checkbox checked when the grid is re-displayed. I could do it by setting the CheckBox control, but don't know how to access it within the Command Item Template.
Any help appreciated
David Penny