|
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
|
|
|
|
|
Guffa wrote: Some things doesn't make sense until you realise that the alternative makes even less sense.
Class comments ... made me chuckle!!
|
|
|
|
|
Ok, I really just wanted to use the word edification. ^ is the bitwise XOR in most computer programming languages.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
My problem is as follows. The program works by creating new dataTable from a schema that the user has specified. once the person creates the table they fill it out, and hit the save command. The dataset is then saved to the sample object and serialized for later use. The problem occurs after the file is reloaded to edit. The previous data saved correctly and is displated on the datagrid. However if i change the data and then hit the save command again, it does not appear to save. Upon closing and reopening of the file, the dataSet looks as the origonal. Please help me. thanks,
public Sample sample;
public void sampleToEdit( Sample s, string path )
{
dataGrid1.DataSource = s.sampleData;
dataGrid1.DataMember = "sample";
sample = s;
}
private void saveCmd_Click(object sender, System.EventArgs e)
{
if ( isNewSample )
{
// this code runs when sample is created
Container sampleContainer = getContainer( templateDir + "sampleContainer.dat" );
string filename = sampleDir + uniqueCode + ".smp";
sampleContainer.container.Add(filename);
setContainer(sampleContainer, templateDir + "sampleContainer.dat" );
sample.sampleData = dataGrid1.DataSource as DataSet;
storeSample( sample, filename );
}
else
{
// this code runs when someone opens table to edit
string filename = sampleDir + uniqueCode + ".smp";
sample.sampleData = dataGrid1.DataSource as DataSet;
sample.sampleData.AcceptChanges();
storeSample( sample, filename );
}
}
modified on Wednesday, February 27, 2008 7:26 PM
|
|
|
|