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
protected
void Button1_Click(object sender, EventArgs e)
{
RAASBLL Refresh = new RAASBLL();
//Calls the method which has the query in it
DataTable dtPlazas = Refresh.AllPlazas();
RadGrid2.MasterTableView.DataSource = dtPlazas.DefaultView;
RadGrid2.DataSource = dtPlazas.DefaultView;
RadGrid2.Databind ();
}
<
telerik:RadGrid ID="RadGrid2" runat="server" AllowFilteringByColumn="True"
autogeneratecolumns="False" datakeynames="PLAZA" AllowPaging="true" >
<MasterTableView IsFilterItemExpanded="false" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to Pdf">
</CommandItemSettings>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="PLAZA" HeaderText="Plaza" DataType="System.Decimal" SortExpression="PLAZA" UniqueName="PLAZA" />
<telerik:GridBoundColumn DataField="PLAZA_NAme" HeaderText="Plaza Name" DataType="System.String" SortExpression="PLAZA_NAME" UniqueName="PLAZA_NAME" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
<
asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Refresh" />
Please help.
Thanks,
Reena
/* RadListBox Default skin *//*global*/.RadListBox_AnaquaSkin *{ margin:1; padding:2; }.RadListBox_AnaquaSkin .rlbGroup{ border: 1px solid #8e8e8e; background: #FFFFFF;}.RadListBox_AnaquaSkin .rlbText,.RadListBox_AnaquaSkin .rlbItem,.RadListBox_AnaquaSkin .rlbButtonText,.RadListBox_AnaquaSkin .rlbEmptyMessage{ font-size: 11px; font-family: Arial, Verdana, MS Sans Sans-Serif; } .RadListBox_AnaquaSkin .rlbText,.RadListBox_AnaquaSkin .rlbItem{ line-height: 10px; }.RadListBox_AnaquaSkin .rlbGroup .rlbHovered{ background: #ffffff;/* text color when hovered over options */ }.RadListBox_AnaquaSkin .rlbGroup .rlbSelected{ color: #FFF; background: #0A246A;/* Listbox item selected background color #C8C8C8, #140B65*/ }.RadListBox_AnaquaSkin .rlbDisabled .rlbText{ color: #AAA;/*Disabled listbox text color*/}.RadListBox_AnaquaSkin .rlbDisabled .rlbImage{ -moz-opacity: 0.5;}.RadListBox_AnaquaSkin .rlbDropClue{ background-image: url('ListBox/rlbDropClue.png'); background-position: 0 0; background-repeat: no-repeat; background-color: transparent; left: -10px; width: 10px;}.RadListBox_AnaquaSkin .rlbGroup .rlbDropClueAbove{ border-top-style: dotted; border-top-color: #8e8e8e;}.RadListBox_AnaquaSkin .rlbGroup .rlbDropClueBelow{ border-bottom-style: dotted; border-bottom-color: #8e8e8e; }.RadListBox_AnaquaSkin .rlbGroup .rlbSelected.rlbDropClueAbove,.RadListBox_AnaquaSkin .rlbGroup .rlbHovered.rlbDropClueAbove,.RadListBox_AnaquaSkin .rlbGroup .rlbSelected.rlbDropClueBelow,.RadListBox_AnaquaSkin .rlbGroup .rlbHovered.rlbDropClueBelow{ border-color: #FFF;}/* Buttons normal state vertical layout*/.RadListBox_AnaquaSkin .rlbButtonText{ background: transparent url('ListBox/rlbSprite.png') no-repeat;}.RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonTL,.RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonTR,.RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonBL,.RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonBR{ background-image: url('ListBox/rlbButtonHover.png');}* html .RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonTL,* html .RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonTR,* html .RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonBL,* html .RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonBR{ background-image: url('ListBox/rlbButtonHoverIE6.png');}.RadListBox_AnaquaSkin .rlbButton .rlbButtonTL,.RadListBox_AnaquaSkin .rlbButton .rlbButtonTR,.RadListBox_AnaquaSkin .rlbButton .rlbButtonBL,.RadListBox_AnaquaSkin .rlbButton .rlbButtonBR,.RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonTL,.RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonTR,.RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonBL,.RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonBR{ background-image: url('ListBox/rlbButtonNormal.png');}* html .RadListBox_AnaquaSkin .rlbButton .rlbButtonTL,* html .RadListBox_AnaquaSkin .rlbButton .rlbButtonTR,* html .RadListBox_AnaquaSkin .rlbButton .rlbButtonBL,* html .RadListBox_AnaquaSkin .rlbButton .rlbButtonBR,* html .RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonTL,* html .RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonTR,* html .RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonBL,* html .RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonBR{ background-image: url('ListBox/rlbButtonNormalIE6.png');}.RadListBox_AnaquaSkin .rlbButton:hover .rlbButtonText { color: #FFF; }.RadListBox_AnaquaSkin .rlbDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbDisabled:hover .rlbButtonText{ color: #888;}.RadListBox_AnaquaSkin .rlbMoveUp .rlbButtonText { background-position: 0 0; }.RadListBox_AnaquaSkin .rlbMoveUp:hover .rlbButtonText { background-position: -400px 0; }.RadListBox_AnaquaSkin .rlbMoveUpDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbMoveUpDisabled:hover .rlbButtonText { background-position: -200px 0; }.RadListBox_AnaquaSkin .rlbMoveDown .rlbButtonText { background-position: 0 -25px; }.RadListBox_AnaquaSkin .rlbMoveDown:hover .rlbButtonText { background-position: -400px -25px; }.RadListBox_AnaquaSkin .rlbMoveDownDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbMoveDownDisabled:hover .rlbButtonText { background-position: -200px -25px; }.RadListBox_AnaquaSkin .rlbDelete .rlbButtonText { background-position: 0 -50px; }.RadListBox_AnaquaSkin .rlbDelete:hover .rlbButtonText { background-position: -400px -50px; }.RadListBox_AnaquaSkin .rlbDeleteDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbDeleteDisabled:hover .rlbButtonText { background-position: -200px -50px; }.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferFrom .rlbButtonText { background-position: 0 -100px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferFrom .rlbButtonText { background-position: 0 -75px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferFrom:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferTo:hover .rlbButtonText { background-position: -400px -100px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferTo:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferFrom:hover .rlbButtonText { background-position: -400px -75px; }.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferFromDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferToDisabled:hover .rlbButtonText { background-position: -200px -100px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferToDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferFromDisabled:hover .rlbButtonText { background-position: -200px -75px; }.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllFrom .rlbButtonText { background-position: 0 -150px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllFrom .rlbButtonText { background-position: 0 -125px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllFrom:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllTo:hover .rlbButtonText { background-position: -400px -150px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllTo:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllFrom:hover .rlbButtonText { background-position: -400px -125px; }.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllFromDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllToDisabled:hover .rlbButtonText { background-position: -200px -150px; }.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaLeft .rlbTransferAllToDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaRight .rlbTransferAllFromDisabled:hover .rlbButtonText { background-position: -200px -125px; }.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferFrom .rlbButtonText { background-position: 0 -200px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferFrom .rlbButtonText { background-position: 0 -175px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferFrom:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferTo:hover .rlbButtonText { background-position: -400px -200px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferTo:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferFrom:hover .rlbButtonText { background-position: -400px -175px; }.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferFromDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferToDisabled:hover .rlbButtonText { background-position: -200px -200px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferToDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferFromDisabled:hover .rlbButtonText { background-position: -200px -175px; }.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllFrom .rlbButtonText { background-position: 0 -250px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllTo .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllFrom .rlbButtonText { background-position: 0 -225px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllFrom:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllTo:hover .rlbButtonText { background-position: -400px -250px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllTo:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllFrom:hover .rlbButtonText { background-position: -400px -225px; }.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllFromDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllToDisabled:hover .rlbButtonText { background-position: -200px -250px; }.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllToDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllFromDisabled .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaTop .rlbTransferAllToDisabled:hover .rlbButtonText,.RadListBox_AnaquaSkin .rlbButtonAreaBottom .rlbTransferAllFromDisabled:hover .rlbButtonText { background-position: -200px -225px; }
ASP code below contains a simple Listbox and a special RadListBox:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListBoxTest.aspx.cs" Inherits="Anaqua.Web.UI.ListBoxTest"
MasterPageFile="~/MasterPages/ApplicationPage.Master" %>
<%@ MasterType VirtualPath="~/MasterPages/ApplicationPage.Master" %>
<asp:Content ID="ListBoxTestContent" ContentPlaceHolderID="PageContentPlaceHolder" runat="server">
<asp:ListBox ID="testlistbox1" width="250" Height="80px" runat="server">
<asp:ListItem selected="true" Text="1" Value="0" />
<asp:ListItem selected="False" Text="2" Value="1" />
<asp:ListItem Text="3" Value="2" />
<asp:ListItem Text="4" Value="3" />
<asp:ListItem Text="5" Value="4" />
<asp:ListItem Text="6" Value="5" />
<asp:ListItem Text="7" Value="6" />
<asp:ListItem Text="8" Value="7" />
<asp:ListItem Text="9" Value="8" />
</asp:ListBox>
<Anaqua:AnaquaRadListBox
ID="TestRadListBox" Width="250px" Height="80px" color="Black"
AllowTransfer="false"
AllowReorder="false"
AllowTransferDuplicates="false"
AllowTransferOnDoubleClick="false"
EnableDragAndDrop="false"
SelectionMode="Single"
runat="server">
<Items>
<telerik:RadListBoxItem Text="1" Value="0" />
<telerik:RadListBoxItem Text="2" Value="1" />
<telerik:RadListBoxItem Text="3" Value="2" />
<telerik:RadListBoxItem Text="4" Value="3" />
<telerik:RadListBoxItem Text="5" Value="4" />
<telerik:RadListBoxItem Text="6" Value="5" />
<telerik:RadListBoxItem Text="7" Value="6" />
<telerik:RadListBoxItem Text="8" Value="7" />
<telerik:RadListBoxItem Text="9" Value="8" />
</Items>
</Anaqua:AnaquaRadListBox>
</asp:Content>

// example 1 - style specified via css file <telerik:RadGrid ID="BAGrid" runat="server" DataSourceID="ProdData" GridLines="None" AllowSorting="True" OnPreRender="BAGrid_PreRender">// example 1 css #BAGrid { visibility:hidden; background-color:Purple; <--shows up in design mode but not at load time! }// example 2 - style specified inline <telerik:RadGrid ID="BAGrid" style="visibility:hidden" runat="server" DataSourceID="ProdData" GridLines="None" AllowSorting="True" OnPreRender="BAGrid_PreRender">