Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Datagrid Control
e.Item.ItemIndex and e.Item.DataSetIndex
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="TheMan, post: 4264538"] Hello Steven, I do not understand your solution. I have been struggling to sync my ItemIndex also, so that after sorting my dataview, the source of my datagrid, I can edit and delete row items. In trying to understand your solution I do not see how creating the DataRow array provides me the ability to return the datagrid the item index. I am simply lost at that point. For example, the simple code I want to write in the raised event for the edit command is, DataGrid1.EditItemIndex = e.Item.ItemIndex; But, as I have said, the index is off after sorting. I tried using the following code DataGrid1.EditItemIndex = e.Item.Cells[11].Text; to obtain the PK from the dataset bound in the 12th column, but the text is string. I cannot convert it to Int because it is a GUID generated in the database. Is there a way to obtain the datagrid index property, not the GUID in my database which is the PK, and pass it to my datagrid as the item in question for editing? Thanks. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Datagrid Control
e.Item.ItemIndex and e.Item.DataSetIndex
Top