Click here to Skip to main content
15,926,035 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: working with large textfiles over the network Pin
Are Jay5-Dec-06 18:03
Are Jay5-Dec-06 18:03 
AnswerRe: working with large textfiles over the network Pin
milkyjoe5-Dec-06 23:06
milkyjoe5-Dec-06 23:06 
QuestionHelp me with weird datagrid checkbox problem Pin
Kenshino5-Dec-06 3:21
Kenshino5-Dec-06 3:21 
AnswerRe: Help me with weird datagrid checkbox problem Pin
Kevin Nicol5-Dec-06 3:53
Kevin Nicol5-Dec-06 3:53 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kenshino5-Dec-06 4:28
Kenshino5-Dec-06 4:28 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kevin Nicol5-Dec-06 5:18
Kevin Nicol5-Dec-06 5:18 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kenshino5-Dec-06 5:29
Kenshino5-Dec-06 5:29 
AnswerRe: Help me with weird datagrid checkbox problem Pin
Kevin Nicol5-Dec-06 6:17
Kevin Nicol5-Dec-06 6:17 
ok This is how I would do that. Lets say you have a datatable (courseTable) with one column (A course ID).

First add a second column to the table
<br />
courseTable.columns.add(new dataColumn("Delete"))<br />


Setup the tablestyle for the bool column

<br />
Dim style As New DataGridTableStyle<br />
style.GridColumnStyles.Clear()<br />
style.MappingName = courseTable.TableName<br />
<br />
Dim col As New DataGridBoolColumn<br />
col.MappingName = "Delete"<br />
col.HeaderText = "Delete"<br />
col.AllowNull = False<br />
style.GridColumnStyles.Add(col)<br />
<br />
DataGrid1.TableStyles.Add(style)<br />
DataGrid1.DataSource = courseTable<br />


now you have the right setup for the bool column, just display it by adding rows to the datatable somehow from the database.

so in your confirm button routine just check for deletes

<br />
For Each row As DataRow In courseTable.Rows<br />
  If row.Item("Delete") Then<br />
     'This row was ticked so perform a delete<br />
  End If<br />
Next<br />



That should do it for you
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kenshino5-Dec-06 10:08
Kenshino5-Dec-06 10:08 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kapil Thakur6-Dec-06 1:06
Kapil Thakur6-Dec-06 1:06 
AnswerRe: Help me with weird datagrid checkbox problem Pin
Kapil Thakur5-Dec-06 20:53
Kapil Thakur5-Dec-06 20:53 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kenshino5-Dec-06 23:57
Kenshino5-Dec-06 23:57 
GeneralRe: Help me with weird datagrid checkbox problem Pin
Kapil Thakur6-Dec-06 1:01
Kapil Thakur6-Dec-06 1:01 
QuestionHelp me tune up this class, pls Pin
king gamo5-Dec-06 3:05
king gamo5-Dec-06 3:05 
AnswerRe: Help me tune up this class, pls Pin
Guffa5-Dec-06 5:15
Guffa5-Dec-06 5:15 
Questionclick in datagrid's cell Pin
Smithers-Jones5-Dec-06 2:17
Smithers-Jones5-Dec-06 2:17 
AnswerRe: click in datagrid's cell Pin
Kevin Nicol5-Dec-06 3:01
Kevin Nicol5-Dec-06 3:01 
GeneralRe: click in datagrid's cell Pin
Smithers-Jones5-Dec-06 5:30
Smithers-Jones5-Dec-06 5:30 
QuestionNEED HELP NOW Pin
luna_harp5-Dec-06 2:10
luna_harp5-Dec-06 2:10 
AnswerRe: NEED HELP NOW [modified] Pin
ludoder5-Dec-06 2:59
ludoder5-Dec-06 2:59 
QuestionVisual Basic Script..(VBS) at Wincc Pin
TURKERWEB5-Dec-06 1:16
TURKERWEB5-Dec-06 1:16 
AnswerRe: Visual Basic Script..(VBS) at Wincc Pin
Dave Kreskowiak5-Dec-06 14:36
mveDave Kreskowiak5-Dec-06 14:36 
GeneralRe: Visual Basic Script..(VBS) at Wincc Pin
TURKERWEB5-Dec-06 21:04
TURKERWEB5-Dec-06 21:04 
QuestionI need help Pin
Derar Ziad5-Dec-06 0:49
Derar Ziad5-Dec-06 0:49 
AnswerRe: I need help Pin
Tamimi - Code5-Dec-06 1:03
Tamimi - Code5-Dec-06 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.