TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
osman_hashmi
NA
2
0
OnItemCommand problem
Jan 30 2004 7:19 PM
Hi Main Problem The problem is when I click on the button it does not go to the Item_Command function which is called by OnItemCommand it just refreshes the page and all the buttons vanish. I think it might be to do with the type of button in the datagrid, it is dynamically generated in the C# code. Problem 2 In the function Item_Command which is called by OnItemCommand when the button is clicked, how do I find out which column the cell is in and also the "pas_no" (primary key of the row of data) of the row the cell is in. //This function is supposed to be called by the OnItemCommand void Item_Command(Object sender, DataGridCommandEventArgs e) { //Code } //This function is called by the OnItemBound and generates a button if the data cell is empty void UpdateImage(Object sender, DataGridItemEventArgs e) { if((e.Item.ItemType != ListItemType.Header)) { Button butReceive = new Button(); butReceive.Text="Update"; if (e.Item.Cells[4].Text =="") { e.Item.Cells[4].Controls.Add(butReceive); } }
<%# DataBinder.Eval(Container.DataItem, "ts_received") %>
Please can you help Oz ps If I have not explained it properly please ask
Reply
Answers (
0
)
I cannot connect to SQL Server. Also, how do I fill drop-down List with dataSet
Creating a Hierarchical data grid