|
Hi,
if you are saying about Dropdownlist then
subramanyeswari wrote: cmbModuleID.ValueMember ="ModuleID";
cmbModuleID.DisplayMember = "ModuleID";
there is not any porperty like this.. I dont Know abt this.
U can do this..
cmbModuleID.DataSource = ds.Tables["MODULE_MASTER"];<br />
cmbModuleID.DataTextField="ModuleID"; <br />
cmbModuleID.DataValueField= "ModuleID";<br />
cmbModuleID.DataBind();<br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
thanks for your quick reply. But i am not able to find DataTextField,DataValueField properties and DataBind function for the cmbModuleID combo box.
Regards
|
|
|
|
|
Hi, iam in windows application (with n-tier architecture)
im my application iam designing form with usercontrols and attach the usercontrol to mainform.
myproblem is to print usercontrol form which consists of
lables,panel,textbox and gridview control.
so please help how can i do it?
i also try with codeproject print forms code ,but it is not giving output..(it's not giving any error but it is not displaying only blank page)
with regards
murali krishna
murali krishna
|
|
|
|
|
|
hi
I don't know how i can make a folder that protected from delete
plz help me
regard
|
|
|
|
|
I think this is the third message i've seen on this subject recently. Its either coinsidence or your the same person. Either way, try searching the threads for the previous questions, and use the search box a little ways up not the one at the top of the page.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
People keep asking for clarification of what you want, yet you refuse to answer them. What makes you think anyone is going to answer your question now??
Check into NTFS security. It's the only thing that's going to "lock" a folder.
|
|
|
|
|
I have created a MDI. I have made form1 as parent form and there are menus like file edit option etc. All the menus on form1 are disabled except file,under file there are other sub menus like login logoff and these menus are enabled too. On click to login sub menu another child form2 is opened. On form2 there is command button control. The question is I need to enable the menus of parent form (form1)by click on the command button of child form (form2). please help me.
keyto
|
|
|
|
|
[^]
Standards are great! Everybody should have one!
|
|
|
|
|
Hello Friends,
How to search a string in a paragraph
|
|
|
|
|
|
I think u didn't get my prob. correctly............
Actually i've a textbox(Multiline) in which i've to search a particular string
Example:-
this is a paragraph given below and i have to search a string "quick"
then answer would be 4
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
The quick brown fox jumps over the little lazy dog.Hello How R U.
|
|
|
|
|
well i did get your problem.. but if you're not specific in your questions you shouldn't expect very smart answers.
there's an indexOf function on the string class.. this should help you
|
|
|
|
|
It made perfect sense to me, what other meaning could the question have? This is the C# programming forum after all.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
The problem was that (as per 'kin usual) the question was far too vague.
Yes you could probably derive the meaning of the question, but were constantly having to "derive meaning" rather than answering questions recently!
|
|
|
|
|
It made perfect sense to you because you knew about the context in which the "question" was asked. You failed to describe that context to anyone else here, thus we had to make a lot of assumptions as to what you were talking about. You know what happens when you assume, don't you??
|
|
|
|
|
Well, the easiest way is IndexOf:
string para = "This is a paragraph, with words and stuff.";
int search = para.IndexOf("with words and");
And then search will equal the index of the first letter of the string you where searching for, which in this case is the index of the letter 'w' in the word "with".
Of course, you can't find if it occurs again, and at what location. There's probably some article on this somewhere. Try searching CP and google.
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
haha, you see - you didnt derive the meaning of his question properly at all! If you read the other part of this thread he actually wanted to know how many times a string existed in another string... not the first index of a string as you have given the solution to.
|
|
|
|
|
Bah fine then.
The Knowledge, please don't be so vague with your questions. You make people look stupid
My current favourite word is: PIE!
I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated
|
|
|
|
|
The Knowledge wrote: How to search a string in a paragraph
Use IndexOf or a regular expression.
|
|
|
|
|
I am new programer and for class I have to make a program that store employee data, writes them to a random access file (Employee.dat), be able to edit them, print reports, etc...
I am trying to write a line each time the user hits ADD on the enter employee form.
here is what I have
StreamWriter sw = null;
validation();
getInputValues(contact);
tring filename = "Employee.dat";
contact.MyFile = new FileStream(filename, FileMode.Append);
if (validation() == false)
{
contact.Close();
return;
}
else
{
{
try
{
sw = new StreamWriter(contact.FileName);
sw.WriteLine(contact.Serialize());
}
catch (Exception ex)
{
MessageBox.Show("eror saving contact" + contact.FileName + ex.Message);
}
finally
{
if (sw != null)
{
sw.Close();
}
}
lstContacts.Items.Add(contact.LastName + "\t" + contact.FirstName);
contact = null;
}
}
}
but it just writes over the previous employee (first line of the .dat file)
How do I make it so that it write on the next line.
Thanks for your help in advance
kyle
Kyle Maldonado
|
|
|
|
|
Hi
i think calling flush on the streamwriter should solve the problem.
just one more remark..
i would change this part here
StreamWriter sw = null;
validation();
getInputValues(contact);
string filename = "Employee.dat";
contact.MyFile = new FileStream(filename, FileMode.Append);
if (validation() == false)
{
contact.Close();
return;
}
else
{
{
to
StreamWriter sw = null;
if (!validation())
{
return;
}
getInputValues(contact);
string filename = "Employee.dat";
contact.MyFile = new FileStream(filename, FileMode.Append);
it's a bit shorter, prevents you from validating the input data twice and you don't have to open the file and then close again if the input data is invalid.
greets
m@u
|
|
|
|
|
Thanks but one question. What does flush do?
kyle
Kyle Maldonado
|
|
|
|
|
streamwriter and stream use a buffer. they don't write immediately to the file.
flush forces the stream(-writer) to write down the buffer.
alternatively you can set the autoflush flag of the streamwriter to true. the streamwriter writes the data then immediatly to the file without buffering it first.
|
|
|
|
|
its not letting me add the flush method
wont it just be StreamWrite.Flush() its not letting me add the flush part.
Kyle Maldonado
|
|
|
|