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

Grid Popup Edit Submit button Issue

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manivannan
Top achievements
Rank 1
Manivannan asked on 11 Dec 2013, 07:15 PM
Hi

I have a simple grid with popup Edit page. I have Submit Button, when I try to submit it is not working. Not able to Debug and getting following error.

  Internet Explorer cannot display the webpage
   
   What you can try:
    Diagnose Connection Problems  
 
     More information

This problem can be caused by a variety of issues, including:

•Internet connectivity has been lost.
•The website is temporarily unavailable.
•The Domain Name Server (DNS) is not reachable.
•The Domain Name Server (DNS) does not have a listing for the website's domain.
•There might be a typing error in the address.
•If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.

For offline users

You can still view subscribed feeds and some recently viewed webpages.
To view subscribed feeds

1.Click the Favorites Center button , click Feeds, and then click the feed you want to view.

To view recently visited webpages (might not work on all pages)

1.Click Tools , and then click Work Offline.
2.Click the Favorites Center button , click History, and then click the page you want to view.




Code Sample: Grid page  ASPX File

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm4.aspx.vb" Inherits="ConEdison.AAA.WebForm4" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title></title></head>
<body>
<form id="Form1" method="post" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script src="Includes/audit.js" type="text/javascript"></script>
   </telerik:RadCodeBlock>
     <telerik:RadAjaxManager ID="TypeAjaxManager" runat="server" OnAjaxRequest="TypeAjaxManager_AjaxRequest">
      <ClientEvents OnRequestStart="TypeRequestStart" />
      <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="TypeAjaxManager">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadGrid3" />
            </UpdatedControls>
         </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="RadGrid3">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadGrid3" />
            </UpdatedControls>
         </telerik:AjaxSetting>
      </AjaxSettings>
   </telerik:RadAjaxManager>
    <telerik:RadGrid runat="server" ID="RadGrid3" Font-Names="Verdana"
        Font-Size="XX-Small" Skin="Telerik">
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

    <ClientSettings AllowColumnsReorder="False" AllowDragToGroup="False" ReorderColumnsOnClient="False">
         <Selecting AllowRowSelect="False" />
         <Scrolling AllowScroll="False" UseStaticHeaders="True" />
      </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID" Width="100%" CommandItemDisplay="Top">
         <CommandItemSettings ShowRefreshButton="False"/>
          <RowIndicatorColumn SortedBackColor="lightblue">
         </RowIndicatorColumn>
         <ExpandCollapseColumn Visible="True" created="True">
         </ExpandCollapseColumn>
         <Columns>
            <telerik:GridTemplateColumn HeaderText="Edit" UniqueName="TemplateEditColumn" >
               <ItemTemplate>
                  <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
               </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ManagerName" HeaderText="ManagerName" UniqueName="ManagerName">
             </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmpName" HeaderText="EmpName" UniqueName="EmpName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Deligate_Emp_Id" HeaderText="Deligate_Emp_Id" UniqueName="Deligate_Emp_Id">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Deligate_From_Date"  HeaderText="Deligate_From_Date" UniqueName="Deligate_From_Date">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Deligate_To_Date" HeaderText="TDeligate_To_Date" UniqueName="Deligate_To_Date">
            </telerik:GridBoundColumn>
            </Columns>

<EditFormSettings PopUpSettings-Modal="true">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>

<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
      </MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    
    
       <telerik:RadWindowManager ID="TypeWindowManager" runat="server">
            <Windows>
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record"
                    ReloadOnShow="true" ShowContentDuringLoad="false"
                      Behaviors="Close" Modal="true" Width="440" Height="480" />
            </Windows>
     </telerik:RadWindowManager>
    
    
   
 
      </form>
    </body>
</html>

Vb file



Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports Telerik.Web.UI
Imports System.Collections.Generic
Imports System.Globalization
Partial Public Class WebForm4
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    End Sub
    Private Sub RadGrid3_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid3.ItemCreated
        If TypeOf e.Item Is GridDataItem Then
            Dim InvC As CultureInfo = CultureInfo.InvariantCulture
            Dim editLink As HyperLink = DirectCast(e.Item.FindControl("EditLink"), HyperLink)
            editLink.Attributes("href") = "#"
            editLink.Attributes("onclick") = [String].Format(InvC, "return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID"), "DDetails")
        End If
    End Sub
    Private Sub RadGrid3_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid3.NeedDataSource
        Dim UserDataTable As New DataTable("DelegateDetails")
        UserDataTable = CType(Cache.Get("DelegateDetails"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadDelegateDetails("DelegateDetails")
            Cache.Insert("DelegateDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        Else
            UserDataTable = LoadDelegateDetails("DelegateDetails")
            Cache.Insert("DelegateDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        RadGrid3.DataSource = UserDataTable
    End Sub
    Private Function LoadDelegateDetails(ByVal tblname As String) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Session("Companycd") = 1
        Try
            getNames = SQLCall.Get_DeligateInfo(CInt(Session("Companycd")))
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadDelegateDetails = getNames
                LoadDelegateDetails.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function
    Protected Sub TypeAjaxManager_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs) Handles TypeAjaxManager.AjaxRequest
        Try
            If e.Argument = "Rebind" Then
                RadGrid3.MasterTableView.SortExpressions.Clear()
                RadGrid3.MasterTableView.GroupByExpressions.Clear()
                RadGrid3.Rebind()
            ElseIf e.Argument = "RebindAndNavigate" Then
                RadGrid3.MasterTableView.SortExpressions.Clear()
                RadGrid3.MasterTableView.GroupByExpressions.Clear()
                RadGrid3.MasterTableView.CurrentPageIndex = RadGrid3.MasterTableView.PageCount - 1
                RadGrid3.Rebind()
            End If
        Catch ex As KeyNotFoundException
        Catch ex As Exception
            Throw
        End Try
    End Sub
End Class

Details ASPX Page

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="DDetails.aspx.vb" Inherits="ConEdison.AAA.DDetails" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Deligate</title>
    <style type="text/css">
        .style1
        {
            font-family: Verdana;
            font-size: xx-small;
        }
        .style2
        {
            font-family: Verdana;
            font-size: xx-small;
            height: 7px;
        }
        .style3
        {
            height: 7px;
        }
    </style>

    <script type="text/javascript">
        function Clicking(sender, args) {
            args.set_cancel(!window.confirm("Are you sure you want to submit the page?"));
            
        }
</script>
     
     


</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
     
 
        <br />
        <table>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td>
                   
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td>
                   
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    Company:
                </td>
                <td>
                   
                    <telerik:RadComboBox ID="ddlCompany" Runat="server" Skin="Telerik">
                        <Items>
                            <telerik:RadComboBoxItem runat="server" Selected="True" Text="Select....."
                                Value="0" />
                            <telerik:RadComboBoxItem runat="server" Text="ConEd" Value="1" />
                            <telerik:RadComboBoxItem runat="server" Text="O&amp;R" Value="2" />
                            <telerik:RadComboBoxItem runat="server" Text="Both" Value="3" />
                        </Items>
                    </telerik:RadComboBox>
                   
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Schedule Name:
                </td>
                <td>
                      <telerik:RadComboBox ID="ddlSchedule" Runat="server" Skin="Telerik">
                       </telerik:RadComboBox>
                    
                  
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Manager Name:
                </td>
                <td>
                    <telerik:RadComboBox ID="ddlManager" Runat="server" Skin="Telerik" >
                       </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Delegate Employee:
                </td>
                <td>
                 
                    <telerik:RadComboBox ID="ddlEmployee" Runat="server" Skin="Telerik">
                       </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Delegate Start Date:
                </td>
                <td>
                    <telerik:RadDatePicker ID="dteStartDate" runat="server" CssClass="style1" Skin="Telerik">
                        <calendar userowheadersasselectors="False" usecolumnheadersasselectors="False" skin="Telerik"></calendar>
                        <datepopupbutton imageurl="" hoverimageurl=""></datepopupbutton>
                        <dateinput displaydateformat="M/d/yyyy" dateformat="M/d/yyyy" labelwidth="40%"></dateinput>
                    </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Delegate End Date:
                </td>
                <td>
                    <telerik:RadDatePicker ID="dteEndDate" runat="server" CssClass="style1" Skin="Telerik">
                        <calendar userowheadersasselectors="False" usecolumnheadersasselectors="False" skin="Telerik"></calendar>
                        <datepopupbutton imageurl="" hoverimageurl=""></datepopupbutton>
                        <dateinput displaydateformat="M/d/yyyy" dateformat="M/d/yyyy" labelwidth="40%"></dateinput>
                    </telerik:RadDatePicker>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Is Active?</td>
                <td>
                     <telerik:RadComboBox ID="ddlActive" Runat="server" Skin="Telerik"
                         AutoPostBack="True" >
                        <Items>
                            <telerik:RadComboBoxItem runat="server" Selected="True" Text="Select....."
                                Value="-1" />
                            <telerik:RadComboBoxItem runat="server" Text="Yes" Value="1" />
                            <telerik:RadComboBoxItem runat="server" Text="No" Value="0" />
                        </Items>
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;
                </td>
                <td class="style1">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td class="style1">
                   

                   
                   
                       
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;
                </td>
                <td>
                     

                    <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton" OnClientClicking="Clicking">
                    </telerik:RadButton>
                     

                </td>
            </tr>
            <tr>
                <td class="style2">
                </td>
                <td class="style3">
                    <asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Names="Verdana"
                        Font-Size="8pt" ForeColor="Red"></asp:Label>
                   
                </td>
            </tr>
        </table>
        <br />
    </div>
 
    
 
    </form>

    
</body>
</html>


VB File

Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports Telerik.Web
Imports Telerik.Web.UI
Imports System.Data.SqlClient
Partial Public Class DDetails
    Inherits System.Web.UI.Page
    Public DelegateID As String
    Public Shared SelectDotDotDot As String = Replace(" Select...", " "c, Convert.ToChar(160)) 'spaces converted to non-breaking spaces
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            DelegateID = Request.QueryString("ID")
            Dim CompId As Integer
            If ddlCompany.SelectedIndex = 0 Then
                CompId = 1
            Else
                CompId = ddlSchedule.SelectedIndex
            End If
            PopulateScheduleNameList()
            PopulateEmployees(CompId)
            If CInt(DelegateID) > 0 Then
                PopulateScheduleNameList()
                PopulateEmployees(CompId)
                Populate_Form()
            End If
        End If
    End Sub
    Private Sub PopulateEmployees(ByVal CompanyId As Integer)
        Dim UserDataTable As New DataTable("Empoloyees")
        UserDataTable = CType(Cache.Get("Empoloyees"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadEmployees("Empoloyees", CompanyId)
            Cache.Insert("Empoloyees", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        Else
            UserDataTable = LoadEmployees("Empoloyees", CompanyId)
            Cache.Insert("Empoloyees", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        ddlManager.DataSource = UserDataTable
        ddlManager.DataValueField = "StrEmpno1"
        ddlManager.DataTextField = "strNameEmpNo"
        ddlManager.DataBind()
        ddlManager.Items.Insert(0, New RadComboBoxItem("Select.....", "-1"))


        ddlEmployee.DataSource = UserDataTable
        ddlEmployee.DataValueField = "StrEmpno1"
        ddlEmployee.DataTextField = "strNameEmpNo"
        ddlEmployee.DataBind()
        ddlEmployee.Items.Insert(0, New RadComboBoxItem("Select.....", "-1"))


    End Sub

    Private Sub PopulateManagerList(ByVal CompanyId As Integer)
        Dim UserDataTable As New DataTable("ManagerDetails")
        UserDataTable = CType(Cache.Get("ManagerDetails"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadManagerDetails("ManagerDetails", CompanyId)
            Cache.Insert("ManagerDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        Else
            UserDataTable = LoadManagerDetails("ManagerDetails", CompanyId)
            Cache.Insert("ManagerDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        ddlManager.DataSource = UserDataTable
        ddlManager.DataValueField = "ManagerCode"
        ddlManager.DataTextField = "ManagerName"
        ddlManager.DataBind()
        ddlManager.Items.Insert(0, New RadComboBoxItem("Select.....", "-1"))

    End Sub
    Private Sub PopulateEmployeeList(ByVal compId As Integer, ByVal MgrId As Integer)
        Dim UserDataTable As New DataTable("EmpoyeeDetails")
        UserDataTable = CType(Cache.Get("EmpoyeeDetails"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadEmployeeDetails("EmpoyeeDetails", MgrId, compId)
            If UserDataTable Is Nothing Then
            Else
                Cache.Insert("EmpoyeeDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
            End If
        Else
            UserDataTable = LoadEmployeeDetails("EmpoyeeDetails", MgrId, compId)
            Cache.Insert("EmpoyeeDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        ddlEmployee.DataSource = UserDataTable
        ddlEmployee.DataValueField = "Emp_No"
        ddlEmployee.DataTextField = "EmpName"
        ddlEmployee.DataBind()
        ddlEmployee.Items.Insert(0, New RadComboBoxItem("Select.....", "-1"))

    End Sub
    Private Function LoadEmployees(ByVal tblname As String, ByVal CompanyId As Integer) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Try
            getNames = SQLCall.Get_CONEDOREmployeeInfo(CompanyId)
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadEmployees = getNames
                LoadEmployees.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function

    Private Function LoadManagerDetails(ByVal tblname As String, ByVal CompanyId As Integer) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Try
            getNames = SQLCall.USP_GetManagerList(CompanyId)
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadManagerDetails = getNames
                LoadManagerDetails.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function
    Private Function LoadEmployeeDetails(ByVal tblname As String, ByVal MgrId As Integer, ByVal CompId As Integer) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Try
            getNames = SQLCall.USP_GetEmpList(MgrId, CompId)
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadEmployeeDetails = getNames
                LoadEmployeeDetails.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function
    Private Sub PopulateScheduleNameList()
        Dim UserDataTable As New DataTable("ScheduleDetails")
        UserDataTable = CType(Cache.Get("ScheduleDetails"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadScheduleDetails("ScheduleDetails")
            Cache.Insert("ScheduleDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        Else
            UserDataTable = LoadScheduleDetails("ScheduleDetails")
            Cache.Insert("ScheduleDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        ddlSchedule.DataSource = UserDataTable
        ddlSchedule.DataValueField = "schedule_id"
        ddlSchedule.DataTextField = "Schedule_Name"
        ddlSchedule.DataBind()

        ddlSchedule.Items.Insert(0, New RadComboBoxItem("Select.....", "-1"))
    End Sub
    Private Function LoadScheduleDetails(ByVal tblname As String) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Try
            getNames = SQLCall.USP_GetScheduleNameList()
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadScheduleDetails = getNames
                LoadScheduleDetails.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function
    Private Sub EditAuditDeligate()
        Dim UserDataTable As New DataTable("EditDetails")
        UserDataTable = CType(Cache.Get("EditDetails"), DataTable)
        If UserDataTable Is Nothing Then
            UserDataTable = LoadEditDetails("EditDetails")
            Cache.Insert("EditDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        Else
            UserDataTable = LoadEditDetails("EditDetails")
            Cache.Insert("EditDetails", UserDataTable, Nothing, DateTime.Now.AddMinutes(10), TimeSpan.Zero)
        End If
        ddlSchedule.SelectedItem.Value = UserDataTable.Columns(0).ToString()
        ddlSchedule.SelectedItem.Value = UserDataTable.Columns(1).ToString()
        ddlSchedule.SelectedItem.Value = UserDataTable.Columns(2).ToString()


    End Sub
    Private Function LoadEditDetails(ByVal tblname As String) As DataTable
        Dim SQLCall As New AAA_DB_Calls
        Dim getNames As New DataTable
        Try
            getNames = SQLCall.USP_GetAuditDeligateById(CInt(DelegateID))
            If getNames Is Nothing Then
                Exit Function
            ElseIf getNames.Rows.Count > 0 Then
                LoadEditDetails = getNames
                LoadEditDetails.TableName = tblname.ToString
            End If
        Catch ex As Exception
        Finally
            getNames = Nothing
            SQLCall = Nothing
        End Try
    End Function
    Private Sub Populate_Form()
        Dim MyDataReader As SqlDataReader
        Dim GetDataReader As New StoredProcedureClass
        Dim MySqlStr As String
        MySqlStr = "USP_GetAuditDeligateById @ID = " & DelegateID
        MyDataReader = GetDataReader.CreateSqlDataReader(MySqlStr)
        Do While MyDataReader.Read()
            ddlCompany.SelectedValue = "1"
            ddlSchedule.SelectedValue = CStr(MyDataReader("Schedule_Id"))
            ddlManager.SelectedValue = CStr(MyDataReader("Manager_Id"))
            ddlEmployee.SelectedValue = CStr(MyDataReader("Deligate_Emp_Id"))
            dteStartDate.SelectedDate = CDate(MyDataReader("Deligate_From_Date"))
            dteEndDate.SelectedDate = CDate(MyDataReader("Deligate_To_Date"))
            ddlActive.SelectedValue = CStr(MyDataReader("IsActive"))
        Loop
    End Sub

    Private Sub SaveData()
        lblMessage.Text = ""
        Dim objSPcls As New StoredProcedureClass
        Dim ExecResult As String
        Dim ScheduleId As String
        Dim ManagerId As String
        Dim DelegateEmpId As String
        Dim dFromDate As String
        Dim dToDate As String
        Dim CreateBy As String
        Dim sNTLoginName As String
        Dim SqlStr1 As String
        sNTLoginName = Right(User.Identity.Name, Len(User.Identity.Name) - 6)
        ScheduleId = ddlSchedule.SelectedValue
        ManagerId = ddlManager.SelectedValue
        DelegateEmpId = ddlEmployee.SelectedValue
        dFromDate = CStr(dteStartDate.SelectedDate)
        dToDate = CStr(dteEndDate.SelectedDate)
        CreateBy = "2768"
        SqlStr1 = ""
        SqlStr1 = SqlStr1 + " USP_UpdateAuditDeligate "
        SqlStr1 = SqlStr1 + " @DeligateId = '" + DelegateID + "',"
        SqlStr1 = SqlStr1 + " @ScheduleId = '" + ScheduleId + "',"
        SqlStr1 = SqlStr1 + " @ManagerID = '" + ManagerId + "',"
        SqlStr1 = SqlStr1 + " @DeligateEmpId = '" + DelegateEmpId + "',"
        SqlStr1 = SqlStr1 + " @DeligateFromDate = '" + dFromDate + "',"
        SqlStr1 = SqlStr1 + " @DeligateToDate = '" + dToDate + "',"
        SqlStr1 = SqlStr1 + " @CreatedById = '" + CreateBy + "'"
        ExecResult = objSPcls.ExecuteSqlQuery(SqlStr1, "@RC")
        objSPcls = Nothing
    End Sub

    Private Sub RadButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadButton2.Click

    End Sub
End Class





1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 16 Dec 2013, 09:46 AM
Hi Manivannan,

Could you please elaborate on what you are doing on ShowEditForm(), since the functions is missing in the provide code snippet.

Furthermore, please consider using the implemented PopUp functionality with WebUserControl edit form, instead of the approach you are trying to use. Here are some help articles and online demos that could prove helpful:

Hope that helps.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Manivannan
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or