How can write Some Text within GridView Cell After bind the GridViw.

Posted by Syedur04 under ASP.NET on 8/11/2014 | Points: 10 | Views : 282 | Status : [Member] | Replies : 1
Dear all,

I have bind the GridView by DataTable Source. Now I want click on one cell,Than I write Some Text within cell without Edit Button. Ending Write Text Auto Event fire for Update of that Cell.

Is it Possible.


DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Country",typeof(string)) });
dt.Rows.Add(1, "John Hammond", "United States");
dt.Rows.Add(2, "Mudassar Khan", "India");
dt.Rows.Add(3, "Suzanne Mathews", "France");
dt.Rows.Add(4, "Robert Schidner", "Russia");
GridView1.DataSource = dt;

After Bind this GridView1, I click on country Cell,I can write Some Text within this cell. Finis My Write Auto Fire this cell Event And update in Database. How Can Done This.


Posted by: kgovindarao523-21772 on: 8/12/2014 [Member] [MVP] Bronze | Points: 25

I think Its Posible.
you specified that without edit button you have to enter data, so if you want to achive this, a modal popup contains text box(to enter new content) shoud be open once click on cell. on this text box blur you can update cell using jquery. it is a tedious job,of course.

Thank you,

Syedur04, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response