|
what is the datafield....asign that field in delete link
Rajendran.AL
|
|
|
|
|
i m doing in windows form
|
|
|
|
|
Yes
can check ascii value for delete key, when user press delete key. and stop the key press event
tha's all
|
|
|
|
|
how to stop the key press event?
|
|
|
|
|
what u want exactly....otherwise send your code..
Rajendran.AL
|
|
|
|
|
i created a datagrid with two columns(employee name,designation). If user select rows and if selected row contains employee name="aaaa" then don't delete that row and other rows can be deleted.
my code goes like this, initially i done dataview.AllowDelete=false to stop deletion.
private void dataGrid1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyData.ToString()=="Delete")
{
for(int i=0;i<dv.Table.Rows.Count;i++) //dv is dataview
{
if(((DataGrid)sender).IsSelected(i))
{
if(!(((DataGrid)sender)[0,i].ToString()=="aaaa"))
{
dv.AllowDelete=true;
dv.Delete(i);
datagrid.DataSource=dv;
dv.AllowDelete=false;
} } } } }
using this code when rows are selected and delete key is pressed first last column value get deleted not whole row.
|
|
|
|
|
I am trying to send email but it is give the following error "Mailbox unavailable. The server response was: 5.7.1 Unable to relay for ". Can anyone help me? thanks
this is my code
int property = Convert.ToInt32(this.ddlPropertyName.SelectedValue);
if (ws.AddMessages(txtTo.Text, txtFrom.Text, txtContent.Text, property, txtNegotiator.Text, txtSubject.Text) == true)
{
System.Net.Mail.SmtpClient sc = new SmtpClient();
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(txtFrom.Text, txtTo.Text, txtSubject.Text, txtContent.Text);
sc.Host = "localhost"; //"smtp.gmail.com";
try
{
sc.Send(mail);
Response.Write("Your Email has been sent sucessfully - Thank You");
}
catch (Exception ie)
{
throw ie;
}
}
|
|
|
|
|
Your server won't send the message, you code is working. Lookup relaying and you'll see what the problem is. You must use a domain that the exchange server recognizes, unless it is open relay(which is bad).
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
|
When I open Previous project,IDE notify :
“Application procedures required for the project(xxx.csproj) are not installed.
Has been installed to ensure that the project types (. Csproj) applications.”
I created it in XP with VS05 ago.
Now I open it in Server2003 with VS08.
What is the reason?
Thanks.
|
|
|
|
|
Hi,
Ive been trying to add a trackbar to the property grid form element in c#.
Unfortanely i only find you can draw pre defined controls with
UIType Editor and Control Paint. (Checkboxes, border style and little more).
Does anybody have some feeling about if this is possible? To draw a trackbar
on a property grid?
Thank u
|
|
|
|
|
|
Hi,
You are correct. The Microsoft PropertyGrid only allows a simple textbox, a textbox + button, or a textbox + dropdown button as inplace editors. Therefore you have 2 solutions:
1. Either host your trackbar in the dropdown window appearing when you click the dropdown button. You will need a UITypeEditor for that.
2. Or use a third party PropertyGrid like Smart PropertyGrid which allows many more types of inplace controls, the trackbar being one of them.
Best regards,
Nicolas Cadilhac @ VisualHint
Smart PropertyGrid.Net
Microsoft PropertyGrid Resource List
Free PropertyGrid for MFC
Smart FieldPackEditor.Net / DateTimePicker
|
|
|
|
|
Hi all,
I've created a simple windows application in C# and added a button to the form and associated a tooltip to the button.The problem is the tooltip is not showing up if i click on the button.(i.e)the tooltip is getting displayed properly n number of times before i click on the button, but it doesnt show up after i click on it..
wat could be the problem here??any help will be highly appreciated
thanks and regards,
raj
|
|
|
|
|
i think that you have the focus on that button and if so the tooltip doesn't appears anymore.
Try to remove the focus form the button maybe it works.
|
|
|
|
|
Hi raj,
My suggestion is you may add a mouse hover event on that button.When move over the button then fire event to show up what you want to display.
example,
public ToolTip tooltip=new ToolTip();<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
button1.MouseHover += new EventHandler(showTooltips);<br />
}<br />
<br />
private void showTooltips(object sender, EventArgs e)<br />
{<br />
tooltip.ShowAlways = true;<br />
tooltip.SetToolTip((Button)sender, "50");<br />
}
from the example, when you click on button,it will display '50'
Hope this help you.
regard
cocoon
modified on Wednesday, April 16, 2008 4:40 AM
|
|
|
|
|
well i dont want the tooltip to be displayed on click of the button.It should get displayed when the mouse pointer is idle over it for some time.
|
|
|
|
|
His code does just that.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hi raj,
I have modified it to mouse hover event. Please check it again.
|
|
|
|
|
Thanks for your help..it works now
|
|
|
|
|
hi,
i am developing custom rules according to our company coding standard being a fresher i m not familiar with this thing i dono how to write code for this particular subject. have to write rule in cs file n implement these rules in Fxcop and have to analize error according to it.how to write code for avoid having more than 5 arguments in the method. atleast tell me how to write 5 aguments in the method.
|
|
|
|
|
preetej wrote: atleast tell me how to write 5 aguments in the method.
Wow - do you know how to program at all ?
void method( int i1, int i2)
ths metod has 2 arguments.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I don't think that's what he meant to say. He wants to write a custom rule that yells at you if you create a method with 5 or more parameters.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
I took it to mean that at the end he said he doesn't even know what the rule means. It's clear he doesn't know much about programming in general from his responses.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|