[{"data":1,"prerenderedAt":812},["ShallowReactive",2],{"content-query-LjTkaqgWWN":3,"navigation":464},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"date":9,"body":10,"_type":457,"_id":458,"_source":459,"_file":460,"_stem":461,"_extension":462,"sitemap":463},"/document/how-to/fill-grid-with-datatable","how-to",false,"","DataTableでスプレッドシートを埋める","2014-06-10",{"type":11,"children":12,"toc":453},"root",[13,21,41,171,176,188,447],{"type":14,"tag":15,"props":16,"children":18},"element","h2",{"id":17},"現在のバージョン",[19],{"type":20,"value":17},"text",{"type":14,"tag":22,"props":23,"children":24},"p",{},[25,32,34,39],{"type":14,"tag":26,"props":27,"children":29},"code",{"className":28},[],[30],{"type":20,"value":31},"DataTable",{"type":20,"value":33},"からのデータ読み取りは、ReoGridコアでサポートされています。スプレッドシート上の任意の位置に",{"type":14,"tag":26,"props":35,"children":37},{"className":36},[],[38],{"type":20,"value":31},{"type":20,"value":40},"を設定できます。",{"type":14,"tag":42,"props":43,"children":47},"pre",{"className":44,"code":45,"language":46,"meta":7,"style":7},"language-cs shiki shiki-themes github-light github-dark github-light","var adapter = new DataSet1TableAdapters.MyTableAdapter();\nvar dt = adapter.GetData();\n\nworksheet[\"A1\"] = dt;\n","cs",[48],{"type":14,"tag":26,"props":49,"children":50},{"__ignoreMap":7},[51,100,131,141],{"type":14,"tag":52,"props":53,"children":56},"span",{"class":54,"line":55},"line",1,[57,63,69,74,79,84,90,95],{"type":14,"tag":52,"props":58,"children":60},{"style":59},"--shiki-light:#D73A49;--shiki-dark:#F97583;--shiki-default:#D73A49",[61],{"type":20,"value":62},"var",{"type":14,"tag":52,"props":64,"children":66},{"style":65},"--shiki-light:#6F42C1;--shiki-dark:#B392F0;--shiki-default:#6F42C1",[67],{"type":20,"value":68}," adapter",{"type":14,"tag":52,"props":70,"children":71},{"style":59},[72],{"type":20,"value":73}," =",{"type":14,"tag":52,"props":75,"children":76},{"style":59},[77],{"type":20,"value":78}," new",{"type":14,"tag":52,"props":80,"children":81},{"style":65},[82],{"type":20,"value":83}," DataSet1TableAdapters",{"type":14,"tag":52,"props":85,"children":87},{"style":86},"--shiki-light:#24292E;--shiki-dark:#E1E4E8;--shiki-default:#24292E",[88],{"type":20,"value":89},".",{"type":14,"tag":52,"props":91,"children":92},{"style":65},[93],{"type":20,"value":94},"MyTableAdapter",{"type":14,"tag":52,"props":96,"children":97},{"style":86},[98],{"type":20,"value":99},"();\n",{"type":14,"tag":52,"props":101,"children":103},{"class":54,"line":102},2,[104,108,113,117,122,127],{"type":14,"tag":52,"props":105,"children":106},{"style":59},[107],{"type":20,"value":62},{"type":14,"tag":52,"props":109,"children":110},{"style":65},[111],{"type":20,"value":112}," dt",{"type":14,"tag":52,"props":114,"children":115},{"style":59},[116],{"type":20,"value":73},{"type":14,"tag":52,"props":118,"children":119},{"style":86},[120],{"type":20,"value":121}," adapter.",{"type":14,"tag":52,"props":123,"children":124},{"style":65},[125],{"type":20,"value":126},"GetData",{"type":14,"tag":52,"props":128,"children":129},{"style":86},[130],{"type":20,"value":99},{"type":14,"tag":52,"props":132,"children":134},{"class":54,"line":133},3,[135],{"type":14,"tag":52,"props":136,"children":138},{"emptyLinePlaceholder":137},true,[139],{"type":20,"value":140},"\n",{"type":14,"tag":52,"props":142,"children":144},{"class":54,"line":143},4,[145,150,156,161,166],{"type":14,"tag":52,"props":146,"children":147},{"style":86},[148],{"type":20,"value":149},"worksheet[",{"type":14,"tag":52,"props":151,"children":153},{"style":152},"--shiki-light:#032F62;--shiki-dark:#9ECBFF;--shiki-default:#032F62",[154],{"type":20,"value":155},"\"A1\"",{"type":14,"tag":52,"props":157,"children":158},{"style":86},[159],{"type":20,"value":160},"] ",{"type":14,"tag":52,"props":162,"children":163},{"style":59},[164],{"type":20,"value":165},"=",{"type":14,"tag":52,"props":167,"children":168},{"style":86},[169],{"type":20,"value":170}," dt;\n",{"type":14,"tag":15,"props":172,"children":174},{"id":173},"以前のバージョン",[175],{"type":20,"value":173},{"type":14,"tag":22,"props":177,"children":178},{},[179,181,186],{"type":20,"value":180},"以前のバージョンでは、ReoGridは",{"type":14,"tag":26,"props":182,"children":184},{"className":183},[],[185],{"type":20,"value":31},{"type":20,"value":187},"からデータを直接読み取ることができませんでした。データをセルに1つずつコピーする必要がありました。",{"type":14,"tag":42,"props":189,"children":191},{"className":44,"code":190,"language":46,"meta":7,"style":7},"// get a DataTable from database\nvar adapter = new DataSet1TableAdapters.MyTableAdapter();\nvar dt = adapter.GetData();\n\n// iterate to copy all cells\nfor (int row = 0; row \u003C dt.Rows.Count; row++)\n{\n  for (int col = 0; col \u003C dt.Columns.Count; col++)\n  {\n     grid[row, col] = dt.Rows[row][col];\n  }\n}\n",[192],{"type":14,"tag":26,"props":193,"children":194},{"__ignoreMap":7},[195,204,239,266,273,282,341,350,402,411,429,438],{"type":14,"tag":52,"props":196,"children":197},{"class":54,"line":55},[198],{"type":14,"tag":52,"props":199,"children":201},{"style":200},"--shiki-light:#6A737D;--shiki-dark:#6A737D;--shiki-default:#6A737D",[202],{"type":20,"value":203},"// get a DataTable from database\n",{"type":14,"tag":52,"props":205,"children":206},{"class":54,"line":102},[207,211,215,219,223,227,231,235],{"type":14,"tag":52,"props":208,"children":209},{"style":59},[210],{"type":20,"value":62},{"type":14,"tag":52,"props":212,"children":213},{"style":65},[214],{"type":20,"value":68},{"type":14,"tag":52,"props":216,"children":217},{"style":59},[218],{"type":20,"value":73},{"type":14,"tag":52,"props":220,"children":221},{"style":59},[222],{"type":20,"value":78},{"type":14,"tag":52,"props":224,"children":225},{"style":65},[226],{"type":20,"value":83},{"type":14,"tag":52,"props":228,"children":229},{"style":86},[230],{"type":20,"value":89},{"type":14,"tag":52,"props":232,"children":233},{"style":65},[234],{"type":20,"value":94},{"type":14,"tag":52,"props":236,"children":237},{"style":86},[238],{"type":20,"value":99},{"type":14,"tag":52,"props":240,"children":241},{"class":54,"line":133},[242,246,250,254,258,262],{"type":14,"tag":52,"props":243,"children":244},{"style":59},[245],{"type":20,"value":62},{"type":14,"tag":52,"props":247,"children":248},{"style":65},[249],{"type":20,"value":112},{"type":14,"tag":52,"props":251,"children":252},{"style":59},[253],{"type":20,"value":73},{"type":14,"tag":52,"props":255,"children":256},{"style":86},[257],{"type":20,"value":121},{"type":14,"tag":52,"props":259,"children":260},{"style":65},[261],{"type":20,"value":126},{"type":14,"tag":52,"props":263,"children":264},{"style":86},[265],{"type":20,"value":99},{"type":14,"tag":52,"props":267,"children":268},{"class":54,"line":143},[269],{"type":14,"tag":52,"props":270,"children":271},{"emptyLinePlaceholder":137},[272],{"type":20,"value":140},{"type":14,"tag":52,"props":274,"children":276},{"class":54,"line":275},5,[277],{"type":14,"tag":52,"props":278,"children":279},{"style":200},[280],{"type":20,"value":281},"// iterate to copy all cells\n",{"type":14,"tag":52,"props":283,"children":285},{"class":54,"line":284},6,[286,291,296,301,306,310,316,321,326,331,336],{"type":14,"tag":52,"props":287,"children":288},{"style":59},[289],{"type":20,"value":290},"for",{"type":14,"tag":52,"props":292,"children":293},{"style":86},[294],{"type":20,"value":295}," (",{"type":14,"tag":52,"props":297,"children":298},{"style":59},[299],{"type":20,"value":300},"int",{"type":14,"tag":52,"props":302,"children":303},{"style":65},[304],{"type":20,"value":305}," row",{"type":14,"tag":52,"props":307,"children":308},{"style":59},[309],{"type":20,"value":73},{"type":14,"tag":52,"props":311,"children":313},{"style":312},"--shiki-light:#005CC5;--shiki-dark:#79B8FF;--shiki-default:#005CC5",[314],{"type":20,"value":315}," 0",{"type":14,"tag":52,"props":317,"children":318},{"style":86},[319],{"type":20,"value":320},"; row ",{"type":14,"tag":52,"props":322,"children":323},{"style":59},[324],{"type":20,"value":325},"\u003C",{"type":14,"tag":52,"props":327,"children":328},{"style":86},[329],{"type":20,"value":330}," dt.Rows.Count; row",{"type":14,"tag":52,"props":332,"children":333},{"style":59},[334],{"type":20,"value":335},"++",{"type":14,"tag":52,"props":337,"children":338},{"style":86},[339],{"type":20,"value":340},")\n",{"type":14,"tag":52,"props":342,"children":344},{"class":54,"line":343},7,[345],{"type":14,"tag":52,"props":346,"children":347},{"style":86},[348],{"type":20,"value":349},"{\n",{"type":14,"tag":52,"props":351,"children":353},{"class":54,"line":352},8,[354,359,363,367,372,376,380,385,389,394,398],{"type":14,"tag":52,"props":355,"children":356},{"style":59},[357],{"type":20,"value":358},"  for",{"type":14,"tag":52,"props":360,"children":361},{"style":86},[362],{"type":20,"value":295},{"type":14,"tag":52,"props":364,"children":365},{"style":59},[366],{"type":20,"value":300},{"type":14,"tag":52,"props":368,"children":369},{"style":65},[370],{"type":20,"value":371}," col",{"type":14,"tag":52,"props":373,"children":374},{"style":59},[375],{"type":20,"value":73},{"type":14,"tag":52,"props":377,"children":378},{"style":312},[379],{"type":20,"value":315},{"type":14,"tag":52,"props":381,"children":382},{"style":86},[383],{"type":20,"value":384},"; col ",{"type":14,"tag":52,"props":386,"children":387},{"style":59},[388],{"type":20,"value":325},{"type":14,"tag":52,"props":390,"children":391},{"style":86},[392],{"type":20,"value":393}," dt.Columns.Count; col",{"type":14,"tag":52,"props":395,"children":396},{"style":59},[397],{"type":20,"value":335},{"type":14,"tag":52,"props":399,"children":400},{"style":86},[401],{"type":20,"value":340},{"type":14,"tag":52,"props":403,"children":405},{"class":54,"line":404},9,[406],{"type":14,"tag":52,"props":407,"children":408},{"style":86},[409],{"type":20,"value":410},"  {\n",{"type":14,"tag":52,"props":412,"children":414},{"class":54,"line":413},10,[415,420,424],{"type":14,"tag":52,"props":416,"children":417},{"style":86},[418],{"type":20,"value":419},"     grid[row, col] ",{"type":14,"tag":52,"props":421,"children":422},{"style":59},[423],{"type":20,"value":165},{"type":14,"tag":52,"props":425,"children":426},{"style":86},[427],{"type":20,"value":428}," dt.Rows[row][col];\n",{"type":14,"tag":52,"props":430,"children":432},{"class":54,"line":431},11,[433],{"type":14,"tag":52,"props":434,"children":435},{"style":86},[436],{"type":20,"value":437},"  }\n",{"type":14,"tag":52,"props":439,"children":441},{"class":54,"line":440},12,[442],{"type":14,"tag":52,"props":443,"children":444},{"style":86},[445],{"type":20,"value":446},"}\n",{"type":14,"tag":448,"props":449,"children":450},"style",{},[451],{"type":20,"value":452},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":102,"depth":102,"links":454},[455,456],{"id":17,"depth":102,"text":17},{"id":173,"depth":102,"text":173},"markdown","content:document:16.how-to:3.fill-grid-with-datatable.md","content","document/16.how-to/3.fill-grid-with-datatable.md","document/16.how-to/3.fill-grid-with-datatable","md",{"loc":4},[465,788,791,794,797,800,803,806,809],{"title":466,"_path":467,"children":468},"Document","/document",[469,480,485,517,534,563,595,615,629,652,663,679,702,713,733,753,780],{"title":470,"_path":471,"children":472},"はじめに","/document/getting-started",[473,474,477],{"title":470,"_path":471},{"title":475,"_path":476},"インストール","/document/getting-started/installation",{"title":478,"_path":479},"V3 から V4 への移行ガイド","/document/getting-started/migrate-from-v3",{"title":481,"_path":482,"children":483},"ワークブック","/document/workbook",[484],{"title":481,"_path":482},{"title":486,"_path":487,"children":488},"ワークシート","/document/worksheet",[489,490,493,496,499,502,505,508,511,514],{"title":486,"_path":487},{"title":491,"_path":492},"行、列、ヘッダー","/document/worksheet/row-and-column",{"title":494,"_path":495},"範囲","/document/worksheet/range",{"title":497,"_path":498},"名前付き範囲","/document/worksheet/named-range",{"title":500,"_path":501},"セルの結合と解除","/document/worksheet/merge-and-unmerge",{"title":503,"_path":504},"パーシャルグリッド","/document/worksheet/partial-grid",{"title":506,"_path":507},"複数行ヘッダー","/document/worksheet/multiple-row-header",{"title":509,"_path":510},"ウィンドウ枠の固定","/document/worksheet/freeze",{"title":512,"_path":513},"ズーム","/document/worksheet/zoom",{"title":515,"_path":516},"設定とオプション","/document/worksheet/settings",{"title":518,"_path":519,"children":520},"選択とナビゲーション","/document/selection",[521,522,525,528,531],{"title":518,"_path":519},{"title":523,"_path":524},"フォーカスと選択","/document/selection/selection",{"title":526,"_path":527},"範囲の選択","/document/selection/pick-range",{"title":529,"_path":530},"クリップボード","/document/selection/clipboard",{"title":532,"_path":533},"テキスト検索","/document/selection/text-search",{"title":535,"_path":536,"children":537},"データ管理","/document/data",[538,539,542,545,548,551,554,557,560],{"title":535,"_path":536},{"title":540,"_path":541},"データソース","/document/data/datasource",{"title":543,"_path":544},"データフィルタリング","/document/data/data-filtering",{"title":546,"_path":547},"組み込みオートフィルター","/document/data/builtin-autofilter",{"title":549,"_path":550},"条件付きフィルター","/document/data/conditional-filter",{"title":552,"_path":553},"条件付きスタイル","/document/data/conditional-styles",{"title":555,"_path":556},"グループとアウトライン","/document/data/group-and-outline",{"title":558,"_path":559},"データバリデーション","/document/data/data-validation",{"title":561,"_path":562},"保護とロック","/document/data/protection",{"title":564,"_path":565,"children":566},"セル","/document/cell",[567,568,571,574,577,580,583,586,589,592],{"title":564,"_path":565},{"title":569,"_path":570},"セルの編集","/document/cell/cell-edit",{"title":572,"_path":573},"スタイル","/document/cell/style",{"title":575,"_path":576},"罫線","/document/cell/border",{"title":578,"_path":579},"データ書式","/document/cell/data-format",{"title":581,"_path":582},"カスタムデータフォーマッター","/document/cell/custom-data-formatter",{"title":584,"_path":585},"データ連続入力","/document/cell/auto-fill",{"title":587,"_path":588},"リッチフォーマットテキスト","/document/cell/rich-format-text",{"title":590,"_path":591},"セルテキストの回転","/document/cell/rotate-cell-text",{"title":593,"_path":594},"セルの反復処理","/document/cell/iterate-cells",{"title":596,"_path":597,"children":598},"セルタイプ","/document/cell-types",[599,600,603,606,609,612],{"title":596,"_path":597},{"title":601,"_path":602},"組み込みセルタイプ","/document/cell-types/built-in-cell-types",{"title":604,"_path":605},"カスタムセル","/document/cell-types/custom-cell",{"title":607,"_path":608},"ドロップダウンリストセル","/document/cell-types/dropdown-list-cell",{"title":610,"_path":611},"コンボリストセル","/document/cell-types/combo-list-cell",{"title":613,"_path":614},"列全体のセルタイプ","/document/cell-types/cells-type-for-entire-column",{"title":616,"_path":617,"children":618},"数式","/document/formula",[619,620,623,626],{"title":616,"_path":617},{"title":621,"_path":622},"カスタム関数","/document/formula/custom-function",{"title":624,"_path":625},"数式関数","/document/formula/formula-functions",{"title":627,"_path":628},"VLOOKUP","/document/formula/vlookup",{"title":630,"_path":631,"children":632},"チャート","/document/chart",[633,634,637,640,643,646,649],{"title":630,"_path":631},{"title":635,"_path":636},"縦棒グラフ","/document/chart/column-chart",{"title":638,"_path":639},"横棒グラフ","/document/chart/bar-chart",{"title":641,"_path":642},"折れ線グラフ","/document/chart/line-chart",{"title":644,"_path":645},"面グラフ","/document/chart/area-chart",{"title":647,"_path":648},"2D円グラフ","/document/chart/pie-2d-chart",{"title":650,"_path":651},"ドーナツグラフ","/document/chart/doughnut-chart",{"title":653,"_path":654,"children":655},"フローティングオブジェクト","/document/floating",[656,657,660],{"title":653,"_path":654},{"title":658,"_path":659},"描画シェイプ","/document/floating/drawing-shapes",{"title":661,"_path":662},"フローティング画像","/document/floating/floating-image",{"title":664,"_path":665,"children":666},"イベント","/document/events",[667,668,670,673,676],{"title":664,"_path":665},{"title":664,"_path":669},"/document/events/events",{"title":671,"_path":672},"キーボードイベント","/document/events/keyboard-events",{"title":674,"_path":675},"マウスイベント","/document/events/mouse-events",{"title":677,"_path":678},"SelectionRangeChanged","/document/events/selection-events",{"title":680,"_path":681,"children":682},"カスタマイズ","/document/customization",[683,684,687,690,693,696,699],{"title":680,"_path":681},{"title":685,"_path":686},"コントロールの外観","/document/customization/control-appearance",{"title":688,"_path":689},"シートタブコントロール","/document/customization/sheet-tab-control",{"title":691,"_path":692},"使用可能なホットキー","/document/customization/hot-keys",{"title":694,"_path":695},"言語ローカライズ","/document/customization/language-localization",{"title":697,"_path":698},"アドレスバーと数式バー","/document/customization/formula-bar",{"title":700,"_path":701},"ReoGridEditor","/document/customization/editor",{"title":703,"_path":704,"children":705},"アクション","/document/actions",[706,707,710],{"title":703,"_path":704},{"title":708,"_path":709},"ReoGridアクションフレームワーク","/document/actions/actions",{"title":711,"_path":712},"組み込みワークシートアクション","/document/actions/built-in-actions",{"title":714,"_path":715,"children":716},"ファイル形式","/document/io",[717,718,721,724,727,730],{"title":714,"_path":715},{"title":719,"_path":720},"Excelファイル形式 (xlsx)","/document/io/excel-file-format",{"title":722,"_path":723},"CSV形式","/document/io/csv-format",{"title":725,"_path":726},"RGF形式","/document/io/rgf-format",{"title":728,"_path":729},"Excel形式とRGF形式の違い","/document/io/difference-between-excel-and-rgf-format",{"title":731,"_path":732},"HTMLとしてエクスポート","/document/io/export-as-html",{"title":734,"_path":735,"children":736},"高度な機能","/document/advanced",[737,738,741,744,747,750],{"title":734,"_path":735},{"title":739,"_path":740},"メモリワークブック","/document/advanced/memory-workbook",{"title":742,"_path":743},"ページングと印刷","/document/advanced/paging-and-print",{"title":745,"_path":746},"コントロールのリセット","/document/advanced/reset-control",{"title":748,"_path":749},"パフォーマンス","/document/advanced/performance",{"title":751,"_path":752},"設定","/document/advanced/settings",{"title":754,"_path":755,"children":756},"ハウツーガイド","/document/how-to",[757,758,761,762,765,768,771,774,777],{"title":754,"_path":755},{"title":759,"_path":760},"ReoGridの推奨プラクティス","/document/how-to/recommended-practice-for-using-reogrid",{"title":8,"_path":4},{"title":763,"_path":764},"遅延読み込みモードによる大量データの高速読み込み","/document/how-to/fast-load-large-data-with-lazy-load-mode",{"title":766,"_path":767},"カスタムドロップダウンセルの作成","/document/how-to/create-custom-drop-down-cell",{"title":769,"_path":770},"日付ピッカーセルの作成","/document/how-to/create-date-picker-cell",{"title":772,"_path":773},"Excelファイルからすべての画像を読み取る","/document/how-to/read-all-images-from-excel-file",{"title":775,"_path":776},"VB.NETでReoGridを使用するためのヒント","/document/how-to/use-reogrid-in-vb-net",{"title":778,"_path":779},"全選択チェックボックスヘッダーの作成","/document/how-to/create-select-all-checkbox-header",{"title":781,"_path":782,"children":783},"トラブルシューティング","/document/troubleshooting",[784,785],{"title":781,"_path":782},{"title":786,"_path":787},"PInvoke例外の修正","/document/troubleshooting/fix-pinvoke-exception",{"title":789,"_path":790},"エディション・機能一覧","/editions-features",{"title":792,"_path":793},"個人情報保護方針","/privacy-policy",{"title":795,"_path":796},"動作環境","/requirements",{"title":798,"_path":799},"ReoGrid利用許諾契約書","/terms",{"title":801,"_path":802},"ReoGrid利用許諾契約書(Ver.3)","/terms-v3",{"title":804,"_path":805},"ReoGrid利用許諾契約書(Ver.4)","/terms-v4",{"title":807,"_path":808},"ReoGrid 4 トライアルライセンスポリシー","/terms-v4-trial",{"title":810,"_path":811},"ReoGrid Web Edition 利用許諾契約書","/terms-web",1786025059132]