﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Using Thread read data of the gridView1 ?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 02:35:46 GMT</lastBuildDate><ttl>20</ttl><item><title>Using Thread read data of the gridView1 ?</title><link>http://forum.strataframe.net/FindPost33375.aspx</link><description>I'm writing code read data of gridView1 has got using Thread but get an error:&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;div&gt;[CODE]&lt;div&gt;//&amp;nbsp;old-style writing&lt;div&gt;if (string.IsNullOrEmpty(gridView1.GetRowCellValue(i, "Ghichu").ToString()))&lt;br/&gt;&lt;br/&gt;&lt;div&gt;//new style writing &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;div&gt;if (string.IsNullOrEmpty(GetGridCellValue(i, "Ghichu").ToString()))&lt;br/&gt;&lt;br/&gt;&lt;div&gt;//Declare complement the new style writing&lt;div&gt;public delegate void GridGetEventArg(int rowHandle, string fieldname);&lt;div&gt;private string GetGridCellValue(int row, string fieldname)&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (gridControl1.InvokeRequired)&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridGetEventArg get = new GridGetEventArg(GetGridCellValue); &amp;nbsp; //Error 1 'string Vidu.frmTinh.GetGridCellValue(int, string)' has the wrong return type&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return gridControl1.Invoke(get, new object[] { row, fieldname });//Error 2 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (gridControl1.MainView as GridView).GetRowCellValue(row, fieldname);//Error 3 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;div&gt;[/CODE]&lt;div&gt;the help you fix ?</description><pubDate>Wed, 24 Aug 2016 20:29:57 GMT</pubDate><dc:creator>Dong Trien Lam</dc:creator></item></channel></rss>