{"id":557,"date":"2024-03-20T12:52:46","date_gmt":"2024-03-20T04:52:46","guid":{"rendered":"https:\/\/www.cuishaofeng.com\/?p=557"},"modified":"2024-10-22T14:38:23","modified_gmt":"2024-10-22T06:38:23","slug":"cxgrid-%e5%b8%b8%e7%94%a8%e5%8a%9f%e8%83%bd%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.cuishaofeng.com\/?p=557","title":{"rendered":"CXGRID \u5e38\u7528\u529f\u80fd\u8bbe\u7f6e"},"content":{"rendered":"<div id=\"core-ai-summary-tool\"><\/div>\n<p><br>\u4e00\u3001\u81ea\u52a8\u9690\u85cf\u5217<\/p>\n\n\n\n<p>OptionsCustomize.ColumnsQuickCustomization:=True<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"367\" height=\"288\" src=\"https:\/\/www.cuishaofeng.com\/wp-content\/uploads\/2024\/03\/1812875.png\" alt=\"\" class=\"wp-image-558\" srcset=\"https:\/\/www.cuishaofeng.com\/wp-content\/uploads\/2024\/03\/1812875.png 367w, https:\/\/www.cuishaofeng.com\/wp-content\/uploads\/2024\/03\/1812875-300x235.png 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/figure>\n\n\n\n<p>\u00a0\u6548\u679c\uff1a\u5982\u4e0b<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"173\" height=\"259\" src=\"https:\/\/www.cuishaofeng.com\/wp-content\/uploads\/2024\/03\/18128752.png\" alt=\"\" class=\"wp-image-559\"\/><\/figure>\n\n\n\n<p>\u4e8c\u3001\u52a8\u6001\u663e\u793a\u5168\u6709\u5217\u3001\u52a8\u6001\u6e05\u9664\u6240\u6709\u5217<\/p>\n\n\n\n<p>cxGrid1DBTableView1.DataController.CreateAllItems;<\/p>\n\n\n\n<p>\u00a0cxGrid1DBTableView1.ClearItems;<\/p>\n\n\n\n<p>OptionsView\u90e8\u5206<\/p>\n\n\n\n<p>\u662f\u5426\u4f7f\u7528\u8868\u5934\u5206\u7ec4:cxGrid1DBTableView1.OptionsView.GroupByBox<br>\u5355\u5143\u683c\u9ad8\u5ea6\u81ea\u9002\u5e94:cxGrid1DBTableView1.OptionsView.CellAutoHeight<br>\u5355\u5143\u683c\u5217\u5bbd\u81ea\u9002\u5e94cxGrid1DBTableView1.OptionsView.ColumnAutoWidth<br>\u662f\u5426\u542f\u7528\u9875\u811a:cxGrid1DBTableView1.OptionsView.Footer<br>\u662f\u5426\u542f\u7528\u8868\u5934:cxGrid1DBTableView1.OptionsView.Header<br>\u662f\u5426\u542f\u7528\u5de6\u4fa7\u6307\u793a\u5668:cxGrid1DBTableView1.OptionsView.Indicator<br>\u5de6\u4fa7\u6307\u793a\u5668\u5bbd\u5ea6:cxGrid1DBTableView1.OptionsView.IndicatorWidth<\/p>\n\n\n\n<p>TcxGridDBDataController\u90e8\u5206<\/p>\n\n\n\n<p>\u53ef\u4ee5\u6839\u636ecxGrid\u7b5b\u9009\u51fa\u6765\u7684\u6570\u636e\u6253\u5370:cxGrid1DBBandedTableView1.DataController.Filter.AutoDataSetFilter\u5c5e\u6027\u8bbe\u4e3aTrue,\u9700\u8981DataSet\u652f\u6301(FastReport\u652f\u6301)<\/p>\n\n\n\n<p>\u00a0\u8868\u683c\u62d6\u52a8\u5927\u5c0f\uff0c\u79fb\u52a8\u4f4d\u7f6e\u540e\u4fdd\u5b58\u5230ini\u6587\u4ef6<\/p>\n\n\n\n<p>\/\/\u66f4\u6539\u4f4d\u7f6e\u540e\u4fdd\u5b58<br>procedure TForm1.cxGrid1DBTableView1ColumnPosChanged(Sender: TcxGridTableView; AColumn: TcxGridColumn);<br>begin<br>cxGrid1DBTableView1.StoreToIniFile(cxGrid1DBTableView1.Name + &#8216;.ini&#8217;);<br>end;<\/p>\n\n\n\n<p>\/\/\u66f4\u6539\u5217\u5bbd\u540e\u4fdd\u5b58<br>procedure TForm1.cxGrid1DBTableView1ColumnSizeChanged(Sender: TcxGridTableView; AColumn: TcxGridColumn);<br>begin<br>cxGrid1DBTableView1.StoreToIniFile(cxGrid1DBTableView1.Name + &#8216;.ini&#8217;);<br>end;<\/p>\n\n\n\n<p>\/\/\u6839\u636e\u914d\u7f6e\u6587\u4ef6\u6062\u590d\u663e\u793a<br>procedure TForm1.FormShow(Sender: TObject);<br>begin<br>cxGrid1DBTableView1.RestoreFromIniFile(cxGrid1DBTableView1.Name + &#8216;.ini&#8217;);<br>end;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u81ea\u52a8\u9690\u85cf\u5217 OptionsCustomize.ColumnsQuickCustomization:=True \u00a0\u6548\u679c\uff1a\u5982\u4e0b \u4e8c\u3001\u52a8\u6001\u663e\u793a\u5168\u6709\u5217\u3001\u52a8\u6001\u6e05\u9664\u6240\u6709\u5217 cxGrid1DBTableView1.DataController.Cre&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[62],"topic":[],"_links":{"self":[{"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/posts\/557"}],"collection":[{"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=557"}],"version-history":[{"count":1,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions"}],"predecessor-version":[{"id":560,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions\/560"}],"wp:attachment":[{"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=557"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.cuishaofeng.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}