locked
Not show the table page RRS feed

  • Question

  • User1103877942 posted

    Is it possible to not show the table page and go straight to the data for a dynamic data app that only has one table?

     

    Thanks

    Tom 

    Monday, February 7, 2011 10:28 AM

Answers

  • User-330204900 posted

    Yes this is possible all you need to do is set the Default.aspx to redirect you to the appropriate page

    Response.Redirect(Global.DefaultModel.GetTable("MyTable").ListActionPath);

    Hope that helps [:)]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 10, 2011 6:02 PM

All replies

  • User3866881 posted

    Not understand what you mean:Would you mind clearifying your question?

    I guess you want to use FormView or DetailsView directly instead of a GridView's showing? 

    Monday, February 7, 2011 9:42 PM
  • User1103877942 posted

    Sorry for being confusing.  When I run this app the first page that comes up is the page where you have to choose the table you are wanting to see.  If I have only one table and I only want to go straight to the data, how would I bypass the first page.

    OR

    Is there a way to create a page from SQL that only shows the data with out having to create all the fields?

     

    Thanks

    Tom

    Tuesday, February 8, 2011 11:29 AM
  • User3866881 posted

    According to what you say, I think you should load data into DataSet. This is a memory-based Database storage that holds a collection of DataTa ble. You should dynamically Add DataTable full of data into the DataSet first. Then use this:

    if (DataSet1.Tables.Count>1)

    {

        //List a list of names of Tables by using DataSet1.Tables[i].TableName; In order to get the TableName successfully, you should use adapter.Fill(datatable,"Your Table Name");

    else

    {

    //this is only my sample, you should set the Table bound to a data presentation control...  

     GridView1.DataSource = DataSet1.Tables[0];
       GridView1.DataBind();

     

    }

    Wednesday, February 9, 2011 12:53 AM
  • User-330204900 posted

    Yes this is possible all you need to do is set the Default.aspx to redirect you to the appropriate page

    Response.Redirect(Global.DefaultModel.GetTable("MyTable").ListActionPath);

    Hope that helps [:)]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 10, 2011 6:02 PM