Pro Cycling Manager is a nice tool to play games. It has 3D game engine which is not extended and overhauled. Race decors are created from true-life geographical data and enhanced with lighting and shading effects, for a stunning race experience.
Apex True Dbgrid Pro 7.0
Hangover Helper Pro is your only true friend when you wake up somewhere unknown, with a hangover, after attending a social event involving consumption of alcoholic beverages. The easy and headache friendly panorama-layout starts out by letting you
---------------------- RE: Question on Component One grid bigfoot (Programmer)(OP)12 Jan 05 11:47Code does not work.This is for the flex grid. Am I using the wrong control?I'm using True DBGrid. RE: Question on Component One grid ThatRickGuy (Programmer)12 Jan 05 11:49doh, sorry my bust, yeah, the above code is for a flex grid. I may be able to get some true DBGrid code, but it'll be a while.-Rick ---------------------- RE: Question on Component One grid bigfoot (Programmer)(OP)12 Jan 05 12:11Thank you so much. I can wait a bit. I'm going out for lunch.BTW: Is flex grid better? Can I display icons in it? Can it do multo rows? I don't need in cell editing. RE: Question on Component One grid ThatRickGuy (Programmer)12 Jan 05 13:52I haven't had much experience with the True grid. So I can't say one is 'better' than the other. Expecially because they likely do different things. Is a Hammer 'better' then a screwdriver? Each control is a tool, there are some jobs a tool can do very well, some jobs a tool can't do very well, and some jobs that just shouldn't be done with a tool. Picking the right tool for the job is part of the design, and usinging the correct tool can save you loads of time in developement.That being said, I love the C1.flex grid. I use it mostly for displaying large amounts of related data. Often in search returns. Another inhouse project the developers used a C1.flex grid in tree view format to replace the standard microsoft TreeView control. By using the Flex grid they managed to avoid several issues they had run into with the TreeView. Had they used the Flexgrid from the get go, they would have saved about 20 hours dev time on trying to correct issues with the treeview, and the redesign time of implimenting the flexgrid.But if the tool you are using doesn't do what you need it to, take a quick look arround and see if there is a tool that does do what you need. A $100 license is much cheaper then a week's worth of dev time.Back to the mater at hand, I'm not sure what you mean by multo rows, but I know the Flexgrid can handle Icons.-Rick ---------------------- RE: Question on Component One grid bigfoot (Programmer)(OP)12 Jan 05 14:58Sorry, that should have been multi rows. Where you have 30 rows loaded and there is a plus sign on the left side where toy can close the group down to 4 rows. Then they have plus signs ther instead for opening them up again.The True grid does this.I just got a trial of the flexgrid. It looks very cool. I want our company to get their whole suite. RE: Question on Component One grid ThatRickGuy (Programmer)12 Jan 05 15:10Just a suggestion about getting the C1 suit. Check out the Microsoft .Net Resource Kit. From what I've heard there is a license for the c1 tools included at a fraction of the cost.-Rick ---------------------- RE: Question on Component One grid ThatRickGuy (Programmer)12 Jan 05 16:04After playing with the true db grid a bit, I'm not seeing an easy way to do what you are looking for (flashing a row's back color). It may be possible, but I am not seeing an easy way.It is possible to flash the background color of the current selection, but I wasn't finding an easy way to select a row at runtime (other then with the mouse)-Rick ---------------------- RE: Question on Component One grid SqueakinSweep (Programmer)12 Jan 05 18:01I have used True DBGrid quite extensively, and what you are after should be feasible. When you talk about the row object, you need to think more in terms of the underlying Datasource when working with this grid. ie the datarow.I have successfully created a rowcheking event in my DGGrid class, which I use to conditionally check the datarow, while the grid is populated. One of the parameters passed to this event is the Datarow of the grid itself, which you have to get a handle to use DataRowView.Once you have this in place, it is very easy to to colour either individual rows or cells.Please post back if you need more help with this, and I'll try and provide some sample code, extracted from my now rather top heavy class code. Sweep...if it works dont mess with it RE: Question on Component One grid ThatRickGuy (Programmer)12 Jan 05 18:14I'd like to see that code Sweep ;)-Rick ---------------------- RE: Question on Component One grid SqueakinSweep (Programmer)13 Jan 05 04:24RickThis is difficult to summarise, but I'll take a shot at it. Firstly my datagrid class always works from a dataview. If I want the entire table, I just use table.defaultview.I have a property to get the current Datarow of the selected grid line as followsCODEPublic ReadOnly Property GridRow() As DataRow Get Dim dr As DataRow If Not Me.oDataSource Is Nothing Then If grid1.Row Dim drv As DataRowView drv = Me.oDataView(grid1.Row) dr = drv.Row End If Return dr End Get End PropertyThen in the fetch row style of the grid I have the following code, which raises an Event (CheckingRowValue), which is used to condtionally check rows against certain conditions. If a condition is met and I want to colour a row, I set the iBackColor and iForeColor variables accordinglyCODE Public Event CheckingRowValue(ByVal sender As Object, ByVal r As DataRow, ByRef iForeColor As Integer, ByRef iBackColor As Integer, ByRef bBold As Boolean) Private Sub grid1_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles grid1.FetchRowStyle Dim iForeColor As Integer = 0 Dim iBackColor As Integer = 0 Dim bBold As Boolean = False Dim drv As DataRowView = Me.oDataView(e.Row) Dim r As DataRow = drv.Row RaiseEvent CheckingRowValue(sender, r, iForeColor, iBackColor, bBold) Me.zPaintRows(e, iForeColor, iBackColor, bBold) End SubAll the zPaintRows method does is to apply the colors based on the integer values sent to it.Going back to the original post, I would assume the grid would have to be repainted every so often using a timer event, and if each datarow had a datetime field to compare against the current datetime, then the row colouring should be very achievable. Sweep...if it works dont mess with it RE: Question on Component One grid bigfoot (Programmer)(OP)13 Jan 05 08:44After messing with the flex grid, I may use this one too.I'm going to be testing for features of both over the next couple of days. RE: Question on Component One grid ThatRickGuy (Programmer)13 Jan 05 09:09Sweep, I'm assuming this is a custom control that inherits from the trueDBGrid, right? Some pretty snazzy code work! Question though, how does zPaintRows know which rows to paint? or does it just paint the visible rows?-Rick ---------------------- RE: Question on Component One grid bigfoot (Programmer)(OP)13 Jan 05 09:27What about when I do web pages? Do I use the c1 grid, or do i use M$'s grid? RE: Question on Component One grid SqueakinSweep (Programmer)13 Jan 05 09:45Rick It knows which row to colour because internally it is processing that row at the time. It will only apply paint if either iForeColor or iBackColor is non zero.This is the beauty of it. The checkingrowvalue can work from the underlying data (each datarow), without any knowledge of which rowindex of the grid it is onJust so its clearer, and that zPaintrows does nothing clever at all, Ive posted the code for that too.CODE Private Sub zPaintRows(ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs, _ ByVal iForeColor As Integer, _ ByVal iBackColor As Integer, _ ByVal bBold As Boolean) Select Case iForeColor Case -1 e.CellStyle.ForeColor = System.Drawing.Color.WhiteSmoke Case 1 e.CellStyle.ForeColor = System.Drawing.Color.Red Case 2 e.CellStyle.ForeColor = System.Drawing.Color.Green Case 3 e.CellStyle.ForeColor = System.Drawing.Color.Blue Case 10 e.CellStyle.ForeColor = System.Drawing.Color.White End Select Select Case iBackColor Case -1 e.CellStyle.BackColor = System.Drawing.Color.WhiteSmoke Case 1 e.CellStyle.BackColor = System.Drawing.Color.LightYellow Case 2 e.CellStyle.BackColor = System.Drawing.Color.Honeydew Case 3 e.CellStyle.BackColor = System.Drawing.Color.AliceBlue Case 4 e.CellStyle.BackColor = System.Drawing.Color.Red Case 5 e.CellStyle.BackColor = System.Drawing.Color.CornflowerBlue Case 6 e.CellStyle.BackColor = System.Drawing.Color.LimeGreen End Select If bBold Then e.CellStyle.Font = New Font(Me.Font, FontStyle.Bold) End If End Sub Sweep...if it works dont mess with it RE: Question on Component One grid bigfoot (Programmer)(OP)13 Jan 05 10:06Hey sweep, you're doing all this on grid1_FetchRowStyle, right?But what if I want to change the color of a row without reloading the grid? I can't do a refresh either because someone may be scrolling the grid at the time.I need to make a row blink, or just change the backcolor to red or yellow. RE: Question on Component One grid SqueakinSweep (Programmer)14 Jan 05 04:02bigfootI fail to see how else you can do this without using fetchrowstyle. The only other way is to use a grid where you have complete flexibility over the rows/cells.However I ran a test on my grid class, whereby all I did was to add a button to a form which simply set an integer field in the currently selected grid row to 1.I also placed a line of code in my CHeckingRowValue Event, which simply saidCODEif r("testfield")=1 then iBackColor=5and in the code behind a button I added to my formCODEdt.zMoveFirst() 'move to first record in gridDim r As DataRow = dt.oCurrentDataRowr("testfield") = 1I did not rebuild or refresh the grid, and still the row was highlighted. I also updated a row which was not the current grid row, and that also was highlighted.Now this behaviour although beneficial, has me absolutely flummoxed to how it works. All I am doing is using a button to change a datarow in the underlying data, and yet the grid somehow senses the change and updates itself. Sweep...if it works dont mess with it RE: Question on Component One grid bigfoot (Programmer)(OP)14 Jan 05 09:53I think I'm on to something here.I did not know I could refresh one row at a time so here is how I think I'm gonna do it.CODEPrivate Sub dbGrid_FetchRowStyle(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles dbGrid.FetchRowStyle e.CellStyle.ForeColor = GetVBColor(Str(dbGrid(e.Row, 7))) If bAlarmSet = True Then e.CellStyle.BackColor = Color.Salmon bAlarmSet =False End IfNow in my sub that causes the "alarm" that changes the colors in the grid I put:CODEbAlarmSet = TruedbGrid.RefreshRow(0) ' This is the row that I set the alarm in... googletag.cmd.push(function() googletag.display('div-gpt-ad-1406030581151-2'); ); Red Flag This PostPlease let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.CancelRed Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action. 2ff7e9595c
Comments