|
It's a very hard coded idea but, until now, the only one that might work (i think)
I will give a try, at least until i can't find a better and efficient way to do this (because there must be a simple way).
Thanks!
|
|
|
|
|
Thank you all!
Finally a solution. I will post the code here for future people with the same problem.
Like jasper suggest before, i did set the AutoCheck property to false on all radiobuttons (4 in my case) and add just 1 event on all of them (the Click event).
It works when the user click the radiobutton or even when using the keyboard.
Perfectly as it seems to me, and not so hard coded anyway.
<br />
<br />
private void radioButton_tipo_Click(object sender, EventArgs e)<br />
{<br />
if (((RadioButton)sender).Checked == true)<br />
{<br />
return;<br />
}<br />
else if (MessageBox.Show("Are you sure?", "Attention", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)<br />
{<br />
((RadioButton)sender).Checked = true;<br />
<br />
if (sender.Equals(radioButton_tipo_SA))<br />
{<br />
radioButton_tipo_SQ.Checked = false;<br />
radioButton_tipo_ACE.Checked = false;<br />
radioButton_tipo_SQU.Checked = false;<br />
}<br />
else if (((RadioButton)sender) == radioButton_tipo_SQ)<br />
{<br />
radioButton_tipo_SA.Checked = false;<br />
radioButton_tipo_ACE.Checked = false;<br />
radioButton_tipo_SQU.Checked = false;<br />
}<br />
else if (((RadioButton)sender) == radioButton_tipo_ACE)<br />
{<br />
radioButton_tipo_SQ.Checked = false;<br />
radioButton_tipo_SA.Checked = false;<br />
radioButton_tipo_SQU.Checked = false;<br />
}<br />
else<br />
{<br />
radioButton_tipo_SQ.Checked = false;<br />
radioButton_tipo_ACE.Checked = false;<br />
radioButton_tipo_SA.Checked = false;<br />
}<br />
}<br />
}<br />
Thanks everybody for the help !!!
|
|
|
|
|
|
EventArgs e of CheckedChanged event dont have Cancel property
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks for help bicphuong!
I understand your idea but in CheckedChange event, using "EventArgs e" I will not have the possibility to use the "Cancel" property. Until now, I only found that property when using the Validating event, and the behavior was not so far way from what I want. Anyway, what happened was that sometimes he reacts like I was expecting, but sometimes not. Seems that this event occurs lately.
|
|
|
|
|
I want to have a GridView like this. But it seems DataGridView only support one line head, is there anyway to do this?
By the way, I have tried NetVantage. But I think it's a little bit slow when loading controls, so I'm wondering if I can just using DataGridView to do this?
Personal Info Contact Info
Name Age Gender Mobile Phone Email
Data Data Data Data Data Data
Data Data Data Data Data Data
Data Data Data Data Data Data
|
|
|
|
|
DataGridView doesnt supports multiple headers for a column, however you can separate the text of header by this ( | ) that will look like a line multiple headers
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
The method you say can't slove my problem. I want the head can be change the width, so if I use the "|" to instead of column, it won't work.
|
|
|
|
|
so why dont you use columns, they will work as you want
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
then use third party controls
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Drag and drop a GridView and name it as GridView1
Try the below code
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable("Employee");
//Name Age Gender Mobile Phone Email
dt.Columns.Add("Name");
dt.Columns.Add("Age");
dt.Columns.Add("Gender");
dt.Columns.Add("Mobile");
dt.Columns.Add("Phone");
dt.Columns.Add("Email");
dt.Rows.Add("Anoop", "25", "Male", "996633352", "02255566", "anoopukrish@gmail.com");
GridView1.DataSource = dt;
GridView1.DataBind();
}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
GridView gridView = (GridView)sender;
GridViewRow gridViewRow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert);
TableCell tableCell = new TableCell();
//add Personal Info
tableCell.Text = "Personal Info";
tableCell.Attributes.Add("style", "text-align: center");
tableCell.ColumnSpan = 3;
gridViewRow.Cells.Add(tableCell);
//Add Contact Info
tableCell = new TableCell();
tableCell.Attributes.Add("style", "text-align: center");
tableCell.Text = "Contact Info";
tableCell.ColumnSpan = 3;
gridViewRow.Cells.Add(tableCell);
GridView1.Controls[0].Controls.AddAt(0, gridViewRow);
}
}
... There by u get the desired output...
____________________
Anoop Unnikrishnan
|
|
|
|
|
Your code is for webpage gridView control, it doesn't work for winform GridView Control.
Thank you for the codes, are you still have some codes for winform GridView Control?
|
|
|
|
|
Hello,
I was wondering if any one can help with right align the text in a data grid view column and formatting a data grid view column for money (eg. $ 100.00) any help would be great.
thanks, J
|
|
|
|
|
example :
DGV.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
DefaultCellStyle also have a property Format.
hope this will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks!! That worked great!!
|
|
|
|
|
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Good Day Everyone,
In Visual Studio 2005, there is this "Error List" where errors about your code will be shown after you build your application.
What object is this Error list? Can that object be used in my own application?
Thanks!
|
|
|
|
|
its a listview, yes, you can use it in your app
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
No, what I'm referring to is the actual "form/tab" that can be auto-hidden?
Thanks for the reply.
|
|
|
|
|
oh, then you will need 3rd party tool, search at google, there are lots of
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hello!
I'm working on a little tax-program.
For some calculations in the program, I need to use the "caret" (^) sign as it's normally used in mathematics..
2^2=4 for example..
How can I do that?
/Jop
|
|
|
|
|
double result = Math.Pow(double, double);
Or in your case:
int result = (int)Math.Pow(2.0, 2.0);
result should come out as 4.
And why oh WHY does Math.Floor, and Math.Ceil return double's? They return integers, so why not return an int
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
That solved my problem. Thx a lot!
/Jop
|
|
|
|
|
SK Genius wrote: And why oh WHY does Math.Floor, and Math.Ceil return double's? They return integers, so why not return an int
Because the rounding operations are floating point operations performed by the FPU. The result is a floating point number, and the methods reflect this.
The methods could of course have included casting so that they returned integer results, but if you then needed the value as a double, that would result in two casts without any good reason at all.
Also, the result of Math.Floor(1000000000000.0) doesn't even fit in an integer.
Some things doesn't make sense until you realise that the alternative makes even less sense.
Despite everything, the person most likely to be fooling you next is yourself.
modified on Wednesday, February 27, 2008 8:39 PM
|
|
|
|