I did some testing and that worked great!
Thanx for all your help Sweep. I'm still working on it (The SortDirection field is for all columns when it should be an array so that each column has its own sortDirection). But here's what I've got working so far if anyone wants to see it.
Public...
That's another thing I was just thinking of...I will to try that
1. Use a dataSet to initially fetch the data.
2. When the user dbl-clicks on a column header, then convert the dataSet into a a dataView (for soting).
3. Immediately after the data is sorted, then convert this dataView back into...
Thanx again Sweep,
The dataView worked like you said...but I need to look into the whole thing again. My dataGrid gets its data from MS SQL and makes a call to it every 15 seconds. I need to do this without re-loading the dataset and the datagrid that is bound to it. In other words I do not...
How do I go about sorting a column on a Dbl-Click instead of a single click in a datagrid?
I don't want to sort on a single click but on a double click.
I've got it working by re-querying the database if the user wants to sort ascending or descending, overwriting the dataset, creating another...
Thanx Sweep for your help
I have another problem that I thought I would share with you. Whenever I add the DLL to the toolbox I get an ugly default image of some gear. Do you know how I can change that image?
As far as the initial problem goes, I finaly got it so I can manipulate the cell...
Sweep,
I'm still looking at your solution and trying to get the events so they see each other.
Here's some relevant code...I hope this helps:
UPSDatagrid
Namespace UPSControls
Public Class UPSDataGrid
Inherits System.Windows.Forms.DataGrid
Private Sub formatDataGridColumn(...)...
I have made several custom controls before but whenever I add them to the toolbox I get an ugly default image of some wheel.
How can I change this image so that my picture appears in the toolbex for that custom control.
Thanks
Good idea Sweep
I went down that road a little...but didn't get too far. I'm still too new/ignorant to get my code to work.
my custom control has three classes (but only two are important...the other is some enumeration)
The first inherits from System.Windows.Forms.DataGrid and overrides...
Great...thanx jebenson!
I was looking for a way to add to a datagrid...I've never used the Merge function of a dataset and never even thought to pursue that route. Since the dataGrid is bound to my dataset, then it makes sense that any changes in the dataset would be reflected in the datagrid...
I am creating a customized datagrid that will color a row (or cell) a certain color. So if that cell contains a Null or is somehow not valid, then that cell is colored red.
This customized datagrid is to be used by all programmers in my company...thus a customized datagrid adds consistency...
Thanx ZmrAbdulla...but that will only work for ints
I've even thought about a select statement...but that's out of the question
Here are som examples that the user can enter:
strCondition = "regionNumber < 3"
strCondition = "reportName.substring(1,0) = 'F'"
strCondition =...
I am unsure how to add rows to an existing datagrid.
IE.
When the application starts a dataTable is created from a resultset and a data grid is bound to this datatable.
The application updates every 15 seconds via another query to an MS SQL database. All new records in the database are added...
How can I convert a string into a condition?
For example, I accept a condition from the user as a string. I then apply this condition.
ie.
Dim strCondition = "3 < 4"
If (CType(strCondition, Object) = True) Then
' Perform some actions
End If
Of course this doesn't work, but where am I...
when the user opens up the application, an initial datagrid is displayed (from a datadtable populated with values from mySQLTable). This table gets updated with new rows periodically. Every 15 seconds my application should grab any new records and add them to the existing datagrid.
I am not...
I would like to add some rows to an existing datagrid. If I add rows to a new datatable and then bind this datatable to the datagrid, then the grid will refresh/reload (Since it is being recreated).
Is there anyway to add rows/values to a datagrid? Thank you for any help.
Right before I move the files, I check that they can be read from. Upon stepping through, the files can be read fine. It's not until the move command executes that I receive an error. Here's what I am doing:
Dim filePathArray() As String = System.IO.Directory.GetFiles(sourceDirectory...
I am looping through a directory and performing these actions on every file:
1. Getting the file's information via fileInfo
2. Grabbing data from MS SQL and making a dataTable
3. Reading the files via a streamReader
4. moving the file to another directory
5. Adding this a record with the file...
Thanx for that article ca8msm. Like the article I am also waiting for files to be completely downloaded before reading/searching through the file and recording some of its properties in MS SQL.
I am going through it while testing out some other fileWatcher attributes.
Right now I am using...
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.