473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problem editing in DataGrid

Hi,

I am trying to edit item in a datagrid. On clicking the edit button, the
column I want to enable editing is changed into a text box, which is fine.

But I can not retrieve the value of cell[0]. Which in my case is the rowid
in the table. I can see the value, but when I try this in the onEditItem
function...

e.Item.Cells[0].Text
it comes out blank.

But the same line 'e.Item.Cells[0].Text' returns a correct value on a
'ItemDataBound' function.

What am I doing wrong? Please help.

Thnx

Dec 6 '05 #1
2 970
when you click on the edit item it renders into text box control. so you need
to do

e.Item.Cells[0].Controls[0].Text
"dotnettester" wrote:
Hi,

I am trying to edit item in a datagrid. On clicking the edit button, the
column I want to enable editing is changed into a text box, which is fine.

But I can not retrieve the value of cell[0]. Which in my case is the rowid
in the table. I can see the value, but when I try this in the onEditItem
function...

e.Item.Cells[0].Text
it comes out blank.

But the same line 'e.Item.Cells[0].Text' returns a correct value on a
'ItemDataBound' function.

What am I doing wrong? Please help.

Thnx

Dec 6 '05 #2
Thanks.

"Sridhar" wrote:
when you click on the edit item it renders into text box control. so you need
to do

e.Item.Cells[0].Controls[0].Text
"dotnettester" wrote:
Hi,

I am trying to edit item in a datagrid. On clicking the edit button, the
column I want to enable editing is changed into a text box, which is fine.

But I can not retrieve the value of cell[0]. Which in my case is the rowid
in the table. I can see the value, but when I try this in the onEditItem
function...

e.Item.Cells[0].Text
it comes out blank.

But the same line 'e.Item.Cells[0].Text' returns a correct value on a
'ItemDataBound' function.

What am I doing wrong? Please help.

Thnx

Dec 6 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hideyuki | last post by:
Hi, I am using asp.net, and I am having a problem exporting datagrid to excel. One column contains numbers such as 123456875468. When this goes to excel, it is displayed as 1.23456E + 11 which I...
2
by: Ashish Patel | last post by:
Hi..friends I am .NET developer and using ASP.NET I have one problem with datagrid. I put one datagrid on the webform. When the user clicks on the Edit link then it shows some textbox in the...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
3
by: Sabari | last post by:
Hi, I have an interesting problem in DataGrid.I have a footer in the Datagrid which has a textbox and a link button and im adding values to the grid.Everything seems to work fine until this...
0
by: geek | last post by:
Hi all, I have a datagrid and I want to be able to edit a particular cell in datagrid row. I am using the EditCommandColumn control.My problem is when I hit Edit the current row doesn't go in...
1
by: Rob Petersen | last post by:
I have a datagrid with an Edit/Update column. Instead of editing records "in place" I'd like to do so in a separate popup window because there is a lot of validation, business rules and dynamic...
2
by: Szaki | last post by:
Hi, I have a problem with dataGrid. I have a query to database and it returns me to datagrid, something like this: -------------------- | Name | Class | |BBBBB| 2 | |aaa | 5 |...
0
by: Mani kansal | last post by:
hi, i have a problem with datagrid.Im using 2 dropdown lists in the datagrid.. and i want to fill one dropdown list on the selection of the item of the other one... like one grid is getting...
10
by: Ikolder | last post by:
Hello, I hope someone can help me with this! I have a problem editing a text file my file looks like this 11 13 15 16 23
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.