|
Sorry if I’m not explaining this very well.
I have under TestA, several test variations that each have a certain duration allotted to them. My need is to somehow calculate the entire time or duration for all tests in Test A and so on.
Example:
Test A - #1 takes 1 hr.
Test A - #2 takes 2 hrs.
Test A - #3 takes 3 hrs.
Button Click to add the entire Test A test times would equal 6 hrs.
The differences in Test A,B,C are all different tests. The 1,2,3 are tests performed for each Test A,B,C. Does that make sense?
This app is supposed to calculate the total duration of all testing to allocate personnel and resources effectively. Doesn’t seem logical to me, but evidently there’s a need for it.
|
|
|
|
|
That's okay...It's always hard to know what information is important when asking a question. But it seems to make more sense to me now. I think this is what you are looking for:
SELECT SUM(durationField) FROM table WHERE testField='TestA'
This will return the sum of durations for TestA.
Hope this works for you!
|
|
|
|
|
I'll give that a try and post a verdict. Thanks again for helping me and working through my information. I appreciate the help.
Thanks again.
|
|
|
|
|
Hi I am creating a listview dynamically.But the list view columns are not fixed .on runtime I can change the column by mouse like excel.I want to stop it.how can I do it.
Thanks in Advance
Sandy
|
|
|
|
|
Hello I am a visual basic starting developer for VWD. I was wondering how to make my website chat service "Live", I just need one page to be updated without a user having to press a button
Seanph
|
|
|
|
|
Hello I am a visual basic starting developer for VWD. I was wondering how to make my website chat service "Live", I just need one page to be updated without a user having to press a button
Seanph
|
|
|
|
|
Hi..
I am having a problem with understanding how to catch the selected index changed event of a drop down list when placed inside a datagrid..
I have two drop down lists inside a datagrid.. i.e. DDLA and DDLB.. I have set DDLA on Autopost back and I want DDLB to be populated from the
database once DDLA's selected index changes..
Can anybody give any ideas on how to get this done.. Thanks
Beneath the blue blue skies..........
|
|
|
|
|
I believe you will need to create a Protected Function for this purpose and in the column where you place the dropdownlist you will need to specify that function to be called when the index changes. The reason for this is that the objects inside the datagrid are created at runtime and therefore are not attached to any one function.
Cleako
|
|
|
|
|
Can anyone show me an example or two perhaps so that i could get a clearer idea of how to proceed..Thanks
|
|
|
|
|
<asp:DropDownList OnSelectedIndexChanged="TestFunction" runat="server" ID="ddlTesting"></asp:DropDownList>
After you have bound data to this then it should post back to the server after a drop down has occurred.
Cleako
|
|
|
|
|
hi,
how to convert an existing data in database to a string, in DataGrid
" i need something similar to : lstV.SubItems.Add(dt.Rows(i)("MTimeIN").ToString) which is used in list view" i need it in dataGrid
using vb2003
thank you
srour_costavo@hotmail.com
|
|
|
|
|
I hope I'm understanding the question correctly...
You want to replace the functionality of adding items to a ListView to an equivilent of adding items to a DataGrid, correct?
A DataGrid doesn't maintain collections of objects like a list view does. It's bound to datasources that maintain those collections. So, create a DataTable object with a DataColumn, add your items to that table and bind the DataGrid to that DataTable.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I know that in Java that "This." is required for accessing objects local to a form, etc. I also know that in VB.NET you CAN use "Me." for a similar purpose. I have never used it personally in my own code other than for Windows forms like "Me.Close()" but I have seen other people use it quite a bit and I noticed that in 1.1 the generated code always used "Me.". Is that just a programming style or is there more to it than that?
Thanks!
Cleako
|
|
|
|
|
cleako wrote: Is that just a programming style or is there more to it than that?
I think it is just a programming style. It is equivalent to this in C#, C++ and Java. Personally, I use this (or Me ) a lot because it shows intention more clearly, IMHO.
|
|
|
|
|
It's just a programming style. The compiler assumes Me. unless otherwise specified. Some people overuse it to death, putting Me. in front of everything, making the code painfully to read, even more so in the C# world with this. . It just makes your code easier to read in certain situations by taking away some abiguity, like in Property methods:
Public Class SomeClass
Private x As Integer
Public Property X() As Integer
Get
Return Me.x
End Get
Set(ByVal value As Integer)
Me.x = value
End Set
End Property
End Class
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ahhhh, thanks, that's what I've seen and I've wondered.
Cleako
|
|
|
|
|
Dave Kreskowiak wrote: Some people overuse it to death, putting Me. in front of everything, making the code painfully to read, even more so in the C# world with this
Dave Kreskowiak wrote: It just makes your code easier to read in certain situations by taking away some abiguity, like in Property methods
I hope that I am sensible with where I use this and Me . However, I do use it a lot.
|
|
|
|
|
I'm sure you don't! :->
I've just seen C# code with this. on every single line where it's legal to put it. I can only sit back and watch as those four keys scrumble to bits of plastic as this is typed about 2,000 times per class file!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have created an class which inherits button control. In that class i have created mousedown, mouseup and paint events.
In the paint event i have resized the button size. But it is not calling the paint event.
Let me know what i was wrong, and why it is not getting into paint evnet.
Rams.
Be simple and Be sample.
|
|
|
|
|
You really shouldn't be resizing the control in the Paint event, but, whatever...
Did you call Me.Invalidate() to force the control to repaint itself?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes, I have tried that too, I have called the mybase.invalidate() in new() constructor and also tried putting the btnobject.invalidate() while before adding this control to form.
even it is not calling paint event.
Be simple and Be sample.
|
|
|
|
|
If your control is not redrawing after an Invalidate, you're got a serious design problem. Invalidate will send the WM_PAINT message to your control (window message pump actually) which will call your controls Paint handler. If your not getting that message or your code is doing something it shouldn't be, to prevent it from painting!, in the Paint handler, then you've got to examine how you've written your painting code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear,
You need to write the code in Protected Overrides onPaint Event of base class and
Develop2Program & Program2Develop
|
|
|
|
|
Hi coders,
I am planning to create an enum at runtime and set it as a property of a class.
That is,
Class MyClass
Public Property Type As (New Created Enum)
....
End Class
For creating an enum at runtime I have used the following code
Public Function CreateEnum() As [Enum]
Dim domain As AppDomain
domain = Threading.Thread.GetDomain
Dim name As New System.Reflection.AssemblyName
name.Name = "EnumCounters"
Dim asmBuilder As System.Reflection.emit.AssemblyBuilder
asmBuilder = domain.DefineDynamicAssembly(name, Reflection.Emit.AssemblyBuilderAccess.Run)
Dim modBuilder As ModuleBuilder
modBuilder = asmBuilder.DefineDynamicModule("EnumModule")
Dim enumBuilder As EnumBuilder
enumBuilder = modBuilder.DefineEnum("EnumCounters", TypeAttributes.Public, GetType(Integer))
'----- HERE IS WHERE I ADD THE ITEMS
For i As Integer = 0 To DiagManager.Counters.Count - 1
enumBuilder.DefineLiteral(CType(DiagManager.Counters(i), Counter).Caption, i)
Next
'-----
Dim enumType As Type = enumBuilder.CreateType
Dim enumObj As [Enum] = System.Activator.CreateInstance(enumType)
Return enumObj
End Function
Then, I set my property's value as the returned value of the function.
For full code please see (http://emreyazici.com/CodeFormatter.htm -- site does not have banners or advertisement. I only wrote the code)
Normally it would work. But when I assign the 'selectedobject' property of 'property grid' to the created instance of class, it does only display the FIRST item of enum in the property grid
http://emreyazici.com/res.jpg
But I want it to show all items
How may I correct it?
Thanks...
Best Regards
Emre YAZICI
|
|
|
|
|
Why are you creating an Enum at runtime?? Since an Enum is pretty much only used inside your code, I fail to see the point.
You might want to check to see if all the enum values are actually being created. It's possible that your only successfully creating one of them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|