|
My DataTable has a VarChar field with no default value and it does not allow Nulls.
This DataTable is bound to my form using a BindingSource.
For some this reason when I do a BindingSource.EndEdit , that field is cleared, meaning the value the user entered into the textbox becomes cleared, and an exception is thrown stating that this field does not allow NULLS.
This makes absolutely NO sense, why would the EndEdit physically edit the value of one of my controls? And why change it to NULL if the field is required?
-- modified at 7:21 Thursday 1st February, 2007
"you can't forget something you never knew..." M. Du Toit
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Hi all, I have a form in which I load a .rpt file, populate som values and then export it into a .PDF file. Something goes seriously wrong here thou.
All occurances of the letter t is replaced with ti or tt. All occurances of ti is being replaced
with tt. So for an example out of the file.
Should be Becomes after export to Adobe PDF
---------------------------------------------------------
Mattias Mattas
kommentarer kommentiarer
Deviation Deviatton
Skadat Skadatt
Registrerat Registirerati
I dunno why it does this. Has anyone else been out for it or am I alone in this matter?
Below is the "export" part of the code
<br />
CrystalReportViewer1.ReportSource = rptDocument<br />
<br />
<br />
Me.rtStatus.AppendText("Exporting to PDF" & vbCrLf)<br />
Application.DoEvents()<br />
<br />
Dim CryRepExportoptions As New CrystalDecisions.Shared.ExportOptions<br />
Dim CryRepDestination As New CrystalDecisions.Shared.DiskFileDestinationOptions<br />
Dim CryRepTypeOptions As New CrystalDecisions.Shared.PdfRtfWordFormatOptions<br />
<br />
CryRepDestination.DiskFileName = IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly.Location) + "\PDFTemp\" & Ticket.ToString & ".pdf"<br />
CryRepExportoptions = rptDocument.ExportOptions<br />
<br />
With CryRepExportoptions<br />
.ExportDestinationType = ExportDestinationType.DiskFile<br />
.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat<br />
.DestinationOptions = CryRepDestination<br />
.FormatOptions = CryRepTypeOptions<br />
End With<br />
<br />
rptDocument.Export()<br />
<br />
I'm completely clueless in this matter. Any help would be greatly appreciated.
|
|
|
|
|
hello,
i ve got a problem, where i have two asp pages say "A" and "B".
"A" and "B" are two differnet applications running on two different browsers on a same PC.
clicking a link on page "A" should check whether "B" is already running on that PC or not.
if yes then pass some parameter to page "B".
if no then create a new instance of page "B" in a new browser and pass parameters.
A help would be greatly appreciated.
Manas
|
|
|
|
|
Didn't you ask this using a different account the other day ?
You can't do it. A web browser cannot iterate over other browser instances that are running, it can't question them about where they are browsing. At least, not using javascript, AFAIK.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Probably you should look at opening a new window with a predefined name - this is all javascript:
var w = window.open("B" with params,"BWindow");
AFAIK, this will re-use the window with the same name if already open with the passed URL.
But remember that effectively, you are firing a new request to the server when you add the params.
Hope this helps.
Shreekar
|
|
|
|
|
That will obviously work, but I understood that he wants to find application B, no matter where it was previously opened from
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
OP wrote: i ve got a problem, where i have two asp pages say "A" and "B".
"A" and "B" are two differnet applications running on two different browsers on a same PC.
Based on the above, I surmised that the apps(pages) are running on the same PC. Still, I might be wrong in my understanding.
Shreekar
|
|
|
|
|
Hello,
I have a datagridView and I have a text box, I would like the user to enter some letter that will narrow the search down. For example in they type s as the first letter, it will find all the words that begin with s in a column in the datagridview. Moreover, if they type st then it will narrow all the words even further.
I am using typed dataset and have it bound to the datagridview.
I have done this in order versions of visual studio by passing a query using the like keyword. But in 2005 using typed datasets and datagridView is there a more automated way to do this.
Many thanks for any suggestions,
Steve
|
|
|
|
|
hi steve,
following code may help u.
' ''-------------------Selecting searchText
Private Sub txtSearchEname_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtSearch2.KeyPress
Dim strSearch As String
Dim i As Integer
If txtSearch2.Text = "" Then
Exit Sub
End If
strSearch = txtSearch2.Text
If Asc(e.KeyChar()) = 13 Then
For i = 0 To DgvEmpList.RowCount - 1
If (UCase(Trim(DgvEmpList.Item(2, i).Value)) Like "*" & (UCase(Trim(strSearch)))
& "*") Then
DgvEmpList.Rows(rowSelected).Selected = False
DgvEmpList.Rows(i).Selected = True
rowSelected = i
End If
Next
End If
End Sub
priya
|
|
|
|
|
Hello,
Thanks a for your answer.
A better method is to use the bindingsource and set the filer. e.g.
<br />
BindingSource1.Filter = string.format("{0} LIKE '{1}%'",me.cboSearchText.Text,me.txtSearch.text)<br />
This should be in the text changed event of the text box.
Steve
|
|
|
|
|
hii steve,
good code,
but will u thell Please, wht is cboSearchText?
& wht more i have to write for bindingSource?
Thanx.
--Regards Priya
priya
|
|
|
|
|
Hi Priya,
There are 2 methods using the datarowview of the bindingsource row filter property.
<br />
dim drv as datarowview<br />
drv = directcast(me.grdMyDataGrid,datasource, datarowview)<br />
drv.rowfilter = string.format("{0} LIKE '{1}'%", cboSearch.text, txtsearch.text)<br />
There is also another method where you can use the datasource default view property, there you can also set a filter.
If you need any more help, just reply to this i will give you more sample code,
Steve
|
|
|
|
|
(VS.net 2003) I need help with an application that launches certain events when the user presses certain keys/key combinations.
The only thing I can't do in this program is determine what keys/key combinations were pressed and if the certain key was pressed than i want to launch a certain event.
For instance if ctrl + Alt + C were pressed than the program would catch the key combination pressed and then launch a corresponding event.
Any help would be much appreciated. Thankyou!
|
|
|
|
|
There are three events, KEyDown, KeyPress, and KEyUp. Your app will only get them if it has input focus. A system wide hook can give you any key press that occurs.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The header would contain both regular charaters and unicode characters (triangle sorting indicator) in this case.
|
|
|
|
|
I am having problems with getting my hands on a copy of visual basic and was wondering if anyone could open a project for me and copy paste the source code into a message because I need it for computer science class.
Thanks a million
|
|
|
|
|
Just open the files in notepad and get the code out from there.
|
|
|
|
|
Ok i just tried that and it works for the files that I have the forms of, but for my file Projectcrypt.vbp what you suggested does not work. Thanks a million I would have never thought of that
-- modified at 19:42 Wednesday 31st January, 2007
|
|
|
|
|
I am not sure.. it has been a while since I used VB6 (I think you have a VB6 project there) but I think that file is nothing more than a project index file and does not contain any code, just a listing of all the other files in the project and some project settings.
Yup....
Look here...[^]
|
|
|
|
|
So if all I have of my program is this project, it is impossible to recover the code?
|
|
|
|
|
No, your code has to be there, and it's bound to just be text.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
What if I have the .exe version of the program? I doubt it, but is there a way to extract the code from there?
|
|
|
|
|
No, once it's an exe, for VB6, then it's been turned to code. Even in .NET, the code is gone, only an approximation can be retrieved.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
I posted recently regarding printing text.
Basically, I am trying to put a global int value combined with some predefined text, simple as that, and print it (for a record of recording something).
I wanted to do it on a word document, but this does not seem easy at all.
i was reading up on this and it looks like I could print preview something (I know this works for databases).
Anyone know how i could do it for my method?
Cheers
|
|
|
|
|
I am working in vs2005 and have a project to create a process where i can monitor applications on a given PC.
1- check if a certain application (third party) is running on the PC.
2- If the application is running, check if the user is using it (clicking on it, typing, paging ...etc)
3- If the application is not being used by the user for longer than x number of minutes, close it.
Using the process class i am ble to check for #1 above, i can also close an application, however, i still can not tell if the user is using the application or not and when was the last time they used it.
Please Help!!
Thanks
rnamro
-- modified at 16:13 Wednesday 31st January, 2007
|
|
|
|