|
thanks Mr stancrm .
But Are You Sure I Can't Serialise the Controles .
My Manager is pressing To Serialise the control in Windows Application Or Web Application , From Last Day I Research on the EnterNet To Serialisation The Controls in Form by Using the C#.Net , I Don't Know What I Can Do .
Thaer
|
|
|
|
|
You cant serialize controls and many other classes. You need to find specific data you want to save/restore, and serialize that.
|
|
|
|
|
Hi,
kindly help me that, how to read null values from datagridview?
Thanks in advance
(Riaz)
|
|
|
|
|
You read it like any other value. E.g.
object cellValue = dataGridView.Rows[0].Cells[0];
Doesn't matter whether it's null or not. Does this answer your question?
|
|
|
|
|
i am facing an error "NullReferenceExeption was unhandled" using following codes.
object oValueChecker = Convert.IsDBNull(dataGridView1[5, e.RowIndex].Value)? "0" :
dataGridView1[5, e.RowIndex].Value.ToString().Trim();
if (oValueChecker == "0")
{
dataGridView1[5, e.RowIndex].Value = "0";
}
|
|
|
|
|
Hi.
Have you tried
if (string.IsNullOrEmpty(dataGridView1[5, e.RowIndex].Value.ToString()))
{
dataGridView1[5, e.RowIndex].Value = "0";
} I think it should work.
Kjetil
|
|
|
|
|
Kjetil Svendsen wrote: string.IsNullOrEmpty(dataGridView1[5, e.RowIndex].Value.ToString())
IF the Value property is null, you will still get a NullReferenceException .
|
|
|
|
|
M Riaz Bashir wrote: Value.ToString()
If Value is null , ToString() will FAIL!
|
|
|
|
|
How to get default printer name while calling the windows service using c#?
vinu
|
|
|
|
|
|
I am going to Migrate my project from Foxpro to dot Net Platform. My Project has lot of codings in the background database functions. Could you please suggest me which is the better option.Vb.net or C#.net ?
|
|
|
|
|
i think c# would be better option.
rahul
|
|
|
|
|
You ask this in the C# forum and expect an unbiased answer?
C# is a more terse syntax than VB's more verbose syntax. But both languages are equally powerful, so choose what you're comfortable with.
|
|
|
|
|
No language in the framework is stronger or weaker than other languages. Its just a matter of your comfort.
|
|
|
|
|
Not really accurate. For example you can use pointers in C# (in unsafe mode), while in VB.NET you can't.
|
|
|
|
|
In terms of technical power, the languages are identical. Both are compiled to IL, so have exactly the same functionality available.
In terms of syntax. C# adopts a more C style syntax (with curly brackets and stuff) whereas vb.net adopts a syntax that is more verbose, it is very similar to the original visual basic languages, which is obviously derived originally from basic. This is mealy a matter of preference to be honest.
Finally, there is the culture. The communities of VB.net developers and C# developers are different, and different people fit best in different communities. This is mainly because of the origins of the languages, vb.net developers are largely those who have moved forward from VB6, whereas C# developers are largely those who have moved forward from either C++ or Java.
This wikipedia page compares some of the differences in the languages. Note that most of these are mealy syntactical and easily overcome:
http://en.wikipedia.org/wiki/Comparison_of_C_sharp_and_Visual_Basic_.NET[^]
This article takes an in depth look at the two communities:
http://www.codeproject.com/KB/dotnet/CSharpVersusVB.aspx[^]
Simon
|
|
|
|
|
how do i get the first column value base on the selected row
this.dataGridView1.CurrentCell.Value.ToString();
this gives me the value of the column and the selected row cell..
example i click any column of the row i only want to retrieve the first column value which is the ID
|
|
|
|
|
dataGridView.CurrentRow.Cells[0].Value will give you the value of the current row's first cell. Is that what you're looking for?
|
|
|
|
|
|
Hi,
This should work:
this.dataGridView.Rows[this.dataGridView.CurrentCellAddress.Y].Cells["dataGridViewTextBoxColumn0"].Value.ToString());
where dataGridViewTextBoxColumn0 is the column name desired.
For Sure
Mosd
|
|
|
|
|
I have one web application(1.1 version.),Asp.net with C#,and i want to insert data to the form.how to insert the data to the form,and i want to show all the records in Data grid.
|
|
|
|
|
u can use datagrid control and bind it with ur dataset to display records.
rahul
|
|
|
|
|
yes ,but i am a beginner,so i want the code.
Thanks,
Kalyan
|
|
|
|
|
SO try Google. The idea of CP is to help with problems, not do someones job for them - be it a proper job or a piece of student course work.
If you want code writing try rentacoder.com
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanx for ur reply,i got it.
|
|
|
|