|
Save that data into the XML format.
If you are saving data into the XML format than it is also like a text file.
But it will also give you facility to manage the data into the proper format.
And .Net also allow methods to directly read write into the XML files using Dataset.
Hope this help!!!
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
Hey yeah, my buddy just recommended something similar too! That helps quite a bit, and I'll do my own digging on that. Thanks for the advice
- Per J
while(fork()){
fork();
}
|
|
|
|
|
Hi there.
I have had a search on the net but can't find anything that matches what i need. I have a datagrid which I have displaying entries from a dataset. What thw problem is, is that the same person displays multiple times depending on how many skills they have. EG
Tom Hanks Skill1
Tom Hanks Skill2 bla bla
I want the skills to display in one row. EG
Tom Hanks Skill1, Skill2, Skill3 etc.
I found something on the code project but it doesn't seem relevant.
I think I have my sql select statement correct but I'm thinking I'll need some sort of loop?
Thank you
|
|
|
|
|
1. Concatenate all skills for a person into a single string, and display that as a Skills column. Eg: Neo | Male | 22 | Kung fu, Jujitsu
2. If you know a person can have only N skills, create N extra columns called Skill1, Skill2... SkillN and add them to your grid.
3. You can display the skills in a nested grid.
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
Thanks. That could work but they can have up to 20 skills. Is there a way to get maybe a drop down box with results or all results in one field?
|
|
|
|
|
falles01 wrote: Is there a way to get maybe a drop down box with results or all results in one field?
Umm, I said you can concatenate all the skill values into a single field and display them in a Skill column. DDB - not sure (I'm not much of a winforms guy) but you can google for it.
If you don't mind paying, Infragistics has a grid that can display grids within a grid, which may be to your liking.
Whereabouts in Australia are you? I have a mate in Brissy.
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
Adelaide. Not really close to brisbane at all. The opposite side of Australia actually.
|
|
|
|
|
You mean concatenate the skills into one field using sql? How do you do that? My sql statement gets all the correct skills but how do you get it into one field? wouldn't I need some c# code for that?
|
|
|
|
|
Without seeing your code, there's no way I can tell you how to do it. Perhaps you should google for this stuff, it's fairly simple.
Tip: You need to add a new DataColumn that will contain the skills to your DataTable.
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
Thanks. I never ask a question on a forum unless I hae thoroughly searched google and haven't found anything or I don't know what I'm searching for, hence the question.
In regards to your tip, I already have a skills column which works fine but just displays each new skills in a new row. Do you mean create another column for skills?
|
|
|
|
|
Sorry but I'll give you my code so oyu can see what I currently do.
string sql = "bla bla ";<br />
<br />
SqlDataAdapter myCommand = new SqlDataAdapter(sql, myConnection);<br />
<br />
DataSet ds = new DataSet();<br />
myCommand.Fill(ds);<br />
DataView Source = ds.Tables[0].DefaultView;<br />
Source.Sort = sortField;<br />
dgSearchResults.DataSource = ds.Tables[0];<br />
After this would I then create a new datacolumn?
I found this link. Is it something like that? and then I have to concatenate string somehow?
http://msdn2.microsoft.com/en-US/library/system.data.datacolumn.aspx">http://msdn2.microsoft.com/en-US/library/system.data.datacolumn.aspx
|
|
|
|
|
I added a CheckBox column to my DataGridView and here is the code:
private void Form1_Load(object sender, EventArgs e)
{
try
{
SqlDataAdapter DataAdapter1 = new SqlDataAdapter("select EmployeeID,LastName,FirstName from Employees", dbProfiles);
DataTable DataTable1 = new DataTable();
DataAdapter1.Fill(DataTable1);
dgvResults.DataSource = DataTable1;
//dgvResults.DataBindings.Add(DataTable1);
DataGridViewCheckBoxColumn col = new DataGridViewCheckBoxColumn();
col.Name = "Column1";
dgvResults.Columns.Add(col);
}
catch (Exception ex)
{
MessageBox.Show("Error");
this.Close();
}
}
How should I edit this code inorder to select the whole row using the CheckBox?
|
|
|
|
|
Have you tried "FullRowSelect" property?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hello I have a data grid view and when I press the delete key, even though I have a message box to confirm the delete, the delete happens either way. Any ideas on trapping the delete key?
thanks j
private void dataGridView_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
{
DialogResult yn = MessageBox.Show("Are you sure you want to delete this row?", "DataGridView Delete", MessageBoxButtons.YesNo);
if (yn == DialogResult.Yes)
{
}
if (yn == DialogResult.No)
{
MessageBox.Show("record was not deleted");
}
}
|
|
|
|
|
Just use the KeyDown event for your datatgrid. The keydown event gets fired before the control knows about a key being pressed.
Then you can check if the key pressed was the delete key, and then if you want to cancel the delete, set e.Handled to true.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
Thanks I am going to give that a try!
J
|
|
|
|
|
Hello all,
im having a bit of a big problem with some modules/plugins that i want to add to my c# project on VS2005...
Im trying to load a UserControl from another assembly loaded by the /bin folder of my .NET application.
Iv found some methods but none of them worked !
Im looking for a way to load a form, or a UserControl because it can became another sub-application to my main application, but i want to load it dynnamicly, so i can just copy/past another module/plugin and the program will recognize it automatically...
So UserControl seems a good choice, it can have controls and i can code freely inside of it, all i have to do is to add it to my main page and i have a sub-application inside my main one.
SO!
how can i do that??!?!
is there another way better than UserControl ?
remembering that i DO NOT want the fixed name of my control "mycontrol.ascx".. i just want to PASTE my assembly on my bin folder and load it...
i was able to find the assembly, find the Type of my usercontrol but when i try to load it with:
Activator.CreateInstance(theType);
it doesnt work.... it loads, but no control is visible when i call add() ...
but!
if i could just get the filename of my Type ( of my ascx class inside the Assembly ) i could just do it using:
UserControl uc = (UserControl)LoadControl(controlPath);
PlaceHolder1.Controls.Add(uc);
and done! ... but i wasnt able to find the filename of the ".ascx" file...
so, im stuck....
anyone can help me?
thanks!
GReed
|
|
|
|
|
Does anyone know any really good DirectX / XInput articles or sites, anything? Thanks.
- "Achieving all knowledge does not mean achieving all wisdom." some wise dude
- I love D-flat!
|
|
|
|
|
Im trying to open a minimized window,
How would i do this?
I tryed sendmessage(handle, 0x0112, ** , 0)
** = WM_SHOWWINDOW and WM_SETFOCUS both didnt work.
Help please.
|
|
|
|
|
On my wrong computer right now so don't have access to MSDN - but try WM_RESTOREWINDOW(or whatever it's called) or WM_MAXIMIZE - essentially Show Window is used when the window is hidden (different from minimized), and set focus just set's the focus, it won't restore it from it's minimized position.
|
|
|
|
|
[DllImport("user32.dll")]
private static extern bool ShowWindow(IntPtr winHandle, uint op);
public enum SW : uint {
HIDE = 0,
SHOWNORMAL = 1,
NORMAL = 1,
SHOWMINIMIZED = 2,
SHOWMAXIMIZED = 3,
MAXIMIZE = 3,
SHOWNOACTIVATE = 4,
SHOW = 5,
MINIMIZE = 6,
SHOWMINNOACTIVE = 7,
SHOWNA = 8,
RESTORE = 9,
SHOWDEFAULT = 10,
FORCEMINIMIZE = 11
}
...
ShowWindow(handle, (uint)SW.SHOW);
...
Jeff
|
|
|
|
|
|
Hello
I have a form where there is plenty of textbox after sving the data
I want to empty all these textbox.
how I can do that by foreach statment
or if any one have another idea, will be greatly appreciated
instead of empty each one alone
thanks in advance
Assaf
|
|
|
|
|
In your form you could do something like:
foreach (Control control in this.Controls)
{
if (control is TextBox)
control.Text = string.Empty;
}
|
|
|
|
|
<br />
foreach (Control c in this.controls)<br />
{<br />
if (c is TextBox)<br />
c.Text="";<br />
}<br />
|
|
|
|