Problem: The Select button in RadGridShapeInformation is clicked. The event SelectedIndexChanged fires. In both my local system and the production set the textboxes in SelectedIndexChanged.
Local shows the correct values in the textbox on the web page.
Production show the original values.
Here is what I have:
Visual Studio 2017 Community Version
Telerik from 2015 – UI for ASP.NET AJAX
<asp:TextBox
ID="TextBoxSelectedShape"
runat="server"
Width="30%"
BorderStyle="None"
Font-Size="Medium"
ForeColor="White"
Font-Bold="true"
ReadOnly="True"
BorderWidth="0px"
BackColor="Blue"
Text="--No Shape Selected--">
</asp:TextBox>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyShapeAdmin" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGridShapeInformation">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="TextBoxSelectedShape" />
<telerik:AjaxUpdatedControl ControlID="TextBoxErrorMessage" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:radPageView ID="PageViewShapeInformation"
runat="server"
Width="100%">
<br />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelShapeInformation" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanelShapeInformation"
runat="server"
LoadingPanelID="RadAjaxLoadingPanelShapeInformation">
<telerik:RadGrid
ID="RadGridShapeInformation"
runat="server"
AllowAutomaticDeletes="True"
AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
AllowFilteringByColumn="True"
AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False"
AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True"
DataSourceID="odsShapes"
GroupPanelPosition="Top">
<GroupingSettings CollapseAllTooltip="Collapse all groups" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView
. . .
<Columns>
<telerik:GridButtonColumn
CommandName="Select"
Text="Select"
UniqueName="Select">
</telerik:GridButtonColumn>
. . .
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
</telerik:radPageView>
CODE
Public Sub RadGridShapeInformation_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGridShapeInformation.SelectedIndexChanged
myDebug.SetMessage("Entered Index Changed")
Dim rg As RadGrid = CType(sender, RadGrid)
Dim dataItem = TryCast(RadGridShapeInformation.SelectedItems(0), GridDataItem)
If dataItem IsNot Nothing Then
Patterns.DAL.MessageDAL.InsertMessage("Index Changed Shape Administration", "ENDING", SessionVariables.UserID)
SetSelectedShapeID(dataItem("ShapeID").Text, dataItem("ShapeName").Text)
Patterns.DAL.MessageDAL.InsertMessage(TextBoxShapeID.Text.ToString, "ENDING", SessionVariables.UserID)
Patterns.DAL.MessageDAL.InsertMessage(TextBoxSelectedShape.Text, "ENDING", SessionVariables.UserID)
Else
ResetPage()
Patterns.DAL.MessageDAL.InsertMessage("Index NOT Changed Shape Administration", "ENDING", SessionVariables.UserID)
End If
End
Private Sub SetSelectedShapeID(pShapeID As String, pShapeName As String)
If pShapeID.Length = 0 Then
Me.TextBoxShapeID.Text = ""
Me.TextBoxSelectedShape.Text = "--No Shape Selected--"
Else
Me.TextBoxShapeID.Text = pShapeID
Me.TextBoxSelectedShape.Text = pShapeName
End If
End Sub
Local shows the correct values in the textbox on the web page.
Production show the original values.
Here is what I have:
Visual Studio 2017 Community Version
Telerik from 2015 – UI for ASP.NET AJAX
<asp:TextBox
ID="TextBoxSelectedShape"
runat="server"
Width="30%"
BorderStyle="None"
Font-Size="Medium"
ForeColor="White"
Font-Bold="true"
ReadOnly="True"
BorderWidth="0px"
BackColor="Blue"
Text="--No Shape Selected--">
</asp:TextBox>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyShapeAdmin" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGridShapeInformation">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="TextBoxSelectedShape" />
<telerik:AjaxUpdatedControl ControlID="TextBoxErrorMessage" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:radPageView ID="PageViewShapeInformation"
runat="server"
Width="100%">
<br />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelShapeInformation" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanelShapeInformation"
runat="server"
LoadingPanelID="RadAjaxLoadingPanelShapeInformation">
<telerik:RadGrid
ID="RadGridShapeInformation"
runat="server"
AllowAutomaticDeletes="True"
AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
AllowFilteringByColumn="True"
AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False"
AutoGenerateDeleteColumn="True"
AutoGenerateEditColumn="True"
DataSourceID="odsShapes"
GroupPanelPosition="Top">
<GroupingSettings CollapseAllTooltip="Collapse all groups" />
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView
. . .
<Columns>
<telerik:GridButtonColumn
CommandName="Select"
Text="Select"
UniqueName="Select">
</telerik:GridButtonColumn>
. . .
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
</telerik:radPageView>
CODE
Public Sub RadGridShapeInformation_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGridShapeInformation.SelectedIndexChanged
myDebug.SetMessage("Entered Index Changed")
Dim rg As RadGrid = CType(sender, RadGrid)
Dim dataItem = TryCast(RadGridShapeInformation.SelectedItems(0), GridDataItem)
If dataItem IsNot Nothing Then
Patterns.DAL.MessageDAL.InsertMessage("Index Changed Shape Administration", "ENDING", SessionVariables.UserID)
SetSelectedShapeID(dataItem("ShapeID").Text, dataItem("ShapeName").Text)
Patterns.DAL.MessageDAL.InsertMessage(TextBoxShapeID.Text.ToString, "ENDING", SessionVariables.UserID)
Patterns.DAL.MessageDAL.InsertMessage(TextBoxSelectedShape.Text, "ENDING", SessionVariables.UserID)
Else
ResetPage()
Patterns.DAL.MessageDAL.InsertMessage("Index NOT Changed Shape Administration", "ENDING", SessionVariables.UserID)
End If
End
Private Sub SetSelectedShapeID(pShapeID As String, pShapeName As String)
If pShapeID.Length = 0 Then
Me.TextBoxShapeID.Text = ""
Me.TextBoxSelectedShape.Text = "--No Shape Selected--"
Else
Me.TextBoxShapeID.Text = pShapeID
Me.TextBoxSelectedShape.Text = pShapeName
End If
End Sub