
GridcheckBox with ReadOnly=false is not working (unable to check/uncheck)
I have a few GridCheckBoxColumn inside a RadGrid. I have the ReadOnly property set to false but i cannot edit any of the checkboxes, that is I can neither check or uncheck them.
Anyone with any ideas as to why this is happening? Any comments/suggestions/ideas/correctiosn much appreciated as I'n new to the whole telerik markup.
Cheers,
Alan
</telerik:RadToolBar> <telerik:RadGrid ID="RadGrid3" runat="server" OnNeedDataSource="TelerikGridOnNeedDatasource" DataSourceID="dsActionProperties" PageSize="500" > <MasterTableView DataSourceID="dsActionProperties" AllowCustomSorting="True"> <Columns> <telerik:GridBoundColumn DataField="Name" HeaderText="Action Name" UniqueName="Name" SortExpression="Action Name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ActionSourceID" HeaderText="Action Source" UniqueName="ActionSourceID" > </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn DataField="IsStateChecked" DataType="System.Boolean" HeaderText="State Dependent" UniqueName="IsStateDependent" ReadOnly="false"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="IsTypeDependent" DataType="System.Boolean" HeaderText="Type Dependent" UniqueName="TypeDependent"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="Enabled" DataType="System.Boolean" HeaderText="Enabled" UniqueName="Enabled" ReadOnly="false"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Center" /> </telerik:GridCheckBoxColumn> </Columns> </MasterTableView> </telerik:RadGrid><br /> <asp:ObjectDataSource ID="dsActionProperties" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllActions" TypeName="DataSources.ActionsDS"> </asp:ObjectDataSource> <script type="text/javascript" language="JavaScript"> function UpdateChildrenRecursively(nodes, checked) { var i; for (i=0; i<nodes.get_count(); i++) { if (checked) { nodes.getNode(i).check(); } else { nodes.getNode(i).set_checked(false); } // if the node has children, call the recursive function // then disable the checkboxes for each child if (nodes.getNode(i).get_nodes().get_count()> 0) { UpdateChildrenRecursively(nodes.getNode(i).get_nodes(), checked); nodes.getNode(i).get_nodes().disabled = true; } } } function clientNodeChecked(sender, eventArgs) { var childNodes = eventArgs.get_node().get_nodes(); var isChecked = eventArgs.get_node().get_checked(); UpdateChildrenRecursively(childNodes, isChecked); }</script>Hi, I have a radStripTab with 3 tabs, each tab has a radgrid. When I change a register status (have a column button to do this) on the first radgrid the register should disappear from the first radgrid and should be shown on the second radgrid -that is on the second tab-
In my NeedDataSource method I refresh the datasource for both of the radgrids, the problem is that only the first radgrid refreshes when I change tabs the second radgrid doesn't have the latest data.
This procress applies also for the second and third radgrids, and the issue happens, when I make a change on the second radgrid the change is shown but you wont se the updated data on the third one. So the rebind is only working on the radgrid where you make the change and I need it to refresh the three radgrids.
Any idea on what should I do? Thanks
| Protected Sub RadGrid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource, RadGrid2.NeedDataSource, RadGrid3.NeedDataSource |
| Dim wsNC As New webService |
| RadGrid1.DataSource = wsNC.searchByStatus("0") |
| RadGrid2.DataSource = wsNC.searchByStatus("A") |
| RadGrid3.DataSource = wsNC.searchByStatus("R") |
| End Sub |
<telerik:RadGrid ID="RadGrid_Terminals" runat="server" AutoGenerateColumns="false" AllowMultiRowSelection="false" AllowPaging="True" PageSize="1" GridLines="None" CellPadding="0" AllowSorting="true" Skin="Default" OnItemDataBound="Check_Terminal_Status"> <PagerStyle Mode="NextPrevAndNumeric"/> <MasterTableView Width="100%" CommandItemDisplay="Top" GridLines="None" DataKeyNames="Terminal_Auto_ID"> <CommandItemTemplate> <telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Default"> <Items> <telerik:RadToolBarButton Text="Control Terminal" CommandName="EditSelected" Visible="true" ImageUrl="Images/Edit.gif"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Text="Refresh Terminals" CommandName="EditSelected" Visible="true" ImageUrl="Images/Refresh.gif"> </telerik:RadToolBarButton> </Items> </telerik:RadToolBar> </CommandItemTemplate> <Columns> <telerik:GridClientSelectColumn UniqueName="Checkbox_Terminal"/> <telerik:GridTemplateColumn UniqueName="Terminal_Image_Column" HeaderText="Status"> <ItemTemplate> <asp:Literal ID="Literal_Status" runat="server" Text="Online"> </asp:Literal> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="Terminal_ID_Ref" DataField="Terminal_ID_Ref" HeaderText="Terminal ID" Visible="false"/> <telerik:GridBoundColumn UniqueName="Terminal_Name" DataField="Terminal_Name" HeaderText="Name" SortExpression="Terminal_Name"/> <telerik:GridBoundColumn UniqueName="Terminal_Type_OnTime_Model" DataField="Terminal_Type_OnTime_Model" HeaderText="Model" SortExpression="Terminal_Type_OnTime_Model"/> </Columns> </MasterTableView> <ClientSettings> <Selecting AllowRowSelect="true" /> </ClientSettings> </telerik:RadGrid>protected void Check_Terminal_Status(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { //What happens here? }Terminal_Image_Column" control is bound, I decide whether to change the text in the literal Literal_Status to offline. I need to be able to change the text obviously, but also access the respective values such as Terminal_Type_OnTime_Model, Terminal_ID_Ref and Terminal_Auto_ID for example. I need to access this informaiton to perform other methods which will decide whether of not the text Literal_Status needs to be changed.Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Wed, 14 Jul 2010 16:24:07 UTC
Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 5
Char: 62099
Code: 0
URI: http://MOSS/ScriptResource.axd?d=02LrR3JgWZ1Dxd-KwaChkm_0vkjY8mm8nQD95KhDRcipMF3i0IfuPsNzw-56YW8IuYRYMRmY8ixtm9LIs8g_6wfMxJDUYHpOB58zDgPmP2E1&t=342c431f