|
Hi,
I am new to windows forms prog. I want to use a drop down list in windows form like they do in web forms. I tried combobox and set its dropdown style to drop down list but when i try to bind data to it from a database by setting its datasource as ad dataset, i am seeing only this in the combo box.
System.Data.DataViewMember.
Please help...
If you fail for the first time , call it version 1.0.
|
|
|
|
|
It is fine upto setting the datasource of the combo box.
But Just by setting datasource, the combo doesnot understand which field of the table to be displayed.
For that you have to set the DisplayMember property.
The displaymember property will contain all the coulmn names of the table you have retrived in the dataset.
If you want to display some property (e.g. Name) and internally use another property (e.g ID) then you can set ValueMember property as follows
DisplayMember=Name;
ValueMember=ID;
Hope this helps.
|
|
|
|
|
i hv urgent need of a morphological analyzer,plz can anybody provide me as i want 2 modify that for my own final project which is entitles as"morphological analyzer for hindko" i-e for an asian lang,i need its source code ,i know im asking 4 a strange and full help but im student of Msc and hv 2 submit on account of final proj and i hv worked for research bt its developing is challenging bcoz of little time,
tools C# and XML are prefered,plzzzzzzzz sm_jbn@hotmail.com
shimshal
|
|
|
|
|
|
nice
but now i hv not need of asking as i got the idea to do that and now going v successfully.
with regurds,good bye
|
|
|
|
|
Hello,
You are always welcome with a real question!
imshimshal wrote: i got the idea to do that and now going v successfully
I'm very happy for you. Good work!
Maybe you can post the concept or parts of the code for others in future?
All the best,
Martin
|
|
|
|
|
The title says it all. There is no need to use sms spk in these forums as you are neither limited by typing or screen space as on a mobile phone.
|
|
|
|
|
nice
but now i hv not need of asking as i got the idea to do that and now going v successfully.
with regurds,good bye
|
|
|
|
|
In my project i want to read to records one by one how to write query
|
|
|
|
|
Plz explain what u r trying to achieve
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
hi,
I am trying to develop an application that integrates with active directory.
I am stuck with a part of it where i need to get the groups found in the active directory on a certain dc.
I am using the LDAP connection.
Any help??
|
|
|
|
|
Hi,
When i load an xml file into a datagridview, it loads a few nodes which i rather not load in the datagridview.
This is the content of the xml file:
<root>
<book>
<price>20</price>
<title>whatever</title>
<timeProduced>60958234643051454<timeProduced>
</book>
</root>
And it loads all 3 nodes (price, title and timeProduced);
And i dont want to load the timeProduced node.
This is how i load the xml file into my datagridview:
DataSet xmlDoc = new DataSet();
xmlDoc.ReadXml(path);
this.grdSmsHistory.DataSource = xmlDoc;
this.grdSmsHistory.DataMember = "book";
How can i prevent that?
Thanks in advance!
|
|
|
|
|
hi,
i think you can do that by integrating through the DataMember property of the dataGrid ofcourse after assigning the data source for the data grid.
you can do so in the properties panel of the DataGrid.
hope it helps
good luck
|
|
|
|
|
Hi,
Thats exactly how i have it although not in the property panel of the datagrid.
I've used DataMember twice, but that caused an error which closed the program.
|
|
|
|
|
|
Hi,
Its in dutch i'll try to translate it...
"Cannot create an underlying list for field price".
|
|
|
|
|
DataSet xmlDoc = new DataSet();
xmlDoc.ReadXml(path);
<code>xmlDoc.Tables["book"].Columns.Remove("timeProduced");</code>
this.grdSmsHistory.DataSource = xmlDoc;
this.grdSmsHistory.DataMember = "book";
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi,
Thank you very much EricDV!
|
|
|
|
|
Hi
i have created a C# DLL in VS2003 and installed it in GAC with WISE installer which actually register the dll in gac and add registry key.
i am calling this dll from vbscript by using createobject method when
i first time installed the dll and access it from script it works fine
but when i change the version number after some updates in the code and install it again its not working
in event log its giving the error for Invalid class string when i call it from vbscript.
i even remove the previous version before new installation and restart my pc.
this happen for all the dlls i m working they all work first time same error after new version of dll
But if i change the ProgId its start working again.
the problem is i dont want to change Progid every time i create new version.
Any help
thanks...alot
Nav.
Nav.
|
|
|
|
|
Hi all,
If i have selected the last item in the listview... example the index is 3 that means it is the fourth item, right... if i delete this item... and refresh the listview, i get an error that says: "InvalidArgument=Value of '3' is not valid for index. Parameter name: index". I think this is because it tries to select the deleted item again as this was the last item selected before the delete and refresh. How do i clear the index as so that there is no selected item?
Thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
After deleting the item from the listview, are you using the index property somewhere?
Because when you delete the item from the listview, its value from the selectedindices collection is also deleted.
Check once?
|
|
|
|
|
System.Windows.Forms.ItemCheckEventArgs e
to delete the item from the arry we have:
_myArrayList.RemoveAt(e.Index);
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
After we removed the item from the arraylist... we clear the items from the listview and for each entry in the arraylist we add into the listview...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi genius,
Nice to meet you here!
When developing BI programs with SQL Server 2005, I got this problem:
Users want the report should be exported in office excel 2003 format, and stored in PIVOT TABLE.
We have decided to use OLAP tech in SSAS(SQL Server2005 Analysis Services) to generate cubes.
If we just use excel as a client tool, and create a pivot table which connects to the cube database, it's ok.
But, the users want to download the excel file from a web page, further more , they want to filter the data through the web page.
How can I do?
Help inline.
Thank you!
|
|
|
|
|
Hi everyone,
I'm sure i've read everything i can find on the web about CurrencyManager and Databinding and I still can't find a (good) answer to a really annoying problem.
I've solved the problem enough to get development moving again but the hack breaks every law of OO programming known to man and i'm sure will cause other problems for me down the line.
I'm trying to raise an event from a collection class that has its data updated by a class that sits monitoring some web services on a background thread. This collection is bound to a DataGridView. When data arrive in the collection class it raises a ListChanged Event. I then get the delightful cross-threading... error. I've tried inspecting the ListChanged.Target and it's a CurrencyManager Object. I've looked at the CurrencyManager object on MSDN and it has no Invoke method. I thought cool it's got a bindings collection, one of those will be a control and i'll invoke against that, this seemed to make sense until i realised that there were 0 items in the bindings collection.
My truly filthy hack is to pass a control from the UI into the monitoring class. This is obviously very wrong as this class should know nothing about the objects connected to it.
Does anyone know how to find a control given a CurrencyManager, why i don't appear to have any items in the bindings collection or how i can get my event to fire on the UI thread by any other means.
Thanks in advance,
Russell
|
|
|
|