Click here to Skip to main content
15,886,794 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionProblem while deployment of Application having Crystal Report Pin
priya_p23314-Feb-07 19:12
priya_p23314-Feb-07 19:12 
QuestionAdd Checkbox to DataGridView at code behind. Pin
cheeken2u14-Feb-07 19:01
cheeken2u14-Feb-07 19:01 
AnswerRe: Add Checkbox to DataGridView at code behind. Pin
Marcus J. Smith15-Feb-07 2:06
professionalMarcus J. Smith15-Feb-07 2:06 
QuestionRe: Add Checkbox to DataGridView at code behind. Pin
priya_p23315-Feb-07 18:24
priya_p23315-Feb-07 18:24 
AnswerRe: Add Checkbox to DataGridView at code behind. Pin
Marcus J. Smith19-Feb-07 2:43
professionalMarcus J. Smith19-Feb-07 2:43 
QuestionBinding datagrid to collection class Pin
jazzyjboombox14-Feb-07 17:51
jazzyjboombox14-Feb-07 17:51 
AnswerRe: Binding datagrid to collection class Pin
Johan Hakkesteegt14-Feb-07 19:50
Johan Hakkesteegt14-Feb-07 19:50 
GeneralRe: Binding datagrid to collection class Pin
jazzyjboombox15-Feb-07 9:44
jazzyjboombox15-Feb-07 9:44 
Hi Johan,

Thanks for your reply. I'm pretty new to VB.net so I apologise if I'm slow to catch on.

I am currently using the DataGridTableStyle and DataGridTextBoxColumm classes to modify the appearance of the datagrid but this doesn't seem to work. Is this the same as mapping to the TableStyle and GridStyleColumm classes you refer to?

My code is as follows:

Dim ts As DataGridTableStyle = New DataGridTableStyle
ts.MappingName = Clients.ActiveRecord.Branchs.MappingName
ts.AlternatingBackColor = System.Drawing.Color.LightBlue

Dim BranchIDColumn As New DataGridTextBoxColumn
BranchIDColumn.MappingName = "BranchID"
BranchIDColumn.HeaderText = "Branch ID"
BranchIDColumn.Width = 0

Dim BranchNameColumn As New DataGridTextBoxColumn
BranchNameColumn.MappingName = "Name"
BranchNameColumn.HeaderText = "Name"
BranchNameColumn.Width = 1000

Dim ClientIDColumn As New DataGridTextBoxColumn
ClientIDColumn.MappingName = "ClientID"
ClientIDColumn.HeaderText = "Client ID"
ClientIDColumn.Width = 0

Dim BranchDateColumn As New DataGridTextBoxColumn
BranchDateColumn.MappingName = "ModifiedDate"
BranchDateColumn.HeaderText = "Modified Date"
BranchDateColumn.Width = 0

' Adds the column styles to the grid table style.
ts.GridColumnStyles.Add(BranchIDColumn)
ts.GridColumnStyles.Add(BranchNameColumn)
ts.GridColumnStyles.Add(ClientIDColumn)
ts.GridColumnStyles.Add(BranchDateColumn)

' Add the table style to the collection, but clear the
' collection first.
Me.datBranchs.TableStyles.Clear()
Me.datBranchs.TableStyles.Add(ts)

' set datasource and hide columns
Me.datBranchs.SetDataBinding(Clients.ActiveRecord.Branchs.DataSource, "")

I have moved the SetDataBinding method to before I create the DataGridTableStyle and to the end where it currently is to see if that is the problem but all columns are visible even though I have set some to 0.

The mapping name is a string that is the class name of the objects stored in the collection ie. "clsBranch[]"

Thanks for any help you can provide.

DavidSmile | :) Smile | :)
GeneralRe: Binding datagrid to collection class Pin
Johan Hakkesteegt19-Feb-07 20:13
Johan Hakkesteegt19-Feb-07 20:13 
GeneralBinding datagrid to collection class Pin
jazzyjboombox22-Feb-07 9:50
jazzyjboombox22-Feb-07 9:50 
GeneralBinding datagrid to collection class Pin
jazzyjboombox3-Mar-07 22:28
jazzyjboombox3-Mar-07 22:28 
GeneralRe: Binding datagrid to collection class Pin
Johan Hakkesteegt4-Mar-07 21:12
Johan Hakkesteegt4-Mar-07 21:12 
GeneralRe: Binding datagrid to collection class Pin
jazzyjboombox4-Mar-07 22:03
jazzyjboombox4-Mar-07 22:03 
QuestionGrid Filtering Pin
rrrriiizz14-Feb-07 17:01
rrrriiizz14-Feb-07 17:01 
AnswerRe: Grid Filtering Pin
Marcus J. Smith15-Feb-07 2:00
professionalMarcus J. Smith15-Feb-07 2:00 
GeneralRe: Grid Filtering Pin
rrrriiizz16-Feb-07 17:24
rrrriiizz16-Feb-07 17:24 
GeneralRe: Grid Filtering Pin
Marcus J. Smith18-Feb-07 4:07
professionalMarcus J. Smith18-Feb-07 4:07 
GeneralRe: Grid Filtering Pin
rrrriiizz18-Feb-07 22:39
rrrriiizz18-Feb-07 22:39 
GeneralRe: Grid Filtering Pin
Marcus J. Smith19-Feb-07 2:44
professionalMarcus J. Smith19-Feb-07 2:44 
QuestionRe: Grid Filtering Pin
rrrriiizz21-Feb-07 21:39
rrrriiizz21-Feb-07 21:39 
AnswerRe: Grid Filtering Pin
Marcus J. Smith23-Feb-07 5:04
professionalMarcus J. Smith23-Feb-07 5:04 
QuestionData table??????? Pin
nawalage14-Feb-07 16:45
nawalage14-Feb-07 16:45 
AnswerRe: Data table??????? Pin
Christian Graus14-Feb-07 16:49
protectorChristian Graus14-Feb-07 16:49 
QuestionHow to read Excel in vb.net Pin
chaiotali14-Feb-07 16:43
chaiotali14-Feb-07 16:43 
AnswerRe: How to read Excel in vb.net Pin
Christian Graus14-Feb-07 16:51
protectorChristian Graus14-Feb-07 16:51 

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.