Problem with DataGrid dynamically generating columns

Source: Internet
Author: User
Requirements: Dynamically generate columns based on the time period selected by the user, as follows

When the user selects the time period and clicks the ' Go ' button, how do I change the column names in the DataGrid? Ask the great God to use a simple example to guide


Reply to discussion (solution)

http://www.iteye.com/topic/1127192



data-options= "URL: ' get_salesquantityper.php ', Singleselect:true, Rownumbers:true"
>


Category




Include "t.php";
INITROWS1 ($x 1, $x 2);//initrows1 method Correct output
?>


InitRows2 ($x 1, $x 2);
?>




The container of the DataGrid is enclosed in a container, and after the query empties the DataGrid code generated by the container Easyui, Easyui does not provide a way to change the columns configuration, and there is no way to unregister the DataGrid, only by emptying the container to remove the DataGrid. If you use the Jqgrid has the ability to provide logoff Jqgrid

Click Query
$ (' #dvDataGrid '). HTML ('
 
  
  
///Refer to your other post and use Ajax to retrieve the contents of the columns and re-call $ (' #salesquantityper '). Method of DataGrid () to generate DataGrid object load columns new match and data
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.