Click here to Skip to main content
16,008,719 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMapping to QBasic double precision datatype Pin
G-316-Apr-07 11:24
G-316-Apr-07 11:24 
QuestionDatagrid selection sync with fields. Pin
T-Go16-Apr-07 8:35
T-Go16-Apr-07 8:35 
AnswerRe: Datagrid selection sync with fields. Pin
klaydze17-Apr-07 23:31
klaydze17-Apr-07 23:31 
QuestionWeb Browser- Local Pin
WLugo16-Apr-07 5:15
WLugo16-Apr-07 5:15 
AnswerRe: Web Browser- Local Pin
Dave Kreskowiak17-Apr-07 1:52
mveDave Kreskowiak17-Apr-07 1:52 
QuestionDatagrid Pin
Dayekh16-Apr-07 4:21
Dayekh16-Apr-07 4:21 
AnswerRe: Datagrid Pin
Dave Kreskowiak17-Apr-07 1:51
mveDave Kreskowiak17-Apr-07 1:51 
GeneralRe: Datagrid Pin
Dayekh17-Apr-07 2:06
Dayekh17-Apr-07 2:06 
Thanks for the reply.

I was kinda hoping there is a syntatic way of changing the text of a column on the datagrid when it is displayed. One method is to use the OnItem_DataBound event and use e.item.cells(0).text = "SomeText"

BUT.. the problem is, the column's text that I am wanting to manipulate is not always present when that datagrid is produced. In addition, its position is not known. Therefore if I use e.item.cells(0).Text = "SomeText", it will not work all the time because the column's position changes depending on what columns the user chooses have as part of this datagrid.

One way I was thinking of was to use a "for" loop and say something like this:

Dim i as Int<br />
For Each e.item.cells(i).blabla .. <br />
If the column name is "ColumnName" Then<br />
Select e.item.cells(i).Text<br />
Case x<br />
e.item.cells(i).Text = "Bla"<br />
Case y<br />
e.item.cells(i).Text = "BlaBla"<br />
Case z<br />
e.item.cells(i).Text = "BlaBlaBla"<br />
End Select<br />
End If<br />
Next<br />


Another way of doing this is to change what the database returns. You see, I am supposed to be "Saving" Reports, and those reports are saved in the database as views, and retrieved whenever needed by binding data from the relevant views.
This creates a problem because the view is not always present. I will therefore have to produce code to create the views in such a way that It understands what to do if the column in question is ever selected. Both are doable I think.. but which is easier? or better? hmm...Confused | :confused:
GeneralRe: Datagrid Pin
Dave Kreskowiak17-Apr-07 3:44
mveDave Kreskowiak17-Apr-07 3:44 
GeneralRe: Datagrid Pin
Dayekh17-Apr-07 3:59
Dayekh17-Apr-07 3:59 
GeneralRe: Datagrid Pin
Dave Kreskowiak17-Apr-07 7:22
mveDave Kreskowiak17-Apr-07 7:22 
GeneralRe: Datagrid Pin
Dayekh17-Apr-07 11:12
Dayekh17-Apr-07 11:12 
QuestionHow to show video from DVR Card? Pin
somchoto16-Apr-07 4:05
somchoto16-Apr-07 4:05 
AnswerRe: How to show video from DVR Card? Pin
Dave Kreskowiak16-Apr-07 4:36
mveDave Kreskowiak16-Apr-07 4:36 
Questionvb dot net doubt Pin
shalinikannan16-Apr-07 2:12
shalinikannan16-Apr-07 2:12 
AnswerRe: vb dot net doubt Pin
kubben16-Apr-07 2:18
kubben16-Apr-07 2:18 
AnswerRe: vb dot net doubt Pin
Dave Kreskowiak16-Apr-07 3:31
mveDave Kreskowiak16-Apr-07 3:31 
QuestionConnection Error Pin
reykentj16-Apr-07 1:57
reykentj16-Apr-07 1:57 
AnswerRe: Connection Error Pin
kubben16-Apr-07 2:21
kubben16-Apr-07 2:21 
GeneralRe: Connection Error Pin
reykentj16-Apr-07 3:26
reykentj16-Apr-07 3:26 
AnswerRe: Connection Error Pin
Dave Kreskowiak16-Apr-07 3:29
mveDave Kreskowiak16-Apr-07 3:29 
GeneralRe: Connection Error Pin
reykentj16-Apr-07 4:13
reykentj16-Apr-07 4:13 
GeneralRe: Connection Error Pin
Dave Kreskowiak16-Apr-07 4:35
mveDave Kreskowiak16-Apr-07 4:35 
GeneralRe: Connection Error Pin
reykentj16-Apr-07 7:30
reykentj16-Apr-07 7:30 
QuestionImport Excel Data Pin
suveenmohan16-Apr-07 0:45
suveenmohan16-Apr-07 0:45 

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.