Sql & Store & Form

  1. #1

    Sql & Store & Form

    I used SqlDataSource1 and Store1 (I snipped them from the examples) to load data and update form fields. It seems there is no simple way to bind data, I can fill gridview but how can I fill form fields like textboxes? Should I use sql data reader instead or SqlDataSource & Store are my answer? Or should I simply remove SqlDataSource1 and Store1 as they are not useful in my case?
  2. #2

    RE: Sql & Store & Form

    I'm not really sure what advice to offer based only on your description of the scenario. Which example are you basing this on? Can you post a simplified .aspx demonstrating how you have things configured?

    Any more information you can provide would be helpful for us to understand what you are attempting to build.


    Geoffrey McGill
    Founder
  3. #3

    RE: Sql & Store & Form

    I've chosen GridPanel with Form Details example. I just tried to emulate Employee Details in a seperate page. However I used SqlDataSource instead of Linq.

    	<script runat="server">
        protected void RowSelect(object sender, AjaxEventArgs e)
        {
            string employeeID = e.ExtraParams["EmployeeID"];
    
            //Employee empl = Employee.GetEmployee(int.Parse(employeeID));	// I need to retrive data from SqlDataSource here...
    
            this.EmployeeID.Text = empl.EmployeeID.ToString();
            this.FirstName.Text = empl.FirstName;	...
    PS: I don't want to create &amp; use an Employee class.
  4. #4

    RE: Sql & Store & Form

    I think Store and SqlDataReader are used for gridview part of the example.

Similar Threads

  1. Replies: 6
    Last Post: Jul 15, 2011, 1:03 PM
  2. [CLOSED] Add record to store via form
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 20
    Last Post: May 17, 2011, 6:45 PM
  3. Replies: 5
    Last Post: Jan 04, 2011, 8:09 PM
  4. [CLOSED] Why is it that form fields automatically bind to a store?
    By SandorD in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 12, 2010, 11:24 PM
  5. Replies: 1
    Last Post: Aug 24, 2009, 1:37 PM

Posting Permissions