GridView with SQL Database and SP

Posted by: trent.adams0201 on 23 September 2017, 3:09 am EST

    • Post Options:
    • Link

    Posted 23 September 2017, 3:09 am EST

    I have a huge project that is taking me longer to do than initially quoted and the boss is getting upset. However, some requirements were very complex. Anyway, I was hoping that Component One could save me a lot of time and speed development. Right now all of the grid views are done via tables and rows. The application relies heavily on SQL databases with a ton of SP.

    My question is, would these components, rather this particular component save coding time between both the code behind and in SQL? If I used the tables and views rather than using a crap ton of SQL SP?

    For instance, I am working on a PayRoll page to display employee wages. When a manger runs a report it will show the employee name as well as their total number of hours worked and the amount owed. We have several stored procedures in place for various tasks. However, I’m hoping to reduce those numbers or is this a bad way to go about things?

  • Posted 25 September 2017, 6:22 am EST

    Hi,

    My question is, would these components, rather this particular component save coding time between both the code behind and in SQL? If I used the tables and views rather than using a crap ton of SQL SP?

    Tables and views are better suited for our grids. You can perform CRUD operations very easily.

    I’m hoping to reduce those numbers or is this a bad way to go about things?

    You can always reuse your Views and SP projections to display in our grid.

    I would prefer you check our online demo at

    http://demo.componentone.com/aspnet/ControlExplorer/C1GridView/Overview.aspx

    to make a better judgement about the feature set you would need wrt amount of code you would need to write.

    ~nilay

  • Posted 21 December 2018, 5:17 pm EST

    Try this code:

    Dim strConnString As String = ConfigurationManager.ConnectionStrings(“conString”).ConnectionString

    Dim con As New SqlConnection(strConnString)

    Dim cmd As New SqlCommand()

    cmd.CommandType = CommandType.StoredProcedure

    cmd.CommandText = “GetAllEmployeeDetails”

    cmd.Connection = con

    Try

    con.Open()

    GridView1.EmptyDataText = “No Records Found”

    GridView1.DataSource = cmd.ExecuteReader()

    GridView1.DataBind()

    Catch ex As Exception

    Throw ex

    Finally

    con.Close()

    con.Dispose()

    End Try

    https://crbtech.in/programmes/dot-net-training-programme

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels