Update and delete sql not generated by wizard
Hi
In my vb winform data app with sql server 2005 backend, when in dataset I
run the data adapter configuration wizard it generates insert and select sql
statements but not delete and update. As a result the data is not updated
when changed in form. What is the problem and how can I get the update and
delete statements generated?
Thanks
Regards Tag: Problem with dataset Tag: 109645
Column does not allow nulls when saving
Hi
I have a vb.net winform data app with sql server 2005 backend. The ID field
in the tblClients table is an 'int' identity column that does not allow
nulls. The problem is that when I try to save the record using the below
code;
Me.Validate()
Me.CompaniesBindingSource.EndEdit()
Me.CompanyTableAdapter.Update(Me.EMSDataSet.tblClients)
I get an 'Column 'ID' does not allow nulls' error on the second line
(EndEdit()). The first few lines of stack trace is below. What is the
problem and how can I fix it?
Thanks
Regards
----------------
Stack Trace
System.Data.NoNullAllowedException was unhandled
Message="Column 'ID' does not allow nulls."
Source="System.Data"
StackTrace:
at System.Data.DataColumn.CheckNullable(DataRow row)
at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs
args, DataRow eRow, DataRowAction eAction, Boolean fireEvent) Tag: Problem with dataset Tag: 109639
Help!!! launching report builder from url is adding .rdl to name when saving.
Hi,
When I launch a report using the following url, and then make changes to the
report and save it, Reportbuilder is creating another report with the same
name but also including the .rdl within the name itself.. therfore I now
have two reports now displayed within the report manager Tag: Problem with dataset Tag: 109637
Application form size
Hi
I am just wondering what should be the size of forms these days for a
winform app to cover general user population, 800x600 or larger?
Thanks
Regards Tag: Problem with dataset Tag: 109630
Manifest signing certificate error
Hi
In my vb.net winform app I am getting a 'Unable to find manifest signing
certificate in the certificate store.' error. What is the problem and how
can I fix it?
Thanks
Regards Tag: Problem with dataset Tag: 109629
Bindingsource problem
Why would the first statement execute fine, but the second errors out? How can this be?
The first line is in the Load event, the second in a button event. The error message
follows the second line.
Also, aBindingSource.SupportsSearching is True.
TextBox1.DataBindings.Add("Text", aBindingSource, "FK_Name.DataMemberA", True)
dim position as Integer = aBindingSource.Find("FK_Name.DataMemberA", 3)
(Message="DataMember property 'FK_Name.DataMemberA' cannot be found on the DataSource.") Tag: Problem with dataset Tag: 109627
Drawing Custom Control Past Form Edge
I'm creating a UserControl that is essentially a button that displays
a panel when it is clicked. It will behave similar to a ComboBox, but
requires a custom look. Both the Button and the Panel are defined in the
designer, and I set each elements Visible key to match the state I want.
I can't get the panel to display past the bottom of the Form. The Form has
no border.
One thing that almost works is to change the Height of the form so the
panel will fit when needed at runtime. I use the TransparencyKey so the
blank space should be invisible. This creates a temporary but nasty blip of color
where the new form boundaries are.
How does a control like a ComboBox paint itself past a Form's edge? How
can I mimic this functionality with a my own UserControl. I'm sorry if
this is documented somewhere, I couldn't find to proper search terms.
thanks,
townes Tag: Problem with dataset Tag: 109621
Opinion wanted
Hi there,
Is there a general approach for preventing users from selecting a menu item
in an SDI or MDI application whenever the current field on your form is
invalid (assuuming the app consists of a data entry form). In my case, I'm
working with a "DataGridView" which occupies the entire child window of an
MDI app but the problem likely applies to any control. If you've entered
invalid data into a "TextBox" field of a form for instance (in my case a
grid cell), it's likely that most if not all items in your menus as well as
most hotkeys should be off-limits until the user corrects the field. Without
taking great pain to prevent users from gaining access to these items
however (it's not always trivial), is there an easier approach. Thanks. Tag: Problem with dataset Tag: 109618
How do I allow an end user make modifications to a rdl that I created using Report Designer
Hi,
I have several reports ( .rdl) that I created using report designer, how can
I let the end user make modifications to the text in some of these reports.
As I am unable to use Report Builder to modify reports ( .rdl ) created with
Report designer, what are my options. is there a way I can embed the report
designer within my c# winform application. I have tried converting/creating
a report builder version but with no success..
Thanks in advance.. Tag: Problem with dataset Tag: 109616
Arrow keys don't seem to match Keys.Down
This has to be something silly but...
I have a breakpoint at the start of my KeyDown event handler where I want to
check for the Down Arrow key (which I can't seem to match)
When I press the Down Arrow key on the arrow keypad of my keyboard, I get
e.KeyCode == RButton | ShiftKey
and
e.KeyData == RButton | ShiftKey | Alt
but,
Keys.Down == Back | Space
so my check if (e.KeyCode == Keys.Down) is testing False
?? Tag: Problem with dataset Tag: 109615
DataGrid
I am working with Visual C++ .NET 2003. I need to be able to use a DataGrid
in my application. My program is not and will not be connected to a
database. I must be able edit each cell as a user and allow the program to
access each cell and the edit them. The program needs to load the cells
during runtime. I have not been able to find any information on this .NET
tool so far over the internet. Your help is greatly apreciated.
Thanks,
Brad Tag: Problem with dataset Tag: 109613
Datagrid reorders columns on Databind
Hi everyone.
I encountered a weirdest problem. Every time i databaind a dataset to the
grid it reorders the columns.
Any ideas????
Thanks a lot! Tag: Problem with dataset Tag: 109604
How to host the ssrc report designer inside a winform application
Hi,
is there a can to host the report designer inside my winform application? I
would like to be able to give the end user of my application the ability to
make minor changes to the report.
thanks Tag: Problem with dataset Tag: 109603
Edit Report Created in Report Designer within Rebuild Builder
Hi,
I have a couple of reports that I created within the SQL Report Designer, I
would like to give the ability to the end user of C# Winform application to
be able to make modification to this .rdl file using the Report Builder,
however when I try and launch the report that I created within the Report
Designer using the Report builder I get the following error..
Microsoft.ReportingServices.ReportBuilder.ReportModel.Report: The report
'http://localhost/ReportServer/MyReport)' cannot be opened because no data
source is associated with it. Associate a model data source with this report
and try again.
How can I resolve this situation.
Thanks Tag: Problem with dataset Tag: 109602
TreeView Question
I have a tree view that i'm populating with a lot of heiracheral data. I only
want to populate a node with children if the user expands it. However, that
presents a problem. If I do not populate it with children then the
expand/collapse bitmap does not appear.
So, my question is how do I make the expand/collapse bitmap appear without
actually adding any children nodes? Assume that I know there will be children
nodes to add if the user expands it.
--
-Demetri Tag: Problem with dataset Tag: 109596
Programming the Windows Forms Datagrid?
Hi,
Using Windows Forms 1.1 (VB.NET)
I have a datagrid on my form and no datasource, just a collection of
Parameters (for a stored procedure selected by the user at runtime) which
have been populated by the user.
I want to display all these parameters in the datagrid so the user can
review them before executing the stored procedure.
How do I dynamically add columns and rows to the datagrid please - I
basically want to loop through the collection of parameters (in this case a
VB Collection containing Oracle Parameter objects, but it can also be SQL
Parameter objects)?
thanks
Philip Tag: Problem with dataset Tag: 109594
Referencing .NET classes from Crystal Reports
Hi,
I have a project containing all of my Domain object classes.
I have another project containing my Crystal Reports.
I cannot seem to reference my Domain objects on my Crystal Reports...when I
go to the "Database Expert" wizard I only see .NET objects in the reports
project.
Surely the classes do not have to be defined locally?
This is with VS 2005.
Thanks,
Paul Tag: Problem with dataset Tag: 109591
UNC paths from drive mappings
I can get a list of drive mappings via
Directory.GetLogicalDrives
but is there any way I can get the UNC path (eg. \\machine\sharename) for
those drives that are mapped to network shares? Tag: Problem with dataset Tag: 109589
evlogxxxxx.bak files
Hi experts,
My Windows 2000 server system is suffering from too many evlogxxxxx.bak files.
Please let me know followings:
q1. when does system start to backup eventlog? I mean what trigger the
system make the backup files. I set Overwrite events as needed. I cannot
understand why system make the backup files. Please explain this as well.
q2. how many days the system keep evlogxxxxx.bak files
q3. Where is the setting for the valid date of evlogxxxxx.bak files in system?
q4. Can I modify the valid date of backup files,evlogxxxxx.bak files?
Thanks in advance,
Richard. Tag: Problem with dataset Tag: 109586
Open Specific URL from Windows Desktop
i am using C#.net and i want to open a specific url using windows brwoser .
this is very easy to launch IE process and provide url .
But url required authentication and i need to provide this authentication
automatically. or can any body tell me how can i save password for specific
url programatically.
thanks Tag: Problem with dataset Tag: 109582
axWebBrowser control and javascript errors
hi all,
Has anyone come across working code for a Windows Forms application
that uses AxWebBrowser control and is capable of intercepting and
dealing with the 'Internet Explorer Script Error' (An error has
occured in the script on this page') type errors. I know the
WebBrowser control (the one that comes by default in Visual Studio
Toolbox) has 'ScriptErrorsSuppressed' property that seems to achieve
just that, but I don't have much time left for re-implementation.
After doing some searching on the web, some of the possible solutions
that I've seen included:
1) setting aXWebBrowser.Silent = true at an appropriate time. The
downside of this approach is that some of the pop-ups are useful, such
as authentication prompts etc.
2) implementing IOleDocumentSite, IOleClientSite and IDocHostShowUI
interfaces and using IDocHostShowUI::ShowMessage for the purpose of
intercepting the message box. I have attempted this but am yet to see
the ShowMessage function invoked...
3) implementing IOleCommandTarget and the QueryStatus and Exec
methods, and then watching out for the Exec invocation with
OLECMDID_SHOWSCRIPTERROR. From what I understand this behaviour
doesn't work if Disable Script Debugging check box is cleared in
Internet Explorer settings.
apologies that this post is not actually directly related to
HtmlEditor :|
regards,
Greg Tag: Problem with dataset Tag: 109579
Cannot call Invoke or InvokeAsync on a control
I have some sort of a concurrency problem that has me stumped.
I have a form (actually several) that run background worker threads
from the OnLoad method. Sometimes... occasionally... I get a crash
dump from a user that indicates that I "cannot call Invoke or
InvokeAsync on a control until the window handle has been created."
Now, never mind that by the time OnLoad runs, the window handle should
already be created. I decided that, hey, if that's the problem then
I'll just patch it. My patched code is below.
As you can see, in the DoBackgroundWork method I added a test for
control.IsHandleCreated, and then if it's not I do a
control.CreateControl. However, even after this patch I had a crash
this morning with this same annoying message.
2007-03-01 06:36:54Z User mm_tboos on PRICTX99, running M:\program
files\StockCodeGenerator\StockCodeGenerator.exe (StockCodeGenerator
version 2.4.2615.30559) received the following exception:
2007-03-01 06:36:54Z System.InvalidOperationException: Cannot call
Invoke or InvokeAsync on a control until the window handle has been
created.
2007-03-01 06:36:54Z at
System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate
method, Object[] args, Boolean synchronous)
2007-03-01 06:36:54Z at
System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
2007-03-01 06:36:54Z at
Agama.Controls.BackgroundWorkParameters.DoBackgroundWork(Object
parameter)
Do I have misconceptions about when handle creation happens? Am I
missing something here?
Code follows.
public delegate void BackgroundWorkDelegate(params object[]
parameter);
public delegate void ControlEnableDelegate(bool enable);
private class BackgroundWorkParameters
{
private Control _callingControl;
private BackgroundWorkDelegate _backgroundJob;
private BackgroundWorkDelegate _finishJob;
private object[] _parameters;
private ControlEnableDelegate _enableControls;
private Exception _finishException;
public BackgroundWorkParameters(Control callingControl,
BackgroundWorkDelegate backgroundJob,
BackgroundWorkDelegate finishJob,
object[] parameters,
ControlEnableDelegate enableControls)
{
this._callingControl = callingControl;
this._backgroundJob = backgroundJob;
this._finishJob = finishJob;
this._parameters = parameters;
this._enableControls = enableControls;
this._finishException = null;
}
public void ScheduleBackgroundJob()
{
this._callingControl.Cursor = Cursors.WaitCursor;
if (this._enableControls != null)
{
this._enableControls(false);
}
ThreadPool.QueueUserWorkItem(
new WaitCallback(DoBackgroundWork), null);
}
private void DoBackgroundWork(object parameter)
{
try
{
this._backgroundJob(this._parameters);
}
finally
{
if (!this._callingControl.IsHandleCreated)
{
this._callingControl.CreateControl();
}
this._callingControl.Invoke(
new MethodInvoker(FinishWork), null);
if (this._finishException != null)
{
throw new ApplicationProgrammingErrorException(
"Exception trapped while finishing background
task.",
this._finishException);
}
}
}
private void FinishWork()
{
this._finishException = null;
try
{
if (this._finishJob != null)
{
try
{
this._finishJob(this._parameters);
}
catch (Exception ex)
{
this._finishException = ex;
}
}
}
finally
{
this._callingControl.Cursor = Cursors.Default;
if (this._enableControls != null)
{
try
{
this._enableControls(true);
}
catch (Exception ex)
{
this._finishException = ex;
}
}
}
}
}
public static void BackgroundWork(Control callingControl,
BackgroundWorkDelegate backgroundJob,
BackgroundWorkDelegate finishJob,
object[] parameters,
ControlEnableDelegate enableControls)
{
BackgroundWorkParameters p = new
BackgroundWorkParameters(callingControl, backgroundJob, finishJob,
parameters, enableControls);
p.ScheduleBackgroundJob();
} Tag: Problem with dataset Tag: 109578
What is the best way to modify report ( .rdl ) within c# winform app
Hi,
I have several reports within my c# winform application, I need to be able
to give the user the ability to make minor modifications to some of these
reports prior to running them. Currently I am making use of both .rdl and
.rdlc reports within my application. the modifications that the user needs
to be able to make are minor, usually they just need to change some static
text within the page. What is the easist way for me to accomplish giving
the user this ability. I have researched the ssrs rebuilder but that seems
confusing,
Looking forward to your suggestions, Thanks in advance... Tag: Problem with dataset Tag: 109572
Sending Form to a class
Hello,
I am trying to call a class and send the form as a parameter, but I don't
know the syntax. In ASP, you would use "this.Page" as an example:
HidePanelsHelper.HidePanels(this.Page)
My question is what is the syntax for sending the form to a class?
Thanks, sck10
In my Form, I have the following:
protected void AppCodeHidePanels()
{
General HidePanelsHelper = new General();
HidePanelsHelper.HidePanels(What goes here);
}
In my class, I have the following:
public void HidePanels(Form MyForm)
{
foreach(Control ctrl in MyForm.Controls)
{
if(ctrl is Panel)
{
((Panel)(ctrl)).Visible = false;
}
}
} Tag: Problem with dataset Tag: 109570
Loop through Controls using a class
Hello,
I just started using WinForms and built the following to hide panels:
private void AppCodeHidePanels()
{
foreach(Control ctrl in this.Controls)
{
if(ctrl is Panel) ((Panel)(ctrl)).Visible = false;
}
}
I would like to move this to a class so that All my forms can use the same
code. My question is how do I reference the form that is calling it. I am
assuming that you can't use "this.Controls".
Thanks,
sck10 Tag: Problem with dataset Tag: 109566
single instance on TS?
I try the windows application framework properties (My.Application)
option: Make single instance Application. but is not work on TS
(terminal server).
how I can make sure that only one session cross the all sessions? Tag: Problem with dataset Tag: 109560
Error When Trying to copy a row from a datagrid
Hi,
I have a vb.net windows form with a datagrid, and I am simply trying
to click on a row, hit CTRL-C to copy and then CTRL-P to paste it
somewhere else. This works fine for individual cells. When I try it
with an entire row however, I get the following error:
DataGridColumnStyle of '' cannot be used because it is not associated
with a Property or Column in the DataSource.
This error occurs as soon as I hit CTRL-C. Strangely the unhandled
exception occurs at the definition of the parent form ("Public Class
Mainform"), even though the datagrid is located on a child form.
Does anyone know what is going on. I want to be able to copy and
paste whole rows, but even if I can't, I really can't have the users
getting unhandled errors for trying.
Anyone seen this before? Tag: Problem with dataset Tag: 109559
Non-Modal Forms
I have these forms that are going to be displayed and require the user to
respond to the options on the form but there is not specific time that user
will make the chooses on the form. What is the best way to handle this
situation. Create events and raise the event when the user makes the choose
or is there a better way to discover what the user selected. Variables?
TIA JerryM Tag: Problem with dataset Tag: 109558
Webbrowser Control and multiply document complete (Frame sites)
We have the following problem. We are using the
system.windows.forms.webbrowser control to navigate and interact with some
webpages. When the document contains frames we are getting multiply
documentcomplete events. Is there any way to know when the FULLDOCUMENT (all
the frames) complete? Also the event on the same page fires different times
on each test (maybee the caching?)
--
Mike Evans Tag: Problem with dataset Tag: 109557
Propertygrid issue
Hi,
I have an application which has two winforms. One is the parent form which
has around 20 odd controls. And the other has a propertygrid and two buttons,
viz OK and Cancel. This form runs in the designerhost. Hence if a property is
changed the componentchanged event fires and changes are seen on the control
on my first form. Is there a way to defer this event such that on click of OK
button the changes are reflected and on click of cancel i get an option to
rollback or revert the changes.
Thanks for all the help.
Regards
Ser Tag: Problem with dataset Tag: 109556
Forms and namespaces in vb.net
Hi,
What is the best way to assign a form to a namespace in VB.NET with VS 2005?
I have this project with dozens of Forms and im beggining to need a pretty
good imagination to find different names for them!!!
Thx Tag: Problem with dataset Tag: 109555
Opening MDI Child From MDI Child Form, like VisStudio Start Page
Hi, I have an MDI application which contains a start page with a
listview of items in it that can be used to click on and open as a
child form. So the start page is the child at start up of form.
However, when I try to open another child from this start form it
opens ok, but will not show or focus on the new form, it keeps coming
back to itself? Why would this be? I open the form like so from the
start page.
MPE.PolForm polWin = new MPE.PolForm();
polWin.Show();
and then in the polForm I do
this.MdiParent = mainForm;
and
mainForm.windowManagerPanel1.AddWindow(this)
Any ideas? The windowManagerPanel1 is a tabbed form control that
behaves like visual studio 2005. Why does it always go back to the
start form and not show the new created form.
Thanks
Jenbo Tag: Problem with dataset Tag: 109552
MDI Form
Hello
how can i make to pass a child form to foreground ?
thx
//**********************
Bonjour,
comment puis je faire pour repasser un formulaire MDI enfant au premier
plan??
merci
//************************ Tag: Problem with dataset Tag: 109551
AutoResizeColumns in a DataGridView
Hi All
VS 2005 SP1
I use a DataGridView to display some figures. I have a cellpainting event
that displays a couple of numbers in bold and other numbers in regular font
style. When i double click the Column devider it resizes the column so that
the regular formated columns fit in but not the bold formated columns.
What is te best workaround for this problem?
I tryed overwritting the ColumnDividerDoubleClick event:
private void gridEditColumn_ColumnDividerDoubleClick(object sender,
DataGridViewColumnDividerDoubleClickEventArgs e)
{
Font font = new Font(gridEditColumn.DefaultCellStyle.Font,
FontStyle.Bold);
Graphics g = gridEditColumn.CreateGraphics();
Size s;
int width = 0;
for (int i = 0; i < gridEditColumn.Rows.Count; i++)
{
s =
g.MeasureString(gridEditColumn.Rows[i].Cells[e.ColumnIndex].FormattedValue.ToString(),
font).ToSize();
if (width < s.Width)
{
width = s.Width;
}
}
gridEditColumn.Columns[e.ColumnIndex].Width = width;
e.Handled = true;
}
but the width i get is still to small so that the bold value doesn't fit
in... i'm scared to just add a couple of pixels to the width...or do i have
to do so?
is there a better way to do it?
thanks for your help.
jahrens Tag: Problem with dataset Tag: 109549
Nice GUI
Hi
How can i create a GUI like this one:
http://www.kynosarges.de/NDoc.html
My .NET Tools always looks like old NT-Applications except the
Menustrip and the statusbar.
Is there perhaps a good tutorial to build nice GUI's?
Thx a lot for each information ;)
Greetz Tag: Problem with dataset Tag: 109548
Europe Tests Established Chemicals on Millions of Animals
Tony
Nottingham
England
28 February 2007
TO: All People Who Care
A new European Chemical Testing Policy called
REACH has now been finalised by the European
Union. Under these proposals Chemicals of every
kind - from those used in industrial processes to the
ingredients of consumer products - will be tested on
Millions of animals from mice to fish to dogs, causing
untold suffering.
Still worse, because of this reliance on outdated animal
techniques, reliable and relevant information will not be
provided and our safety will not be assured.
If you believe that REACH should make more use of
Alternative Testing to test 1000s of Chemicals that
have been in general use since before 1985 then
please take action now.
If you are a European citizen please contact your local
papers and own MEP asking them to promote the
development of humane non-animal testing methods
under the REACH legislation, which is the best hope
we have for sparing animals the misery of a testing
laboratory.
A sample letter can be found at the BUAV (British
Union for the Abolition of Vivisection) website at
www.BUAV.org (Select Campaigns, Chemical Testing,
Get Active then Writing to the local press).
For all Non-European members, you can still help.
Please tell all your colleagues and friends in the UK
and Europe about REACH. Write to your own local
papers to try and inform others about what is going
on in Europe.
The website for the European Parliament is
http://www.europarl.europa.eu.
Information on REACH, the New European Chemical
Testing Policy can be found here.
Everyone can help and you can make a difference.
Thank You Tag: Problem with dataset Tag: 109546
datagridview and combobox
Hi,
I have dataset "kupci"
I bind datagridview to dataset. Bu I have a problem in combobox column in
datagridview.
I can't see data.
In textbox column is OK!
In combobox I want bind "sifra" from dataset "kupci"
Sorry for my English.
:)
Lp, Tag: Problem with dataset Tag: 109541
.NET application error
I'm sorry to post here, but the MCP Partner Hotline stated I had to try the
managed newsgroups on this issue. If this is the wrong board, please direct
me to the correct one.
I'm trying to use the Microsoft Certified Partner "Small Business Assessment
Toolkit" found at https://partner.microsoft.com/assesssmbneeds and I have met
the prerequisites by having XP Pro SP2, .NET Framework 2.0, and Infopath 2007
installed. When I try to run the install for this assessment tool, the
application installation begins normally, but stops quickly into the install
with the error: "Unable to install or run the application. The application
requires that the assembly System.AddIn.Contract Version 2.0.0.0 be installed
in the Global Assembly Cache (GAC) first." I have no idea how to get this
assembly installed. Can anyone help me on this?
I appreciate your time. Thanks. Tag: Problem with dataset Tag: 109540
datetime picker problems
Hello we have encountered the following problems with the date time picker
control
A : datetime picker control gives focus to last entered field when moving
back and forward with focus how do we reset this to the first field ?
B : datetime picker in DD-MM-YYYY default format ( europe , NL-NL
localization ) refuses an entry of 31 on the DD filed cause the month is
already chosen to the current mont ( (02) februari wich only has 28 days )
steps to reproduce these problems
A : can be reproduced on any system
Throw a datetime picker control , and a textbox on a form ,set the Datetime
picker format to short , start the project , now enter a date , move the
focus to the textbox with the tab key , move the focus back with the tabkey
, you will notice that the when the focus is given back to the datetime
picker control it will select ( highlight ) the last entry box instead of
the first that we expected
B : can only be reproduced on a system with DD-MM-YYYY settings , when
the form is started the Datetime picker will start with the current month
( 2 )
however if i want to enter 31-12-2006 i need to change the month part
first
Why is the above a problem ?
Well we are currently building a production system , and for data entry this
behavior is verry unwanted as it will take extra steps for the operator to
enter valid data in the system .
For B : i have coded a solution however not completely to my satisfaction i
just default the control to 31-12-YYYY ( where YYYY = the current year )
however A: is a serious problem that i can`t solve yet
regards
Michel Tag: Problem with dataset Tag: 109535
Do we have a better approach?
Hi, friends,
I am using .net 2005 to develop a window form application. It has about 15
buttons (with icon on them) which need to be visible/invisible dynamically
based on user's selection and rights.
I know I can create 15 buttons and handle them individually, including
moving their positions around if its neighbor buttons are invisible. But, do
we have a better appoach to do this? Any reference paper or sample code?
Thanks a lot. Tag: Problem with dataset Tag: 109533
Remove last row in a unbound datagridview
Hi All,
I have a undound DataGridView. That is, I am populating the
DataGridView using the DataGridView.Rows.Add() call and by setting the
values to individual cells in the row. When I am adding data to the
DataGridView using such a method, I am getting an unwanted row at the
bottom of the DataGridView. I want to avoid this row. Any help with
respect to this is highly appreciated.
I am not planning to use databinding for the DataGridView. Since,
the DataGridView has 7 columns. I should be able to sort the
DataGridView using any of these seven columns. If I use the
databinding, it will be difficult to sort the view. Hence, using the
Default sort of the DataGridView helps me in this case. But the
presence of last row in the DataGridView should not be supported.
So, please tell me a good method, using which I can remove the
unwanted last row in the DataGridView.
Thanx In Advance,
Sudeesh G Tag: Problem with dataset Tag: 109527
How would I tell when a winform is "dirty"?
I need to know if at least one of the winform's controls have been
edited by the user. Controls can have textboxes, combo boxes,
datagrid, etc.
If any one of the forms have been touched and the user hits the exit
button, I want the form to ask if the changes should be saved to the
database.
So what I am looking for is really simple. Thanks. Tag: Problem with dataset Tag: 109518
How would I tell when a winform is "dirty"?
I need to know if at least one of the winform's controls have been
edited by the user. Controls can have textboxes, combo boxes,
datagrid, etc.
If any one of the forms have been touched and the user hits the exit
button, I want the form to ask if the changes should be saved to the
database.
So what I am looking for is really simple. Thanks. Tag: Problem with dataset Tag: 109517
How to improve performance for stock exchange data display received from third party com component
Hi,
I could not get the answer on the Performance community hence forwarding the
same issue here...
I am using a third party COM component to get very very fast data stream. I
have dragged the com component on a windows form. Now we can request the
data for specific symbols on this com component and in turn it will start
pouring in data in form of
continuous events for the requested symbols. The problem is that data stream
is too fast and can easily make the CPU go to 100%.
The tricks which I am thinking to tackle the issue are ...
1) Instantiate the com component form on the new thread and put the data in
alternate generic dictionaries (We have 2 side by side dictionaries. One
dictionary start filling with data then other dictionary is being accessed
by the consumer module) . So a dedicated thread of consumer class with poll
in the alternated dictionary after a certain time interval, set the flag on
1 dictionary and start copying the data from alternated dictionary to
another datastructure BindableDictionary(It is a wrapper arround 2 data
structures - 1 BindingList<> and 1 Dictionary<>. As the name suggest, as
soon as the consumer module copies data in BindableDictionary, it start
displaying it on UI.)
[STAThread]
private void InstantiateCOMComponent(object state)
{
_comManager = comComponentForm.GetInstance();
Application.Run(new comComponentForm());
_comManager.Visible = false;
}
but as soon as we try to instantiate the COM component on the new thread, it
gives the error -
Message "ActiveX control '7b0deade-e17b-11d2-93e6-00a0c91827c9' cannot be
instantiated because the current thread is not in a single-threaded
apartment."
2) Because of the com component error, Another alternative could be to apply
the com component on a windows form in a new exe and make it a server. Then
supply data through sockets to clients.
Please suggest/comment about the alternatives given above or any better way
of solving the business problem. I appreciate you reading a long email.
Thanks & Regards,
Rajat Tandon.
rajat_tandon2000@yahoo.com. Tag: Problem with dataset Tag: 109512
how to mimimize an application
Hi
I am using C#, i dont know to know how to minimize the application in
Taskbar when i click the button(its not minimizebox button), that means how
to handle it?? normally if u click the minimize button on the form it will
minimize the form, how can i do it in a simple button click event
Regards
Saravanan Tag: Problem with dataset Tag: 109511
Binging custom objects to the DataGridViewComboBoxColumn
Hi,
I have bound a collection of type IBindingList to a DataGridView.
Each object in the collection contains various string properties, Customer
Name, Contact Name etc. It also contains a property 'MyOrder' of custom type
'Order'.
The Order class simply contains properties like OrderID, OrderName etc.
I add the columns to the Grid of type DataGridViewTextBoxColumn for the
strings and DataGridViewComboBoxColumn for the 'Order' object, the code for
the combo column is as follows:
DataGridViewComboBoxColumn cboCustmomerOrder = new
DataGridViewComboBoxColumn();
cboCustmomerOrder.HeaderText = "Order";
cboCustmomerOrder.DataPropertyName = "MyOrder";
cboCustmomerOrder.Name = "OrderName";
//cboCustmomerOrder.ValueType = Order;
cboCustmomerOrder.DataSource = m_Cust.OrderCol;
this.dataGridView1.Columns.Add(cboCustmomerOrder);
The datasource is set to a collection of type Order (List<Order>)
Everything displays OK and I can make selections from the dropdowns.
When I try to tab away however, I get the following error:
[System.FormatException] = {"Invalid cast from 'System.String' to
'BusinessComponentExample.Order'."}
I have spent ages trying to find out how to handle this but so far only
found that the error can be trapped as follows:
private void dataGridView1_DataError(object sender,
DataGridViewDataErrorEventArgs e)
{
if (e.Exception != null &&
e.Context == DataGridViewDataErrorContexts.Commit)
{
//Do something
}
}
Obviously I need to cast to type 'Order', but my question is how?
Hope this all makes sense, please let me know if not.
Would be delighted to get an answer or a pointer to a good tutorial.
Couldn't find any that explain how to do this.
Steve Tag: Problem with dataset Tag: 109504
MI5 Persecution: Troubling Censorship Issues 20/8/95 (4861)
Fred Read (postmaster@foxhouse.demon.co.uk) wrote:
: He posts this drivel every week or so to a number of groups that
: I subscribe to and nothing seems to stop him. *ALL* of his posts
: are off topic and unwelcome to the groups he posts to.
: We have complained about him to his postmaster on at least four
: previous occasions and he still posts the same crap. As his SP
: seem unwilling, or unable, to do anything about him, we were
: windering if there was anything you could do?
If he is not actively using tactics to avoid or sabotage killfiles
(posting from various systems, forging, massive crossposting to create
cross-newsgroup flame wars) then it should be quite easy to killfile
him.
It does seem that the frequency and the size of his posts are
approaching net abuse. However, IMHO, they aren't quite there yet. If
his postmaster were to act in this instance, it would raise troubling
censorship issues.
--
Karen Lofstrom lofstrom@lava.net
---------------------------------------------------------------------
"Adventures for those of the inadmissable kind,
with no follow through."
--- a flaming bonzo beckwithian idiot
4861 Tag: Problem with dataset Tag: 109502
Basic Separator Line Control
Hello,
I finally have to breakdown and ask.....
Is there a basic "Separating Line" control or "Bevel Line" control. It
appears as a simple 3D line.
I'd like to know if there is such a control or will I have to create my own
line control?
Examples: (Observe lines on these screen)
1) Use any generic file, Right-click file --> Properties --> General Tab
2) Open any Setup Wizard, observe line appearing between buttons wizard
content.
Thank you Tag: Problem with dataset Tag: 109501
hello,
do you know where i find a sample witch explain how install dataset
with 2 form, onr master form ans one detail form.