Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2006, 01:30 PM
Authorized User
 
Join Date: Jul 2006
Location: , , .
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default Datagrid Cells

Hi,

I am trying to make a Sudoku web application. I am creating a dataset
which holds the numbers that belong to each cell. Then these numbers
are unmasked to display the problem set to the user in a GridView.
However, I was to be able to mark the empty columns for editing. I
have tried this but it hasn't worked so far...


Code:
protected void gameGrid_RowDataBound(object sender, 
GridViewRowEventArgs e) 
        { 
            if (e.Row.DataItemIndex > -1) 
            { 
               object obj = (object)e.Row.DataItem; 
                DataControlFieldCell cell = 
(DataControlFieldCell)e.Row.Controls[0]; 
                if (cell.Text == "") 
                { 
                    BoundField field1 = 
(BoundField)cell.ContainingField; 
                    field1.ReadOnly = false; 


                    //gameGrid.DataBind(); 
                } 
            } 
        }



Any ideas? Thanks!




 
Old October 12th, 2007, 09:35 AM
Authorized User
 
Join Date: Mar 2005
Location: Benha, Kaliobeya, Egypt.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aehb
Default

I think you are arab, if so; welcome from egyptian programmer.
I have made a sudoku solver program, but it's in Visual C++, if you are interested, download from this link:
http://rapidshare.com/files/62022489/Sudoku_Solver.rar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid-Merging Cells p330418 ASP.NET 2.0 Professional 0 February 29th, 2008 12:06 AM
Merging cells in Datagrid p330418 ASP.NET 2.0 Basics 0 February 28th, 2008 11:21 PM
Adding cells from a datagrid mjbkelly VB Databases Basics 1 April 10th, 2007 12:28 PM
Formatting e.Item.Cells in Datagrid rstelma ASP.NET 1.0 and 1.1 Professional 18 February 26th, 2006 07:34 AM
Datagrid and cells haroon .NET Framework 2.0 1 October 11th, 2004 10:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.