|
Not sure i understand the question, but perhaps you could make the first row of cells to be labels with the headings of your columns as their text. Maybe make the text bold and background different color to distinguish them from the rest of the datarows?
There are 10 types of people in this world, those who understand binary and those who don't!
|
|
|
|
|
Look at using tablestyles
Mike Lasseter
|
|
|
|
|
The .net datagrid control is total garbage!
Every one wants to sell you a datagrid control that doesn't really do what you want it to!
Can someone please point me to a free datagrid control that has an event that will tell me which row or item a user clicks on.
Please Please Please!
Thanx in advance!
There are 10 types of people in this world, those who understand binary and those who don't!
|
|
|
|
|
how can we implement different file formats in VB.Net
divya
|
|
|
|
|
By writing code that handles different file formats.
I think you are going to have to be a bit more specific if you want a better answer than the flippant response I gave above.
|
|
|
|
|
First explore yourself in MSDN; how many file formats are available in VB.NET. Which 1 u want?
I think self learning and understanding may increase your knowledge-base.
Girish
Girish Sharma
|
|
|
|
|
Girish481 wrote: self learning and understanding may increase your knowledge-base
I know that - but shouldn't you be telling the OP that?
|
|
|
|
|
Actually i want to make an application in VB.Net through which we can upload different file formats just as rtf files and more type of files and after uploading we are able to see that files
divya
|
|
|
|
|
Still too vague. Specify each file type you are interested in.
With RTF you have the option of a RichTextBox (If your application is a windows forms application) in order to show the file. If not then you are going to have to obtain the specification of RTF and provide your own means of translating the file into a viewable format.
|
|
|
|
|
I'm trying to populate a checkbox on a grid. The sub calls the procedure and populates the datagrid without error. However the checkbox does not populate with the correct values and each line shows a "checked" check box
Can you let me know how I can convert the 1 or 0 that the procedure is returning to display a check or blank in the checkbox? An outline of the code is below.
many thanks
Kerrie
Dim t As System.Data.OracleClient.OracleType
Dim r As System.Data.OracleClient.OracleDataReader
Dim aGridTableStyle1 As New DataGridTableStyle
Dim colUser_ID As New DataGridTextBoxColumn
Dim colUSER_DVD_ID As New DataGridTextBoxColumn
Dim colUSER_IFAST_ID As New DataGridTextBoxColumn
Dim colSystem_ID As New DataGridBoolColumn
aGridTableStyle1.MappingName = "T_DVD_VERI"
Me.dtgUSUsers.TableStyles.Clear()
Me.dtgUSUsers.DataBindings.Clear()
With colSystem_ID
.MappingName = "IGNORE_TRADES"
.HeaderText = "System User"
.TrueValue = 1
.FalseValue = 0
.Width = 25
End With
...
aGridTableStyle1.GridColumnStyles.Add(colSystem_ID)
Me.OracleSelectCommand1.CommandText = ....
Me.OracleConnection1.Open()
r = Me.OracleSelectCommand1.ExecuteReader()
dtgUSUsers.TableStyles.Add(aGridTableStyle1)
dtgUSUsers.DataMember = "T_DVD_VERI"
Me.OracleDataAdapter1.Fill(DataSet2, "T_DVD_VERI")
dtgUSUsers.DataSource = DataSet2
dtgUSUsers.Expand(-1)
End Sub
|
|
|
|
|
i have a datagrid in my form... it works fine when i run it from the ide but when i run it using the .exe in the deployment it doesn't work fine... i have a datagrid and it connects to an access database... during the first load after the installation it works... it connects to the database... it shows in the datagrid the data from the database... but when i edit it, the datagrid wouldn't refresh even if i close the application and run it again... but the data in the database is updated... can you please help... tnx...
|
|
|
|
|
if you could explaing your error message and only that part of code which is creating a problem would let us help you.
|
|
|
|
|
Why can't you compile and check it yourself?
Indunil_Bk wrote: this is urgent
I'd like to help but I am too lazy to Google it for you.
|
|
|
|
|
Hi
I have a combobox binded to a table in database.
Table is JobMaster in that there are 2 fields 1)JobCode 2)JobName
In the Combobox I show JobName as Display member and JobCode as Value Member.
When i make a new entry its easy to select the Jobname and JobCode is returned as selectedvalue.
But for editing i have the jobcode from the query, and i have to select the corresponding jobname...how can this be done?
Please Help
Regards
Riyaz Zujer Patanwala
I.T.Programmer
Al Jaber Energy Services
P.O.Box 47467
Abu Dhabi
U.A.E.
|
|
|
|
|
Make inner join to JobMaster table/query in your query.
|
|
|
|
|
i want to write some code in html but put it is the vb file.
How to write html in vb?? and post that html in the asp panel??
I wrote something like that....
<br />
public barchart as panel<br />
barchart = new panel<br />
<br />
Dim strContent As New System.Text.StringBuilder<br />
<br />
strContent.Append("...html...")<br />
strContent.Append("...html..")<br />
barchart.innerHTML = strContent.ToString()<br />
Is that OK?
Thx;)
-- modified at 22:20 Monday 24th July, 2006
|
|
|
|
|
Nope, that won't work. What you want is to make use of the HtmlTextWriter class. Find out more about it here[^]
Hope that helps.
|
|
|
|
|
Hi all,
I was wondering the other day how I could edit a standard toolstrip and have the change reflected globally (on any project). Looks like I succeeded... but I don't know how I did it ! OK, OK, lets say I am weird.
It is the DataNavigator I changed something in. The record count right part is of {0}. I am using VB Express 2005 English, but I live in Québec where we speek French. Some time ago, i changed of to be de. Today I realized that whatever program is running, it always shows de instead of of. Nice to me. But the thing is I don't know how I did it
I must add that when one looks at the form in the Formx.[Design] window, it shows of {0}, and it shows the same in properties (Text). If I change the text property to say sur {0}, the program displays sur total, and if I then change it bakc to of {0}, the it reverts to displaying de total.
Can someone help ?
Thanks
-- modified at 15:38 Monday 24th July, 2006
|
|
|
|
|
I stand under correction but it may be from the .resx resource file attached to your app. I assume that you have your regional settings set up for french-canadian and that your app has somehow picked up on that (you haven't done any localization/globalization to the app?).
Again, I say that I stand under correction and may be completely wrong.
|
|
|
|
|
True, my regional settings are set up for french-canadian. What bugs me is that every application is showing de instead of of, even those I downloaded from Mircosoft WEB Site yesterday.
I have not done anything in term of localization. My goal is to localize everything about the DataNavigator toolstrip (for example tooltips). If I can do it once for every application, then it's fine. For sure I have modified something somewhere, and it is spreading out. Just can't find where.
-- modified at 13:34 Tuesday 25th July, 2006
|
|
|
|
|
Hello
I'm working on a small application that uses an MS Access 2003 database with one table (tblEvents). In one section of the application, the user will fill out several fields and then click the "Submit" button. Within my Click event handler for btnSubmit, I use the following SQL query as my command text:
Dim MySQL As String = "INSERT INTO Guestbook " & _<br />
"(Planner, Location, Time, Date) VALUES " & _<br />
"('" & txtHistoryPlanner.Text & "','" & txtHistoryLocation.Text & "','" _<br />
& txtHistoryTime.Text & "','" & txtHistoryDate.Text & "')"
I took that string directly from a tutorial on the web strictly about updated rows and querying for rows out of a 2003 Access database and I'm 100% flustered because my app gives me an error stating that there is a syntax error with my INSERT INTO query.
If you know what's going on, please enlighten me! Thank you for your time.
|
|
|
|
|
Joshua Boyle wrote: I took that string directly from a tutorial on the web
Then who ever posted it should be shot! Apart from anything else it suffers from a severe susceptability from a SQL Injection Attack. Here's an article that provides a description of what a SQL Injection Attack is, how to spot code that is susceptable and what you can do to make the code safer[^]
You should use a parameterised query instead
Your string becomes:
"INSERT INFO Guestbook (Planner, Location, Time, Date) VALUES(?,?,?,?)"
And you can add the parameters like this:
myCommand.Parameters.Add("", txtHistoryPlanner.Text) ' etc.
Probably what is giving you an error is if one of the text boxes contains something that the SQL parser is misinterpreting. For example, if some piece of text contains an apostrophe the SQL parser will interpret that as the end of string and then get confused when the string continues.
|
|
|
|
|
Thank you for the response. I used your string exactly (changing "INFO" to "INTO" only and inserting my own data and this is what it looks like:
strSQL = "INSERT INTO tblEvents (Planner, Name, Date, Time, Location, Description, Attendees) VALUES(?,?,?,?,?,?,?)"
Then I create all my parameters as follows:
<br />
oleParams(0) = New OleDbParameter("Planner", cboEventPlanner.Text)<br />
oleParams(1) = New OleDbParameter("Name", txtName.Text)<br />
oleParams(2) = New OleDbParameter("Date", dtpDate.Text)<br />
oleParams(3) = New OleDbParameter("Time", txtTime.Text)<br />
oleParams(4) = New OleDbParameter("Location", txtLocation.Text)<br />
oleParams(5) = New OleDbParameter("Description", txtDescription.Text)<br />
oleParams(6) = New OleDbParameter("Attendees", strAttendees)<br />
Finally, I add the parameters as follows:
oleCommand.Parameters.AddRange(oleParams)
I have tried every kind of arrangement of the strSQL string. Additionally, I have tried adding each parameter individually instead of as a range. I even explicity declared 7 oleDbParamter objects and stuffed each one with the respective parameters. No matter what I do, it gives me the following error when the Submit button on my form is clicked:
Syntax error in INSERT INTO statement.
Any ideas what I'm doing wrong here? I'm at a complete loss.
-- modified at 9:58 Tuesday 25th July, 2006
|
|
|
|
|
FOR THE LOVE OF ALL THAT IS SACRED
I honestly feel like spooning my own eyes out with a dull pencil at present.
As it turns out, the issue was never the actual syntax, per sé, of the SQL statement but rather the usage of field names such as: "Name", "Date" and "Time". These three, for example, happen to be reserved keywords within MS Access so when I sent the statement:
strSQL = "INSERT INTO tblEvents (Planner, Name, Date, Time, Location, Description, Attendees) VALUES(?,?,?,?,?,?,?)"
Access was hiccuping on those three because it didn't know what the hell to do with them.
/sigh
Anyway, the problem was solved by simply renaming all my fields in the database by prefixing each one with a 'p' for "parameter". The program works fine now.
/me grabs a dull pencil
/me waves
|
|
|
|
|
I believe* you can also escape reserved words when they are used as column names by enclosing the column name in square brackets. e.g. [Name]
I'm primarily a SQL Server person.
|
|
|
|