|
I am not reading the dataset with ListItems. I am reading the dataset with reader.Read() and then populating the checkboxlist with ListItems.
How did you create your checkboxlist? have you hardcoded all the entries in Visual Studio or do you create it dynamically?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
I tried to copy your code but it won't let me use listitems at all because it belongs to webforms. I have used tableadapters and have used Technicalskills list to bind as below. Sorry I'm a little confused.
private void TechnicalSkillsList()<br />
{<br />
<br />
DataSet1TableAdapters.TechnicalSkillsTableAdapter technicalskillsTableAdapter = new ResourceSearchTool.DataSet1TableAdapters.TechnicalSkillsTableAdapter();<br />
<br />
DataSet1.TechnicalSkillsDataTable techSkillsDT = technicalskillsTableAdapter.GetData();<br />
<br />
foreach (DataSet1.TechnicalSkillsRow techSkillsRow in techSkillsDT.Rows)<br />
this.techSkillsCheckListBox2.Items.Add(techSkillsRow.ProgLanguagesDatabase);<br />
<br />
}<br />
|
|
|
|
|
I have worked out on my own how to save multiple skills. so now its down to automatically populating the checkedlistbox with the skills.
which still brings me back to my precious forum post,,,but I'm still working on it and i'm giving you a 5 for being such a good response anyway.
|
|
|
|
|
Okay I was wrong. I didn't work it out. I'm still trying to save multiple skills and I thought it was saving them but it was actually saving the number of the index instead of the ID. Here is what I'm using. I still need the answer of how to get the id of the ticked items and then store it.
<br />
string sql = "SELECT t.TechnicalSkillsID from TechnicalSkills where TechnicalSkillsID = '" + techSkillsCheckListBox2.CheckedItems.ToString() + "'";<br />
if (techSkillsCheckListBox2.CheckedItems.Count != 0)<br />
{<br />
<br />
<br />
<br />
for (int x = 0; x <= techSkillsCheckListBox2.CheckedItems.Count -1; x++)<br />
foreach (int i in techSkillsCheckListBox2.CheckedIndices)<br />
{<br />
<br />
sql = "Insert into EmpSkills(EmployeeID,TechnicalSkillsID) values ('" + this.EmployeeID + "','" + techSkillsCheckListBox2.CheckedIndices[x].ToString() + "')";<br />
<br />
SqlCommand adoCmd = new SqlCommand(sql, adoConn);<br />
adoCmd.ExecuteNonQuery();<br />
<br />
<br />
<br />
<br />
<br />
Thank you so much ...this is killing me! I thought I had it.
Sianny aka Sharny
|
|
|
|
|
how to connect xml file to form in windows applications and even to connect two forms in windows applications
Ramya
|
|
|
|
|
Don't crosspost in Multiple Forums.
SSK.
|
|
|
|
|
could you elaborate the question a bit more what u mean by connect xml to form in window application? As far as connecting 2 forms is concerned, u can create an object instance of form1 in form2 and call the show method to display the form, and if u want to send data across forms then better use overloaded constructors and pass data in constructors between forms.
Regards
|
|
|
|
|
You need to think about what you are trying to achieve with the connection of 2 forms. If they are just different views of the same underlying data, then you should really consider looking at either the Model View Controller or Model View Presenter patterns. There are plenty of samples on the web (especially here in CP) that show how to achieve this.
XML file? Do you mean to ask how to load it, or how to bind it to an item?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I have some blinking cursor in my RichText and in some other places in my WinForm.
How i remove it ?
Thanks.
|
|
|
|
|
If you are using Visual Studio there is a cursor property in the properties pane which gives you a list of options. If not there is a method you can try. If its not the deafult I'm sure the intellisense will give you a good option. Goodluck!
private void UpdateApplication_CursorChanged(object sender, EventArgs e)
{
Cursor.Current = Cursors.Default;
}
Sianny
|
|
|
|
|
Also could you let me know if I was correct?
Thanks
|
|
|
|
|
I looking a way to turn off / kill the line cursor that blink on rich text line in case you click on the line with the mouse.
You mean in your replay that the mouse cursor will change to the default shape - and this is not what i mean.
|
|
|
|
|
Hi All,
I'm new to C# and currently involve in a project that need me to interact with a device.They have provide me with the SDK that full with libraries written in c++. My question is can c# access a non .NET libraries?
Thanks,
-zai-
|
|
|
|
|
Yes, by using the System.Runtime.InteropServices namespace.
http://www.pinvoke.net/[^] is a very good site for information on running unmanaged code.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
Sure, there are basically two options for this. One is COM, this is only possible if the libraries are implemented as COM type libraries. Another option is DllImport, this is possible with normal C++ libraries.
You can import make a wrapper for a COM library using tlbimp.exe which is available with the .NET SDK.
You can import functions from a standard C++ library in the following manner:
public static class MyFunctionImports {
[DllImport("<dll name="">")]
public static extern void MyMethod(string text);
}
Of course you need to know the exact signature of the methods you need and the types that they need.
I know from experience that device libraries are almost always standard C++ libraries. So the second option fits best here.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
thanks to all, I'll try to use as your suggestion
zai
|
|
|
|
|
Dear All,
I've to install Primary Interop Assembly (PIA) files. How to create a setup package. Can any one suggest/guide me.
Thanks and Regards,
PL.Seenivasan
|
|
|
|
|
Hi all,
Does anyone know where i can find c# articles about "How to read a MT940 file in C#" or any articles related with that topics ?
i already search at google and at CP articles but i can't find a good articles
Thank U
Regards,
Tomi
|
|
|
|
|
This link details the file format and there are thousands of google hits for reading files in C#. Just put the two together.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
Thank U for the link MALCOLM
Best Regards,
Tomi
|
|
|
|
|
Hey,
I am trying to display a waveform visually, such as can be seen in programs like audacity or adobe audition. There is a good file for this on this site, wavecontrol, aside from it displaying the waveform on the whole form. I only want it to display in a certain area, say write it to a bitmap so that I can mess around with it using directX. Is there a way to do this?
|
|
|
|
|
Google is your friend.
Waveform display on CodeProject![^]
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
Umm... I said in my original post that I knew about this. My problem is, it displays the waveform in the entire form. Is there something out there that I can use to do this, or am I going to have to reverse engineer this code to make it myself?
|
|
|
|
|
Hi,
I want to create a very basic vector drawing application in wpf. All I need is a basic overview on how to do it. I've read a lot on the shapes in wpf. and I plan to use the Path class. Now most documentation cover the XAML but as this is an application where a user will be able to draw it with a mouse, XAML doesn't help me.
Basically the application on needs to draw in a fixed size in black, nothing more. can anyone please tell me how I will create geometry (with a path) from the mouse movements?
thank you,
Donovan
rather have something you don't need, than need something you don't have
|
|
|
|
|
I made a simple program to send files over a socket.
Its very simple, it opens the file, reads 100Kb, then sends it across, reads the next 100Kb and sends it. At the other end each 100Kb chunk is written to file as it arrives.
I sent across a 10KB file, 77MB file, with no problems. Then i came to send a rather large file... just over 4GB. I'll need to investigate more, but from what i can see the file is opened, the connection is made but it fails to send the first chunk, the recipient just sits there waiting for data to arrive.
Im unsure of where the problem might be, or what would cause it. If anyone could shed some light on the subject i'd be very grateful.
-- modified at 19:26 Tuesday 11th September, 2007
Hmm, okay file length in bytes is 4,294,967,296. To big to fit in an int right? That might be the problem. Then again, the only thing using int's is the progress bar.
-- modified at 20:45 Tuesday 11th September, 2007
|
|
|
|