|
Hi!
I am trying to populate a flexgrid (inherits from the .net datagrid) with some data from a dataset.
The problem is that I would like to suspend the updating of the grid while populating data (i.e. adding rows) and resume when all data is populated to make it faster.
I would like to do this without unbinding and rebinding the datasource, cause when rebinding the dataset all the 25 collumns are displayed, which is a rather slow process.
Or is there a way to make the grid remember which columns where visible/not visible when rebinding a datasource??
Thanks in advance
Regards
Mikael
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Good things come to those who wait.
|
|
|
|
|
mystiqu wrote:
I would like to suspend the updating of the grid while populating data (i.e. adding rows) and resume when all data is populated
if FlexGrid inherits from the current .Net datagrid then you should have available to you.
myFlexGrid1.SuspendLayout & myFlexGrid1.ResumeLayout
alternately, you could use the Suspend & Resume Layout methods of the parent form to suspend the layout of all form elements while binding the data to the grid.
-jim
|
|
|
|
|
Hi all,
Does anybody know how to do searching pattern like below using Regular Expression or any other techniques?:
NA* = will search all string started with NA
*NA = will search all string ended with NA
*NA* = will search all string containing NA
I have did everything and use all the resources from Internet and books but still could not found any solutions on this.
Any helps and ideas greatly appreciated.
Regards.
|
|
|
|
|
Can you explain for detail? I don't understand what you want to do.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi !
You must use the System.Text.RegularExpressions.Regex class for this.
For string starting with NA, the pattern will be "^NA", ending with NA is "NA$", and containing NA is just "NA". Here's a small sample console application I've made :
Imports System.text.RegularExpressions
Module RegExpTest
Sub Main()
Dim Start As String = "NAZERTYUIOP"
Dim [End] As String = "AZERTYUIOPNA"
Dim Inside As String = "AZERTNAUIOP"
Dim rStart As New Regex("^NA")
Dim rEnd As New Regex("NA$")
Dim rInside As New Regex("NA")
Console.WriteLine(rStart.Match(Start).Success)
Console.WriteLine(rEnd.Match([End]).Success)
Console.WriteLine(rInside.Match(Inside).Success)
Console.WriteLine(rEnd.Match(Start).Success)
Console.WriteLine(rStart.Match([End]).Success)
Console.ReadLine()
End Sub
End Module
|
|
|
|
|
The man from SCN-CO:
Sorry for my bad english. My problem already answered by Gary. Thanx.
Gary:
Thank you very much for your helps. It works
|
|
|
|
|
But.. My name is not Gary
My (first)name is Florent
|
|
|
|
|
ooooppppps...I'm so sorry. I'm referring to wrong message
|
|
|
|
|
Hi !
I was doing little investigations on the With ... End With block. I read on the web that using a With block may give you a little performance boost.
I tried to compare what is generated when you use with or not. And what surprised me is that there are no difference at all ! the IL is the same whether you use with or not.
Is everybody wrong when they say that it is faster with with block ? Or was it true with VB6, and not VB.NET ?
|
|
|
|
|
No, they're not wrong, but it must be taken in the proper context. Using With was a performance boost in VB6, but not in VB.NET. This is because of the optimizations the VB.NET compiler can perform as opposed to the VB6 compiler. The With block in VB.NET no longer offers this performance boost, but exists soley for backward compatibility and code readability.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Ok, this is what I thought. I'll continue then to use With block when it may improve code readability.
|
|
|
|
|
i have 2 forms and an object (WMPLib.WindowsMediaPlayer()), how can i access the object's members and form's members, throughout each other?
yes, i did see the post from not too long ago about passing data between multiple forms.. i tried using shared, public, the 'module' method described.. cant seem to get it to work.
any input appreciated, thank you.
------------------------
Jordan.
III
|
|
|
|
|
i think i got it to work, with help from this article
------------------------
Jordan.
III
|
|
|
|
|
i recently created a file in C:\ using system.IO.FileStream and was told that if i want a datagrid to save and load automatically when the program is closed and opened I would have to source it to an object and have the object do so. i am not familiar with objects. what objects should be used. does xml have to be used? the grid is just like a check book register so the user can type in it.its blank except for the column headers. and i want the data the user inputs to be saved and loaded as the program is opened and closed.
your help is greatly appreciated
|
|
|
|
|
If you go back and read the reply post again, you'll find that the "object" your talking about is a DataSet . The docs for which are here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do you rotate a picture in an imagebox or picture box by 90degrees
Donald
|
|
|
|
|
Try read the information from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
How can I pack MSDE with my application and check if MSDEexist and then automatically install database.
|
|
|
|
|
As far as I know, you could not do that. I think I might see this kind of question before in this forum and some people tell them to try bootstrapper... I'm not sure too.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hello everybody. I am trying to retrive data from a Access Database containing two tables.
1) tblKeyword
2) tblArea
In tblKeyword there are two attributes: a) Keyword and b) AreaName
in tblArea there are couple including AreaName which is the connection between the two tables.
I am trying to use the following code:
========================================================================
Dim strConnection As String = OleDbConnection1.ConnectionString
Dim connect As New OleDbConnection(strConnection)
Dim test As String
Dim te As String
Dim SQLString As String
connect.Open()
te = cmbKeywords.Items(cmbKeywords.SelectedIndex)
On Error Resume Next
SQLString = "SELECT tblKeywords.Keyword, tblArea.AreaName, tblArea.StartDate, tblArea.JobNumber FROM tblKeywords INNER JOINT tblArea ON tblKeywords.AreaName = tblArea.AreaName WHERE tblKeyWords.Keyword =" & "'" & te & "'"
Dim cmd As New OleDbCommand(SQLString, connect)
Dim reader As OleDbDataReader = cmd.ExecuteReader()
While reader.Read()
txtAreaName.Text = reader.GetValue(1)
End While
========================================================================
The SQL command goes through OK but the reader.Read is causing an error. How can i retrive the data from that SQL. I am lost.
I know that the GetValue gets a value from attributes in one table. But with the inner joint I need values from both tables.
Any help would be appreaciated. Thank you..
Still trying to find the way
|
|
|
|
|
Chaos Machine wrote:
The SQL command goes through OK
What you mean is that you are able to create the SqlCommand, however no validation is done on the provided SQL string provided at this point.
Chaos Machine wrote:
but the reader.Read is causing an error
At the point of opening the datareader, the SQL provided is executed, so any syntactical errors will be thrown here.
Chaos Machine wrote:
INNER JOINT
Now, if that were my mistake it would've been freidian
Oh, and another pointer:
Chaos Machine wrote:
I know that the GetValue gets a value from attributes in one table. But with the inner joint I need values from both tables.
By doing an join, you are effectively creating one table (albeit a virtual table that doesnt exist in the DB). Your single table will have the columns you specify in the select list:
Chaos Machine wrote:
SELECT tblKeywords.Keyword, tblArea.AreaName, tblArea.StartDate, tblArea.JobNumber
Hope it helps.
|
|
|
|
|
Hello J4amieC,
thanks for replying. I am still at a loss of what to do. Can you please show me with a bit of code how I can retrive the informations that i have collect from the SQL command? I am trying from books and online info, but still nothing. Thank you for your help.
Still trying to find the way
|
|
|
|
|
OK,
my comment was that you had a error in your SQLString (you used INNER JOINT instead of INNER JOIN) it should read:
SQLString = "SELECT tblKeywords.Keyword, tblArea.AreaName, tblArea.StartDate, tblArea.JobNumber FROM tblKeywords INNER JOIN tblArea ON tblKeywords.AreaName = tblArea.AreaName WHERE tblKeyWords.Keyword ='" & te & "'"
Now when you execute this string you will have the following columns:
0: Keyword (from tblKeywords)
1: AreaName (from tblArea)
2: StartDate (from tblArea)
3: JobNumber (from tblArea)
so if you use:
reader.GetValue(0)
you will get the Keyword column.
|
|
|
|
|
Thank you J4amieC it worked!!! Thank you so much. Now i have to expand this so when i have two areas with the same keyword a list is populated. Hmmm lets see if i can do it!! LOL
Thank you again for your help...
Still trying to find the way
|
|
|
|
|
How can I get the handle of an app that doesn't have a form?
Pablo.ar
|
|
|
|