Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Components & Controls
Grids
Winforms Grids
datagrid problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Tezuka" data-source="post: 4583" data-attributes="member: 1902"><p>i managed to fill the datagrid with all the data i want but now i need to add one more column to it whereby the fields inside will be a hyperlink to send data to either a variable or to a function. i only managed to do until the adding of column. Thanks for your help. </p><p></p><p><span style="font-size: 10px"><span style="color: #0000ff">Dim</span></span><span style="font-size: 10px"> data </span><span style="font-size: 10px"><span style="color: #0000ff">As</span></span><span style="font-size: 10px"><span style="color: #0000ff">New</span></span><span style="font-size: 10px"> clsPDData</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px"></span><span style="font-size: 10px"><span style="color: #0000ff">Dim</span></span><span style="font-size: 10px"> ds </span><span style="font-size: 10px"><span style="color: #0000ff">As</span></span><span style="font-size: 10px"> DataSet = data.GetData("Select ID, Name from Pt Where ID = '" + txtSearch.Text + "'")</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px"></span><span style="font-size: 10px"><span style="color: #0000ff">Dim</span></span><span style="font-size: 10px"> dc </span><span style="font-size: 10px"><span style="color: #0000ff">As</span></span><span style="font-size: 10px"> DataColumn = </span><span style="font-size: 10px"><span style="color: #0000ff">New</span></span><span style="font-size: 10px"> DataColumn("Status")</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">ds.Tables(0).Columns.Add(dc)</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">DataGrid1.DataSource() = ds</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">DataGrid1.DataBind()</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px"></span></p></blockquote><p></p>
[QUOTE="Tezuka, post: 4583, member: 1902"] i managed to fill the datagrid with all the data i want but now i need to add one more column to it whereby the fields inside will be a hyperlink to send data to either a variable or to a function. i only managed to do until the adding of column. Thanks for your help. [size=2][color=#0000ff]Dim[/color][/size][size=2] data [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] clsPDData [/size][size=2][color=#0000ff]Dim[/color][/size][size=2] ds [/size][size=2][color=#0000ff]As[/color][/size][size=2] DataSet = data.GetData("Select ID, Name from Pt Where ID = '" + txtSearch.Text + "'") [/size][size=2][color=#0000ff]Dim[/color][/size][size=2] dc [/size][size=2][color=#0000ff]As[/color][/size][size=2] DataColumn = [/size][size=2][color=#0000ff]New[/color][/size][size=2] DataColumn("Status") ds.Tables(0).Columns.Add(dc) DataGrid1.DataSource() = ds DataGrid1.DataBind() [/size] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
Components & Controls
Grids
Winforms Grids
datagrid problem
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom