|
Thanks, I've been trying to figure this out for 8 years, I can finally move on with my life now
|
|
|
|
|
I'm trying to modify the filtered query example in the Noyes data binding book (ch 8) and have come up with a problem that I expect is reasonably standard:
If a user filters outside of the data set, ie the data filter returns 0 rows from the binding source the column names populated in the combo box a cleared.
The basic question then is how can I get the shape of a dataset, specifically column names from a dataset with no rows.
This is an issue for performance in my case as in the first instance I need JUST the shape of the data set to which the binding source is bound. ie I don't want to retrieve the 100,000 rows in my table and then filter them, I need to apply the filter then refresh the dataset (think search engine).
and I would prefer to do this from a control library.
Any suggestion would be most welcome.
Thanks,
Paul
|
|
|
|
|
Hi Paul
Use "FillSchema" method to get only data structure and call "Fill" method when you need to get data.
eg.
yyy.FillSchema(dt, ....mapped)
xxx.DataSource=dt
|
|
|
|
|
To reproduce:
1. run code, select upper
2. press Tab
Observed:
combobox contains lower
Expected:
should contain upper
How to fix ?
using System.Windows.Forms;
using System.Data;
class testForm : Form {
ComboBox comboBox1;
testForm() {
DataTable t = new DataTable();
t.Columns.Add("displaymember");
t.Columns.Add("valuemember");
t.Rows.Add("lower", "a");
t.Rows.Add("upper", "A");
comboBox1 = new ComboBox();
comboBox1.DisplayMember = "displaymember";
comboBox1.ValueMember = "valuemember";
comboBox1.DataSource = t;
comboBox1.DataBindings.Add("SelectedValue", new bo(), "controlsrc");
TextBox tb = new TextBox();
tb.Top = 100;
Controls.AddRange(new Control[] { comboBox1, tb });
}
class bo {
string t;
public string controlsrc {
get { return t; }
set { t = value; }
}
}
static void Main() {
Application.Run(new testForm());
}
}
Andrus
|
|
|
|
|
Have you figured this out or still working on it?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I found solution: by default search is case insensitive.
Andrus
|
|
|
|
|
Hi,
I have a created an application using Windows Forms, which is aimed at novice, and potentially young users (teenagers). I would like to maybe change the appearance of the standard menus and buttons, etc, or mayve curve the corners; or anything really that would be more appealing to younger people.
I'm fairly knowledgeable with .NET's Windows Forms, but not with changing their appearances, etc - apart from applying images/colours.
Is there any articles/tips on this sort of thing? To honest my time doesn't allow for much research into this sort of thing, so if it's not possible *easily*, it's not possible.
Thanks,
Cormac
|
|
|
|
|
|
Thanks for the advice.
Cormac.
|
|
|
|
|
After i have created a services in c# using the processservices class, this services contain only a method GetDate().
but can any body tell me how can i interacte with this sevices. for example, i should have a method instead of GetDate (): Establishconnection(param..) that help me to connect to an Sql2005 server (this method is with the services). And after, i should connect to this services from a client application and call this method and then get the connection with the SqlSever without having an sqlclient in the client machine.
regards, bye.
etretyertyery
|
|
|
|
|
If I understand your question, you want this "service" application to provide the connection to you client applications without having a SQL Client installed on them. I do not think this could easily be done. However, you should look into creating a WebService to get your data if you do not want your clients to have the SQL Client.
|
|
|
|
|
i think that u have understand the idea that i need.
i think that the solution is to use a dcom server implemented like a windows services.
but what is dcom i don't know
any way 10x
etretyertyery
|
|
|
|
|
I'd like to add a trusted site to a bunch of computers. Is there a registry key I can adjust or add using a .reg file?
|
|
|
|
|
How can I build a table on a Windows Form?
|
|
|
|
|
Don't post in multiple forums. There is a reply in c# forum so reply to that post
|
|
|
|
|
Hallo
I can't seem to change the ItemHeight property of my listboxes in C#. The property isn't readonly but if I try to change it in the properties pane in VS 2005 or even in my code they just stay the same. Am I missing something really obvious here?
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
You need to set the DrawMode property to OwnerDrawVariable.
|
|
|
|
|
Thanks, this works brilliantly. Struggled at first with the DrawString method but eventually came right.
There are 10 types of people in the world, those who understand binary and those who dont.
|
|
|
|
|
Hello,
I am implementing an application in VC++ on the .Net Platform.
I have 3 forms Form1 , Form2 and Form3.
The program when it starts running loads form1 and then proceeds to Form2 and then Form3 .
I want to be able to got back to Form2 from Form3 and then go back from Form2 to Form1.
I have tried doing this with this code on Form2 but i get error message "Form1 is not a class or namespace".
Form2::Hide();
Form1::Show();
please can you tell me what i'm doing wrong?
dee
|
|
|
|
|
You could pass the instance of the form1 to form2 via the constructor and that would allow you to do objform1::Show() inside form2.
Or
You could use the singleton pattern to get the instance of the form object and do a ::Show() ::Hide()
|
|
|
|
|
Debun wrote: Form2::Hide();
Form1::Show();
You're hoping those methods are static, and they are not.
The easiest way to do this, is to make your three forms user controls, and hide/show them within the one form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I also have exactly the same problem, how do I create the user controls?
I am using visual c++ 2005 express.
I'm using form1 as mdicontainer.
The other suggestion doesn't work for me: I can't do #include "Form1.h" in the form2 header, it gives a lot of errors doing that.
Because of this, I can't pass "this" pointer of form1 to form2.
modified 9-Dec-22 14:04pm.
|
|
|
|
|
|
I am working on a IM client,I want a rich text box which supports fonts and emoticons for my chat window,Somebody please suggest me a third party control for .NET windows application(free or purchased both will do) which can solve my problem or else suggest me a way to do it programatically in winforms.
Zeeshan
|
|
|
|
|
using browser control is fairly decent idea
|
|
|
|