No image with treeview
I want to put an icon next to one node in a treeview, but nothing next
to the others. Is there an easy way of doing this? Tag: No image with treeview Tag: 97242
Problem while adding text to the last column in listview.
Hi all,
I have a listview control which has four columns like { Col1, Col2,
Col3, Col4}.
I add data in listview like this,
dim lvitem as listviewItem
lvItem = listvie1.Items.add("Text")
lvItem.SubItems.add("SubH1")
lvItem.SubItems.add("SubH2")
lvItem.SubItems.add(" ")
Now after getting execution of few functions I update the last entry in
my listview control
so for that I use.
for cnt = 0 to listview1.Items.count - 1
listview1.Items(cnt).SubItems(3).Text = "SubH3" /// Giving exact
problem
Next
The 2nd line is causing me runtime exception the description is,
Run-time exception thrown : System.ArgumentOutOfRangeException -
Specified argument was out of the range of valid values.
Parameter name: '3' is not a valid value for 'index'.
Initially it worked fine when I run my application 2-3 times but now it
is crashing continuously.
I have tried with the same functionality in the other application but
that application is
working fine.
I am not able to figure out what is the exact reason behind this
failure.
I there any known bug with the listview about this issue I have also
deleted the previous listview and added a new one but nothing is
working fine for me.
What could be the reason .
Thanks in advance. Tag: No image with treeview Tag: 97234
updating TreeNode label
Hi, I'm using .Net 1.1 in C# and I have a TreeView control with a bunch of
TreeNodes in there. How can I change the label of a node? I try calling
TreeNode.Text = "new label", but this does not have the right effect, the
TreeView does not get updated. Is there some method that I need to call to
force the update?
Thanks
Marcin Dobosz Tag: No image with treeview Tag: 97232
get value from combo box
Gday,
Am relatively new to dotnet so excuse me if this seems rather simple.
I am trying to get the value of a bound combo box that has been set
when the form is opened, and use this for another control. I am having
trouble doing this for some reason.
Here is what I am trying to do:
Decimal var1 = (Decimal)cboMyComboBox.SelectedValue;
This appears to return a datarow? Do I need to create a datarow object
then access the value I need that way, or can I just access the
selected item similar to what I am doing above?
Also, the combo box has an id field (value member) and a display field
(display member).
Thanks,
Peter Tag: No image with treeview Tag: 97231
Databind column to property on another referenced object...
How do I databind a DataGridView column to a property on another referenced
object? That is, I want to bind to "Parent.Name" where Parent is a property
that references another object.
I know this can be done when databinding TextBoxes. Surely it can also be
done with grid columns.
The following example should illustrate my problem:
using System.Windows.Forms;
namespace MyTest {
class MyTestForm : Form {
public MyTestForm() {
DataGridView grid = new DataGridView();
DataGridViewColumn col = new DataGridViewTextBoxColumn();
col.HeaderText = "Parent.Name";
col.DataPropertyName = "Parent.Name";
grid.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.HeaderText = "Name";
col.DataPropertyName = "Name";
grid.Columns.Add(col);
grid.DataSource = new BindingSource(new Child[] {
new Child(new Parent("dad"), "son")
}, null);
this.Controls.Add(grid);
}
}
class Parent {
private string _Name;
public Parent(string Name) {
_Name = Name;
}
public string Name {
get { return _Name; }
set { _Name = value; }
}
}
class Child {
private Parent _Parent;
private string _Name;
public Child(Parent Parent, string Name) {
_Parent = Parent;
_Name = Name;
}
public Parent Parent {
get { return _Parent; }
}
public string Name {
get { return _Name; }
set { _Name = value; }
}
}
}
Nathan Tag: No image with treeview Tag: 97230
RTF to HTML conversion
Can anyone point me in the right direction (any links/help on the net) on
writing your own function to convert rtf to html?
Thanks
Gav Tag: No image with treeview Tag: 97228
Hiding caret of textbox
Hi,
I would like to hide cursor, but dont wont to have a 'grayed' text box by
using read-only property.
Or if windows would stop selecting text automatically after a calling focus
method from antoher textbox that has a text selection. Tag: No image with treeview Tag: 97226
ClickOnce publishing without uploading dotnetfx.exe
Hi,
I'm using ClickOnce to publish my application (MyApp.exe) to a web server.
The application relies on a seperate application (CommonControls.msi), whose
only purpose is to install a few third party components into the GAC. This
application only has to run once on the user's machine.
I created the product.xml and package.xml files, and this CommonControls.msi
correctly appears in the Prerequisites box when I'm getting ready to publish
MyApp.exe.
Since I want CommonControls.msi to be hosted on my web server, I select the
second download option (Download prerequisites from the same location as my
application).
Note that at this point both .Net Frameword 2.0 and CommonControls.msi are
selected.
I now publish MyApp.exe - everything works exactly as expected. The files
dotnetfx.exe and commoncontrols.msi are uploaded to my hosting web server.
However, now every time that I publish MyApp.exe, both these files continue
to be uploaded. This means that instead of a 1.5mb upload, I'm making a 25mb
upload each time.
My question is - how do I tell ClickOnce to upload the prerequisites
manually (i.e. should I ever change CommonControls.msi), yet inform the
client program (MyApp.exe) to download the prerequisites from the same
location as the application?
Many thanks in advance for any thoughts on this.
Regards
Jeremy Holt Tag: No image with treeview Tag: 97224
Taskbar title different from window form text?
I have an application that is currently running without the default
titlebar, because the client needs the ability to create their own
custom titlebar. The only way we have found to accomplish this is to
remove the 'Text' from our main form, and also have no control buttons
enabled whatsoever.
This is all fine and good, they get the standard windows border that
they like, with no titlebar. The problem comes when the application is
displayed in the Taskbar. Since we removed the text property from the
main form, the entry in the taskbar is blank.
Does anyone know any way to set that text in the Taskbar to something
other than what is in your form title? I have looked for API calls
etc, but have come up blank. The other alternative is to hide the
titlebar while still setting the text property for the form. If I set
the FormBorderStyle = 'None', it does just that, but then we lose the
standard border which the client claims is not acceptable.
Thanks,
Ryan Tag: No image with treeview Tag: 97221
RichTextBox question
I've been messing about with the richtextbox control so that I can select
multiple different fonts and change their styles, sizes etc together. But if
I test the performance this by filling the box full of characters there is a
noticeable lag while the update happens.
To do this I'm using the following code:
int selectionStart = rtbBody.SelectionStart;
int selectionLength = rtbBody.SelectionLength;
int selectionEnd = selectionStart + selectionLength;
for (int x = selectionStart; x < selectionEnd; ++x)
{
rtbBody.Select(x, 1);// Selects one character at a time
//Do code for checking/changing font styles, type size etc
}
It works perfectly apart from this delay. I've used unmanaged code to stop
the rtb updating while this is happening and it helps a bit.
Would it be more efficient if I manipulated the rtf directly in a string
builder and then placed it back into the richtextbox?
Looking at word, literally thousands of characters can be changed style,
font etc instantly. Does anyone know how they go about doing this?
Any help would be appreciated.
Chris Tag: No image with treeview Tag: 97220
Using MaskedTextBox for currency values
Hi,
What would be the best mask for MaskedTextBox for Currency fields?
Thank you,
Alan Tag: No image with treeview Tag: 97218
Saving data in the DataGrid
Hi,
I would like to save inserts, deletes and updates in the DataGridView bach
to the database when the user changes the current selected row. Right now I
am using the SelectionChanged event, but that fires everytime the user
changes column.
Is this really the only event I can use?
Thanks
Henrik Skak Pedersen Tag: No image with treeview Tag: 97214
DataGridview grouping like Outlook
Hi,
Is is possible to create Outlook like groupings in the DataGrid?
Thanks
Henrik Skak Pedersen Tag: No image with treeview Tag: 97213
DataGridView add new row WITHOUT typing
Hi,
I've a databound DataGridView that contains 4 textbox column. Each textbox
column has also has a button column that pops up a window to search.
When the user types some text in one of the textbox columns, a new row is
added automatically on the first keystroke. This DOESN'T happen when the
users clicks on a button, and I fill in the value of the textbox column in
code. If the users uses the buttons to fill all 4 textbox columns, there
isn't a new row to continue...
How can I add a row?
I tried Rows.Add() but got a message that's not supported when the
DataGridView is databound... :-(
Steven
- - - Tag: No image with treeview Tag: 97212
Drawing a rectangle around to points (a line).
OK...This should be elementary but a lack of sleep is apparently
blocking my thought processes...
I've two points (p1, p2) and I've drawn a line between them:
grahix.DrawLine(new Pen(Color.Red,4F),From.Point,To.Point);
How can I now draw a rectangle around the line that exactly fits the
length, width, and thickness of the line based on the two points. I
can't seem to get it right...
Thanks!!! Tag: No image with treeview Tag: 97210
ResizeBegin & Change Size Programmatically
Here is what I would like to do. The app's main form is a MdiContainer
containing forms. When the user changes the size of the container the
child forms are resized, too. I need to catch the beginning and end of
the resizing of the child form. How can this be done.
This is what is done currently. The container overrides OnResize. In
this function the children's position and size is continuously adjusted
as the user keeps on resizing the container. In the child forms I have
overriden ResizeBegin and ResizeEnd. Unfortunately, they are not being
called as they only react to manual resizing and not to
programmatically changed sizes (like SizeChanged vs Resize). Are there
any events like ResizeBegin and ResizeEnd that also respond when the
resizing is done programmatically? If not what is the best solution to
achieve this besides the main form telling the children that resizing
begins/ends?
Thanks Tag: No image with treeview Tag: 97209
update status of a form
I have a windows form and want to know if any bound text boxes have been
modified. Is there a property to know that from C#?
Thanks in Advance!
Jeffrey Tag: No image with treeview Tag: 97207
StatusBar sizing grip does not work correctly on dual screen displ
I created a simple Windows form application with the status bar. Because I
use a dual screen display I noticed that there is a problem with the sizing
grip when I drag the form to the second screen. The sizing grip does not work
when the form is shown on the second screen.
I looked at other applications to see if this is a generic problem, but the
sizing grip in other applications (like Internet Explorer) behaves correctly.
Is this a bug in .NET Framework?
Wiktor Tag: No image with treeview Tag: 97204
Deployment Project - Custom Checkbox Form - Can't reference value!
I created a setup project in VS.NET 2k5 and added an additional dialog to ask
the user where they would like to place icons for my application. The options
are Desktop and QuickLaunch Menu.
When the user unchecks one of these, or checks one of these, the value is
completely disregarded by my setup project when installation commences. I
have found other users complaining of the same thing, and I have followed the
instructions given at:
http://msdn2.microsoft.com/en-us/library/k3bb4tfd.aspx
under the "To add the samples to the installer" section about 3/4 of the way
down the page.
Other users having this same issue can be found at
http://discuss.develop.com/archives/wa.exe?A2=ind0511a&L=dotnet-winforms&T=0&F=&S=&P=651
Thank you for any advice! Tag: No image with treeview Tag: 97198
control change events altering other controls.
I have occasions when a user changes the entry in one control the entry in
another control is automatically changed.
I have got into a muddle and I am not sure if I should be changing the value
of the second control, or the field in the underlying record that the
control is bound to. I want to do this in such a way that the CancelEdit
feature works.
As a specific example I am using the CheckedChanged event of a check box to
clear the data in another field if the check box is cleared.
many thanks in advance
Rod Tag: No image with treeview Tag: 97195
ClickOnce, MSBuild and multiple servers.
We're currently getting ready to deploy an application using ClickOnce.
We'll be placing the deployment on two servers. Because the app.config files
will need to point to different servers, we're using the revision number to
indicate which server it came from.
Currently, this means manually changing the version in the IDE and then
publishing to each server. Is there any way to automate this using MSBuild?
After looking around it appears MSbuild might be able to generate the files
for publishing, but they would then need to be copied to the publish site, is
this correct?
Can you specify the version number in the build?
--
Neil Tag: No image with treeview Tag: 97193
Is Wizard control only available for ASP.NET?
It would be nice to have Wizard control in WinForms.
Yes, there is User Interface Process Application Block available, but if I
need a simple
two-step wizard, it is an overkill.
It won't take very long to make a simple wizard from scratch, but it is
still nice to have
a simple light-weight control that can be reused...
Why isn't it a part of WinForms?
Thanks,
-Stan Tag: No image with treeview Tag: 97192
backgroundworker Question
We have been using multi-threading in our application in 2003 with good
results. When we migrated to 2005 our old code blew up, so we rewrote our
code using the backgroundworker. It seemed to easy to be true. When we run
our application now it seems that the screens are running synchronously and
not Async. We usually have 3 to 4 backgroundworkers going at the same time
inside the activated event for the form. See the code below to show how we
are using the worker:
Private QueueWorker As New BackgroundWorker
Delegate Sub QueueDelegate()
Private Sub LoadInitialQueue(ByVal sender As Object, ByVal e As
DoWorkEventArgs)
Try
Dim ReturnAsync As IAsyncResult = BeginInvoke(New
QueueDelegate(AddressOf SetupQueue))
EndInvoke(ReturnAsync)
Catch exp As Exception
MessageBox.Show(exp.Message.ToString)
End Try
End Sub
Public Sub SetupQueue()
Try
QueueFlex.Redraw = False
dsNotifications.Clear()
dsNotifications.Reset()
Dim parm() As Object = {Main.oProperties.UsersBankLoanTeamID, 0}
DBCalls.AccessDataLayer.FillDataset("SelUserNotifications",
Main.oProperties.ConnectionString, dsNotifications, New String() {"queue"},
parm)
QueueFlex.DataSource = dsNotifications.Tables("queue")
FormatQueue()
QueueFlex.Redraw = True
Catch exp As Exception
MessageBox.Show(exp.Message.ToString)
End Try
End Sub
Do we have to use BeginInvoke & EndInvoke with this new component because
that seems like the bottleneck. If we do still need to use them what can I
do differently that would make the UI more responsive. It just seems that we
lost the UI responsiveness when we moved over to the backgroundworker. it
looks like it gets the data from the sql server async but it doesn't populate
the controls async so it looks sync.
I don't know any help would be appreciated. Tag: No image with treeview Tag: 97191
Click Event on MenuItem with subitems
Hi group,
I have a MenuItem with some subitems. I don't want the Click-Event of the
MenuItem to show me the subitems, but to do something else - e.g. opening a
dialog. The subitems will be shown anyway by mouseOver.
MenuItem submenuImages = new MenuItem("Image", new
EventHandler(this.menuItem_Image));
or
submenuImages.Click += new EventHandler(menuItem_Image);
But this EventHandler is never accessed. Why?
I also tried to derive from MenuItem to create my own MenuItem and overwrite
it's OnClick - but it seems to me, that this is not possible.
Florian Tag: No image with treeview Tag: 97187
disabling back button of window
Hi
In my web application,in one of the page
where I need to disable the back button of the toolbar.
Suggestions on this are welcome.
Thanks,
Vani. Tag: No image with treeview Tag: 97186
Drag And Drop Issue
Hi,
I am trying to drag and drop a control (created by us and not default
window controls) over VS .Net C# app form and this drag and drop work
on VS .NET 2003 but not in VS .Net 2005 and this work iin VS .Net 2005
if i drag the control over component tray.
If this is some known issue, please with some info.
thanks Tag: No image with treeview Tag: 97175
Request for the permission of type System.Net.SocketPermission
Hi,
i have client/server socket application, but when i run the client in a
separate computer i get this error below.
Request for the permission of type System.Net.SocketPermission
I search the net but it leads me to caspol or mscorcfg.msc.Is there
other way to NOT configure using these tools when deployed?
Your thoughts. Tag: No image with treeview Tag: 97173
problem in global catch for all exceptions
Hi,
I have added a try/catch block in the Main() method of my c# window
application to catch all exceptions in the application. But it is no
catching the errors thrown from timer's tick event. My code is give
below:
[STAThread]
static void Main()
{
try
{
Application.Run(new Form1());
}
catch (Exception exec)
{
MessageBox.Show(exec.ToString());
}
}
private void timer1_Tick(object sender, System.EventArgs e)
{
throw new Exception("throwing exception from timer..");
}
Now it shows a windows exception from timer's tick event. Can any on
help me to fix it?
Thanks in advance
--
jjoh
-----------------------------------------------------------------------
jjohn's Profile: http://www.hightechtalks.com/m87
View this thread: http://www.hightechtalks.com/t234875 Tag: No image with treeview Tag: 97170
Page setup dialog
in VS 2003
Page setup dialog margin settings are in Inches
But i need it in milli meter, how it is possible
Regards
arafath Tag: No image with treeview Tag: 97169
Resetting Combo to original state
Hello,
I'm using a combo box and some text boxes on an input form. When the user
submits the input, all the textboxes should be cleared & the combo box reset
to the way it was originally displayed (order desc.)
How do I 'refresh' to combo box to display as it did? It is bound to a
dataset via DisplayMember & ValueMember so it was not filled
programmatically. How do I do this programmatically? (or not?)
Thanks in advance for any clues.
Ant Tag: No image with treeview Tag: 97167
Richtextbox control question
Is there anyway to create similar behaviour to BeginUpdate and EndUpdate in
a richtextbox control? I've seen a few work arounds on the net but they use
unmanaged code.
Any help would be appreciated,
Chris Tag: No image with treeview Tag: 97165
Form Loading Issue - VS.NET 2003
Hello,
I have a dialog in my VB.NET application that has some controls for
configuration and an "Apply" button. The design calls for the Apply button
to be enabled only after the user has made changes to the settings. To do
this the change events for each control are used and the Apply button
enabled when any control raises a change event. The problem is that when the
form loads and default values are output the controls (correctly) fire
change events. Is there a mechanism to get around this, so that only user
changes enable the Apply button?
Thanks,
Sid. Tag: No image with treeview Tag: 97163
DataGridView automatically selects first row
I'm setting the datasource of a DataGridView to a datatable. This
loads the grid correctly but it automatically selects the first row in
the grid, triggering the SelectionChanged event. Is there a way to
stop the grid from automatically selecting the first row?
Thanks. Tag: No image with treeview Tag: 97161
ComboBox design-time DataBinding setting questions.
These setting mystify me for these reasons.
*SelectedItem* - Help says that 'SelectedItem' gets or sets the
currently selected item in the combobox.
*SelectedValue* - Help says that 'SelectedValue' gets or sets the value
of the member property specified by the ValueMember property.
*ValueMember* - Help says that the 'ValueMember' Gets or sets the
property to use as the actual value for the items in the ListControl.
The above three properties are described as results of runtime events!
What are they doing in the properties section of the ComboBox?????
How do I use them to sync a databound combobox on a form with the
current bound row on the form?
Please help me understand how to use these settings?
Thank you,
dbuchanan Tag: No image with treeview Tag: 97159
maximized MDI Child position shifts
Hi.
I'm using VS2005, Framwork 2.0. I have an MDI app. The child forms
are maximized within the parent. The child forms have the controlbox
property set to false and the text property is empty.
When my child form opens, the top 40 pixels or so get covered up by the
parent. It seems that the child form is shifted up. So I changed my
child form so that all controls are shifted 40 pixels down, leaving 40
pixels of empty space at the top. When I do this, the child form shows
up correctly as the empty space gets covered up rather than my
controls.
But once and a while (I haven't found the pattern yet) the child form
will shift back down that 40 pixels leaving me with blank space up top
and covered controls down below. Has anyone else seen this behavior?
I have noticed that if I put a value in for the text property of the
child form, I don't have to shift my controls down 40 pixels and I
don't get the random shifting. But the parent form takes this child
text property and appends it to it's own text property in brackets.
Mabye the answer is to put something in the child text property and
somehow override how the parent writes it's text property? Can someone
help me on how to do this?
Thanks in advance. Tag: No image with treeview Tag: 97158
Dll Reference Performance
Are there any performance issues, if we have many dll reference added to our
project.
Any way, does it take more time to load the application if we have many dll
reference added to a project, even though we don't use at application load.
Does more dll takes more time to load.
If we merge many dll into one does it improve the performance.
Our application takes long time to load, and we are doing nothing at
startup. We are using "no touch deployment".
Please suggest any way to load the application faster.
Any help greatly appreciated.
Dan Tag: No image with treeview Tag: 97155
Making a Winforms app behave like a Console app
I am attempting to add a "console mode" to my Winforms app. My intention is
that when I start the app with a special switch (for example "myapp.exe
/batch") to does not launch a graphical UI but instead just displays console
messages.
My first guess was to simply change the Main method of the startup class to
do something like this...
if (batchMode)
{
Console.WriteLine("Now in batch mode");
...
}
else
{
MainForm.Run(); // Launch graphical user interface
}
Unfortunately, it looks like my app does not behave like a real console mode
app in either case. When I execute the app from the command line, the app
returns immediately and text output by Console.Write() does not appear
anywhere.
Setting the app as a Console mode application does not give me what I want
either. With this mode, a big black console output box appears even when in
"GUI mode".
Is there a way to build one executable that supports both modes and
dynamically switches at runtime? Tag: No image with treeview Tag: 97151
Sync databound combobox to current bound record in form
VS2005
I've been reading all the help I can on the topic (MSDN, other) but I
can't make sense of this.
Desired behavior;
The user is to choose from the displayed list of the databound combobox
and the coresponding 'Id' from the lookup table is to be inserted into
the field of the new record.
I have two simple tables. "tblPerson" is the data table. The lookup
table is "lkpPersonType".
The combobox dropdownstyle is "dropdownlist" to limit the user to the
list.
Here are the two tables
"tblPerson"
Id int IDENTITY (1, 1) NOT NULL ,
Name varchar(50),
Address varchar(50),
fkPersonTypeId smallint
"lkpPersonType"
pkPersonTypeId smallint IDENTITY (1, 1) NOT NULL ,
Type varchar(50) NOT NULL ,
The form has two binding sources "TblPersonBindingSource" for the data
table and "lkpPersonTypeBindingSource" for the lookup table.
The Display Member of the combobox is the "Type" field and the value
member is "pkPersonTypeId" field.
The Text property of the combobox is set to the "fkPersonTypeId" of the
table "tblPerson".
The next parts I am unsure of...
I did not set the Selected Value (???)
I set the Selected Item to the "Type" field of the lookup table
lkpPersonType
When I run the app the combobox populates. The data seems to display
properly for the first record, but the combobox does not cycle through
the values I know are assigned to it for the other records. In other
words it is not properly bound. However there is a relationship between
the two tables in the dataset, but the relationship is not specifically
refered to in the form.
Here is my code in the load event;
\\
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.TblPersonTableAdapter.Fill(Me.DataSet1.tblPerson)
Me.LkpPersonTypeTableAdapter.Fill(Me.DataSet1.lkpPersonType)
Me.FkPersonTypeIdComboBox.DataSource =
Me.lkpPersonTypeBindingSource
Me.FkPersonTypeIdComboBox.DisplayMember = "Type"
Me.FkPersonTypeIdComboBox.ValueMember = "pkPersonTypeId"
'Me.FkPersonTypeIdComboBox.SelectedValue = ???
'Me.FkPersonTypeIdComboBox.SelectedItem = "Type"
Me.FkPersonTypeIdComboBox.Text =
"TblPersonBindingSource.fkPersonTypeId"
End Sub
//
Please help me make some sense of this and get it working.
Thank you,
dbuchanan Tag: No image with treeview Tag: 97149
XP Visual Styles in 2005
I'm trying to set the application to use XP visual styles, but in the
properties page I tried to set it and I get the following:
Startup object must be a form when 'Enable application framework' is
checked. I have a sub main starting up the application and in there it
determines which portal the user is eligible to use. So how do I get around
this issue with having a form being my startup?
Thanks Tag: No image with treeview Tag: 97148
Form Gradient Background
Is the code below the proper way to achieve a LinearGradient
Background on a form?
Private Sub MyForm_Paint(ByVal sender As Object, ByVal e As
PaintEventArgs) Handles Me.Paint
Dim oBrush As New LinearGradientBrush(Me.ClientRectangle,
Color.AliceBlue, Color.CornflowerBlue, LinearGradientMode.Vertical)
e.Graphics.FillRectangle(oBrush, Me.ClientRectangle)
oBrush.Dispose()
end sub
The reason I ask is because it looks like the Paint event is fired one
time for each control on the form. Tag: No image with treeview Tag: 97147
ClickOnce Deployments and XML DataSources
I have been trying to deploy a ClickOnce application -ONLINE- with an XML
datasource which contains some stringtext. Any way, i have the Build Action
set to "content" and the Copy to Output directory to "Copy Always". the
applicaton runs fine locally but when i deploy it I get a file not found
error. Is their a best practice for deploying files either XMl or text with a
click once applicaiton? (run Online or work offline?) Tag: No image with treeview Tag: 97145
How can I find BindingSource has some changed data.
Hi,
In my WinForms application, I have a set of controls that are bound to a
BindingSource control.
When the user closes the form, I need to ask him if he wants to save data.
The problem is I cannot find anyway to check if the value of any textboxes
is changed!
Obviously checking DataSet.HasChange is not adequate. The reason is that the
user might be in middle of adding or editing a record so the record has not
been reflected to underlying dataset yet, but user accidentally clicks on
form close button.
Any help would be appreciated,
Alan Tag: No image with treeview Tag: 97142
MDI Child Forms -- Diffrent Behavior in new Framework
I have an exsiting MDI application. I have the when the child is called from
the Parent, I set it's DockStyle to fill, I also have the child form set to
maximized
In VS 2003 and 1.1 this works the way I want it to, the child form is
maximized whithin the parent so that a title bar is not displayed nor is a
window border, it looks like it's a panel in the parent form.
In VS 2005 and 2.0 it will not draw this way, no matter what I set the
window size property to, the child still draws as a window within the parent
leaving a thin border where it's docked in the parent.
Any idea what I need to do to make it function like the 1.1 version?
Thanks,
Justin Tag: No image with treeview Tag: 97141
Set Text in DropDown
Hello,
I have a DropDown that is bound with a array containing 3 strings:
First, Last, All. These options indicate how many objects the user
wants to analyze. So, the user shoud choose one of these options, or
type a number.
These information is then saved, to be reloaded later.
My problem is to load the configuration when a number was typed. I've
the DropDown bound and I want to write the number in the text field.
I'm doing the following:
CB_Counter.Text= counter.MaxValue.ToString();
but this doesn't work, because the selectedItem is not -1.... I've
tryed to do CB_Counter.SelectedIndex = -1;
but nothing happens, and the SelectedIndex remains 0.
Hope you can help me, thanks in advance!
ACC Tag: No image with treeview Tag: 97133
Problem with printing and PrintControllerWithStatusDialog
I have a problem with printing and the PrintControllerWithStatusDialog
class.
I have installed the Danish language pack (on and English language OS) and
set System.Threading.Thread.CurrentThread.CurrentUICulture to Danish, but
only part of the dialogbox show up in Danish. Only the caption is in Danish,
the rest is still in English.
How do i make the printing progress dialog show up in the UICulture I have
selected for my application?
Per K. Jensen Tag: No image with treeview Tag: 97130
fill dataset with stor pro
Dear all
I create one stored procedure have two select statement on it
Then i want to fill one dataset(with two datatable) by this stored
procedure, how can it do? Tag: No image with treeview Tag: 97128
How to compare two string
How to compare two string
e.g
i compare two string
e.g User == user is true
however i want User == user is false by 'U' and 'u'
do u know what i said Tag: No image with treeview Tag: 97124
I want to put an icon next to one node in a treeview, but nothing next
to the others. Is there an easy way of doing this?