C# .NET - conversion text to (float.Parse(GridView1.Rows[i].Cells[4].Text))

Asked By BHASKAR R on 31-Oct-11 04:55 AM
converting grid view text column to float database file field
smr replied to BHASKAR R on 31-Oct-11 04:57 AM
hi

Use Double.Parse

Double.Parse(row.Cells[2].Text, System.Globalization.NumberStyles.Any);

follow
http://forums.asp.net/t/1650591.aspx

aneesa replied to BHASKAR R on 31-Oct-11 07:10 AM

            float dec;
            if (!float.TryParse(GridView1.Rows[i].Cells[4].Text, out dec))
            {
                return false; // not float
            }
            else
                return true; // float value