This is a migrated thread and some comments may be shown as answers.

Textbox values not displayed after postback in production but works in local

0 Answers 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 21 Feb 2018, 10:57 PM
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

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Share this question
or