|
I have this code ... I am getting an error when I declare a delegate Event
this.ChangeFilter += new System.EventHandler(this.ChangeFilter);
Error says Cannot assign to 'ChangeFilter' because it is 'Method Group'
private void ChangeFilter(object Source, System.EventArgs e)
{
// Response.Redirect("SelectSchema.aspx");
FilterByResolved(ddlResolvedFilter.SelectedItem.Value.ToString());
}
private void FilterByResolved(string strResolvedFilter)
{
strResolvedFilter = "ISCOMPLETE=" + strResolvedFilter;
try{
this.oracleDataAdapter1.Fill(this.LogDataSet1);
DataView LogFilterView = new DataView();
LogFilterView = this.LogDataSet1.Tables[0].DefaultView;
LogFilterView.RowFilter = strResolvedFilter;
DataGrid1.DataSource = LogFilterView;
DataGrid1.DataBind();
}
catch (Exception ex)
{
Label2.Text = ex.Message;
}
}
Thanks
|
|
|
|
|
I have this code but some how when I click on Hyperlink to sort it doesn't sort. I am sure I have a bug I can't figure it out ... I will really appericiate if any one can see any errors ...
In .aspx file
|
|
|
|
|
Hello,
I have created a typed dataset using a schema,
I am trying to create an instance of this dataset and get the row count.
It always returns total count as 0, when I know for sure taht there are 3 records, what am I doing wrong.?
InstrumentSettings ds = new InstrumentSettings();
ds.ReadXml(@"C:\Instruments.xml");
int x = ds.Instument.Rows.Count;
MessageBox.Show (x.ToString())
Thanks,
|
|
|
|
|
I remember having the same problem a while back and none of the second parameters I tried passing to ReadXml worked. Oddly enough, using a plain DataSet object worked like a charm.
Hopefully someone here will shed some light.
Regards,
Alvaro
... since we've descended to name calling, I'm thinking you're about twenty pounds of troll droppings in a ten pound bag. - Vincent Reynolds
|
|
|
|
|
i want to create SPSS file (.sav) in c#.net. i try searching on net, but could not find anything. if anyone know how to create SPSS file in c#.net please let me know. rigth now i am creating SPSS file manually.
Thank you,
SA
|
|
|
|
|
I can't believe I actually miss pointers and DDX! We recently started to migrate from VS6 C++ to .NET C#.
I have a form #1 with a comboBox control which contains 3 comboBoxes. The form also has a button on it which when clicked brings up another form with an instance of the comboBox control.
What do I have to do to get the original comboBox #1 to update to the same item selected when the user changes comboBox #1 on form #2???
Thanx,
Tom
|
|
|
|
|
You can do this using databinding, or use events to monitor changes. For example:
class Form1
{
public Form1(ComboBox theComboBoxFromForm2)
{
theComboBoxFromForm2.SelectedValueChanged += MySelectionChangedFunction;
}
void MySelectionChangedFunction(object sender, EventArgs e)
{
this.comboBoxOnThisForm.SelectedItem = ((ComboBox)sender).SelectedValue;
}
}
As I mentioned, you could also do this with databinding. You also do not have to pass the combobox into the constructor; you could setup a public get/set property and do it there. Or you could have some governing code that sets it all up for you. There are many different ways to do this with object oriented programming; you just need an instance of each combo box accessible to some piece of code, and you're good to go.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: How 'bout a little guitar now?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
There are several ways to do this. You can monitor the combobox events on form2 from form 1 as Judah Himango posted or you can create your own custom events on form2 and montior those from form1.
Those are close to the same so the code example is for this last one: if you are showing form2 using ShowDialog you could always check the properties of form2 after it has closed on your form1.
<br />
class Form1<br />
{<br />
public void Button1_Click(sender object, System.EventArgs e)<br />
{<br />
Form2 frm2 = new Form2();<br />
<br />
frm2.ShowDialog();<br />
<br />
this.DropDownList1.SelectedIndex = frm2.DropDownList1.SelectedIndex;<br />
<br />
frm2.Dispose();<br />
}<br />
}<br />
<br />
Like we said there are many ways to do this and which you choose depends on what you are trying to accomplish.<br />
-Richard
|
|
|
|
|
Hi there
I have a problem where the designer does not support manipulating my third party controls. They can be manipulated programatically with ease. However i would like to exploit the designer for at least previewing the changes.
What i initially wanted to do was insert a method call into InitializeComponent() so that my changes would be picked up in the designer for previewing. But i guess this isn't the way to go?
Anyone any thoughts? or suggestions on how i could achieve this?
Cheers
Richard J
|
|
|
|
|
Hi. I built a client/server system that communicates with sockets. I used System.Net.Sockets.TcpClient and NetworkStream. I wonder if there is a simple way to encrypt the data so that it can not be viewed from outside. Would be greatful for any help
/Robert
|
|
|
|
|
There are plenty of built-in classes to aide you. See the System.Security.Cryptography namespace and its members.
|
|
|
|
|
|
Hello,
I'm developing a windows form client application. It has to work with our server application.
Our server application is a scanning application which needs .tiff files.
What I want to do is to "scan" digital documents such as .doc, .rtf, .pdf, .txt and convert them to .tiff files so the server can handle them. One problem I don't know how to do, and where to start.
So does anyone know a solution for this problem, or at least a direction to look?
Thanks....
Fedor Brouwer
X-Solutions
The Netherlands
|
|
|
|
|
For text, you could just create an in-memory bitmap, draw the text on it, and save to tiff.
For rtf, you should be able to do the same using the RichTextBox control and the DrawToBitmap method of the Control class (.NET v2).
For proprietary, closed types such as doc and pdf, you might need some library to parse them out for custom rendering. I can't help you there; I know there are several PDF reader and writer SDKs out there...I'm not sure if any of them support rendering them to bitmap.
|
|
|
|
|
Following up on Judah's suggestion, you may want to check out this[^] PDF to image converter.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I need to call a win32 api into c#
can any 1 suggest any example program to help me understand the idea.
Please any1 out there reply coz i realy need help...
|
|
|
|
|
|
Have you not already asked this question in a round about way?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
I am creating a setup project in Visual Studio. Apart form installation, I also want to run a batch file during setup. How do I do that?
Thanks in advance.
|
|
|
|
|
|
Is it possible to get a readily available directory and file browser control of like windows explorer so that i can have it populated in a treeview from which i can choose whichever file i want to open.
|
|
|
|
|
System.Windows.Forms.OpenFileDialog, System.Windows.Forms.FolderBrowserDialog
|
|
|
|
|
I have a TabControl 'tabcontrol1', which i am populating with 5 tabpages at runtime. Now i also have another TabControl 'tabcontrol2' which has 2 tabpages of its own already. I want to add 'tabcontrol2' on every one of the 5 tabpages of 'tabcontrol1' when they get created during runtime.
Any suggestions !
|
|
|
|
|
You cannot add a control to multiple parents, AFAIK. Since only one tab can be viewed at a time, just add the tabcontrol2 to whichever page happens to be visible at the time.
|
|
|
|
|
Hi,
I want to perform some action by event handling when
the app window go top and not go top when the user choose
another application on the desktop.
I have try Form.Activated, Form.Deactivate, Form.LostFocus,
Form.GotFocus, Form.Enter, Form.Leave, but none of them work !
Could any one help me pls ?
Thanks
|
|
|
|