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
Herald Suva
NA
19
88.2k
Dynamically Disable row selection in GridView
Nov 29 2010 10:33 PM
Hi,
I am new to C# and seeking for the assistance.
Problem is,
I have an Add, Edit, Delete button and a gridview. What i want is when I click the Add button I should not able to select row in gridview. Gridview should look like disabled.
Here is my codes in gridview row created event.
if (e.Row.RowType == DataControlRowType.DataRow)
{
//e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';";
//e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';";
e.Row.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference((Control)sender, "Select$" + e.Row.RowIndex.ToString()));
}
thanks,
Reply
Answers (
1
)
XML data retrieve
How to tackle this session problem?