|
I am working in vb.net, sql server 2005 project, I have problem. In my project have one DataSet1.xsd in this dataset have one table, in that table run time get a rows, in that all rows I want to display in Report1.rdlc Table.
I need help to all
Franics K Antony
|
|
|
|
|
Thanks in Adv.
I have 10 to 15 different controls placed on a WinForm (Grid,DateTimePicker, TextBox etc).
on form closing i want to check that whether User has done any change means data is changed or not, is their any way to cater this change event of any control , without getting change event of each control.
Best Of Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
softdev_sup wrote: is their any way to cater this change event of any control , without getting change event of each control
Not that I know of. Mostly I walk the form (foreach c in controls), and hookup small delegate that sets an "IsDirty" property.
I are Troll
|
|
|
|
|
So here's a wierd one.... (sorry for the length, but this needs some 'splainin)
I have a UserControl consisting of a TextBox , a Label , and a CheckBox . I have a ShowCheckBox property like so:
[Browsable(true),
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible),
EditorBrowsable(EditorBrowsableState.Always),
Bindable(true),
Category("Behavior"),
DefaultValue(true)]
public bool ShowCheckBox
{
get
{
return checkbox.Visible;
}
set
{
checkBox.Visible = value;
}
} (If you see any compile errors, ignore them, I'm typing this from memory. The code I actually have does compile).
This UserControl is part of the same project as my application. I can place several instances of these controls on my form and the ShowCheckBox property defaults to true, as it should. So far, so good.
Now the weird part...through a variety of actions (switching tabs on the form, recompiling or running the application, etc.), suddenly my ShowCheckBox properties all get set to false, so I don't see the CheckBox in any of my UserControls in the form's designer! Sure enough, the values are all set to false in InitializeComponent . I then go back and reset the properties to true in the designer, and I see the property settings disappear from InitializeComponent (i.e. the default value is being used). After a little while, it happens again - the values magically get set to false again. I'm thinking this has something to do with the DesignerSerializationVisibility attribute?
Even weirder...usually when something changes in InitializeComponent or in the designer, the change is automatically reflected in the other location. But when I see the property values set to false in InitializeComponent , I still see the property set to true in the designer! I probably spent about an hour or so searching Google and CP, and the only help I really found was in setting the attributes I have above.
Is this a bug in Visual Studio by any chance? Or is there some other attribute I'm missing? I'm using VS 2005 SP1, C#, Windows XP SP3, all the latest updates.
Thanks,
Dybs
|
|
|
|
|
This thread seems to be related:
http://www.eggheadcafe.com/software/aspnet/32319410/defaultvalue-attribute-on.aspx
|
|
|
|
|
i have a treeView in splitterContainer, the treeview flickers when i try to resize the Form using mouse at any of the corner screen edges. the flickering will not happen if i try to increase the Forms Width, or the Lenght. it flickers only when i increase size of the Form at the corner edges. Can you help me with this i am using VS 2005.
|
|
|
|
|
Hi Friends,
I am learning .net these days on my own. I have created a small application that gets data from access file. There are multiple rows. in each row i have 8 columns.
first column (Product Name) gets data from table1-column1.
Second column cell (Dia) gets filtered data based on value incolumn 1.
Third column cell gete data based on first and second column.
Fourth column based on 1, 2nd, 3rd. (4th column is no of pieces/kg)
we put raw material value in 5th column.
in 6th Column, we get price per piece
in 7th column, we put selling price.
8th column tells us how much we are making or loosing /kg.
Pretty simple application.
However, i know following limitations of my code
1. its not too optmized. For each drop down, data get retrieved from DB.
2. No of rows are hard coded.
3. Form apearance is not too good.
Can we do it using datagrid or some other means?
Code is at following location
Download code
Regards
Ajay
|
|
|
|
|
Ajay Fresher wrote: Can we do it using datagrid or some other means?
A DataGridView could work; it would save you from creating and positioning your own controls. Alternatively; I'd build a UserControl to represent a single line, and drop a collection of those in a Panel with the AutoScroll property set to true.
Ajay Fresher wrote: its not too optmized. For each drop down, data get retrieved from DB.
The table "MasterList" looks small enough to keep in memory, but the table "QuoteHistory" might grow large.
Is the db local, or is it on a remote computer? If it's local, then it might suffice to review the indexes on the QuoteHistory-table. If it's going to be accessed (read) by more people at the same time, consider switching to SQL Express.
Ajay Fresher wrote: No of rows are hard coded.
Well, a DataGridView (or a Panel with UserControls ) would make it easier to "add" a line to the form. I guess it's pretty hard to make it dynamic if you have to position all your textboxes and combo's in advance. Focus on adding an item (e.g., a DataGridViewRow ) on demand (a button_click)
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: A DataGridView could work; it would save you from creating and positioning your own controls. Alternatively; I'd build a UserControl to represent a single line, and drop a collection of those in a Panel with the AutoScroll property set to true.
This looks to be a better approach. I will try.
Eddy Vluggen wrote: The table "MasterList" looks small enough to keep in memory, but the table "QuoteHistory" might grow large.
Is the db local, or is it on a remote computer? If it's local, then it might suffice to review the indexes on the QuoteHistory-table. If it's going to be accessed (read) by more people at the same time, consider switching to SQL Express.
It is just a sample DB. original DB has minimum 50-60 K products. These in turn will have different dias and lengths. This DB will grow big.
QuoteHistory will anyways grow big.
Eddy Vluggen wrote: Well, a DataGridView (or a Panel with UserControls) would make it easier to "add" a line to the form. I guess it's pretty hard to make it dynamic if you have to position all your textboxes and combo's in advance. Focus on adding an item (e.g., a DataGridViewRow) on demand (a button_click)
I agree with that. Still, How can i have similar combobox approach with Datagrid? i.e. 1st column will have all distinct product types. When i select this, dia should be only corresponding to type etc etc.
|
|
|
|
|
Ajay Fresher wrote: Still, How can i have similar combobox approach with Datagrid? i.e. 1st column will have all distinct product types. When i select this, dia should be only corresponding to type etc etc.
That's possible, with an unbound DataGridViewComboBoxColumn .
I are Troll
|
|
|
|
|
Hi
I m creating a window application in vs 2005 & 2.0 .net framework
Where i have 1 form which contains lots of cntrols(textbox,checkbox,combobox,buttons )
& 1 Datagridview which will load all data in database on Form_Load event
as well as there many other database related functions are called on Form_Load event
that's why the form is taking too much time to load
So that's why i want to show a loading Image (Not Progress Bar Control ) to show till the form is completely ready
and then hide the loading image and show form
i think this can be done using Background Worker
but i found its very complicated
is there any other way to do so
|
|
|
|
|
Here[^] is an article on Code Project which will help.
|
|
|
|
|
Thanks ,
I will check that ...
|
|
|
|
|
HI All...
I Have 4 Picture Boxes On My Windows Form... On Which I Have a timer of 30 seconds..which is changing the images on picture boxes....
Now i want that when images are changing after 30 seconds ..then it change with some effect
How can i Do That...Pls Help me
Thanks & Regards
Sachin
|
|
|
|
|
override the onpaint method of the picturebox and program the effect by your self check drawing images with GDI or GDI++
|
|
|
|
|
I'm developing a program that acts like file manager. Obviously it has to be able to cut/copy/paste files.
When i cut and later paste within my application, I can set a flag that it was a >cut< operation and the files after being copied to destination should be removed from source location.
However, if I am to cut/paste between my app and some external file manager (e.g. Windows Explorer) how can I (my program) tell whether it was >cut< selected, (not a >copy< operation) in the other application ? (also, what to put into clipboard when selecting cut from menu, so that the other application that will paste, would remove files after copying them to destination) ?
Currently I'm using FileDrop type with String array of paths. But how can be encoded >cut< operation ? (some additional format, marker,..?)
Thanks for help,
Michal
|
|
|
|
|
Most programs work like this:
Cut/Copy/Delete is what happens on the source side; the steps are:
1. if not delete: copy selection to Clipboard
2. if not copy: delete selection
THEN, on the destination side, a potential Paste pastes what is on the Clipboard to the current position, replacing/deleting whatever was selected there if anything.
Now Windows Explorer acts differently: Cut dims the selection but does not delete it until it has been copied somewhere in some Explorer window, and I don't know how they do that. I can come up with ways to achieve that, within a single program, however I don't know which way MS has chosen. I expect there must be a message going back from destination to source to confirm the pasting is done, so the cutting should now be finalized.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I'm trying to achive the same thing as explorer does and I think that there must be something else placed in clipboard (upon cuting, which results in imediate dimming items) that tells how pasting application should tread source files (leave intact or delete) upon completing paste operation.
Thanks,
Michal
|
|
|
|
|
I guess I know now. It is a memory stream that is placed in Clipboard that tell whether to cut or copy only
const String PREFFERED_DROP_EFFECT_SHELL_CONSTANT = "Preferred DropEffect";
private bool IsItCutOperation(IDataObject dataObject)
{
Object isCutOperationMS = dataObject.GetData(PREFFERED_DROP_EFFECT_SHELL_CONSTANT) as MemoryStream;
if (isCutOperationMS == null)
return false;
MemoryStream ms = isCutOperationMS as MemoryStream;
byte[] array = new byte[ms.Length];
ms.Read(array, 0, (int)ms.Length);
if(array[0] == (byte)(2))
{
return true;
}
return false;
}
Thanks,
Michal
|
|
|
|
|
do you have any link or reference to such wisdom. You did not invent this yourself, did you?
TIA
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
|
Thanks,
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I want to do this:
When I'll click at the CountryName column(England), I want redirect it to me in the new form where will be corresponding CityNames(London, Birmingem,Liverpool and etc)
in countryForms I have:
<pre> private void dataGridView1_DoubleClick(object sender, EventArgs e)
{
// here when I call Citys
new City("I want Parameter here").showdialog();
//I am trying to find this parameter like this
foreach (DataRows item in storeHouseDataSet.Countries.Rows)
{
int b = (int)item["ID"];
}
} </pre>
but it is not what I want
In CityForms:
<pre> private int CountryID;
//Form1 f;
public Cities(int countryID)
{
InitializeComponent();
CountryID = countryID;
//f = new Form1();
}
public void Cities_Load(object sender, EventArgs e)
{
this.citiesTableAdapter.Fill(storeHouseDataSet.Cities);
this.citiesTableAdapter.FillByCountry(storeHouseDataSet.Cities, CountryID);
} </pre>
C# Developer
|
|
|
|
|
West1989 wrote: //I am trying to find this parameter like this
foreach (DataRows item in storeHouseDataSet.Countries.Rows)
{
int b = (int)item["ID"];
}
}
but it is not what I want
1. What is it that you do want?
2. Assuming you want 'b' to have some usable value, then you need to define b in the outer scope, and also break out of the loop when you hit the right value.
Perhaps you could clarify your question?
|
|
|
|
|
Hi all,
i have a problem with a numeric usercontrol, the problem that i have to validate the value of the textbox to contain only numeric values and number of digits before / after decimal point(i used regular expression to do the validation ). i have the validation on textChange, keyPress and leave, when i leave the textbox i validate it if its not valid i keep the textbox focused. but when i enter a wrong value and directly click save button(which will close the form). the form is closed even i set the focus in the textbox.
any idea to prevent continue in Save_click if the textbox contains wrong value ???!!!
sorry if my description is not clear.
|
|
|
|
|