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
Antonio Garcia
NA
3
0
Problem with Select_RowCommand and GridView1_PageIndexChanging
Mar 23 2010 6:32 AM
Hi,
I have a problem with a gridview. The gridview have a column with buttonfield and this launch a
protected
void
Select_RowCommand(
Object
sender,
GridViewCommandEventArgs
e)
this select_RowCommand load many textbox.
This run well, the problem it´s that after execute the select_RowCommand the GridView1_PageIndexChanging NOT RUN, this not load records
The code for buttonfield columns is
ButtonField
columLupa =
new
ButtonField
();
columLupa.ButtonType =
ButtonType
.Image;
columLupa.CommandName =
"Seleccionar"
;
columLupa.ImageUrl =
"~/imagenes/Buscar_mm.png"
;
columLupa.Text =
"SELECCIONAR CONTRATO"
;
columLupa.ItemStyle.HorizontalAlign =
HorizontalAlign
.Center;
columLupa.ItemStyle.Width = 50;
the select_RowCommand
protected
void
Select_RowCommand(
Object
sender,
GridViewCommandEventArgs
e)
{
// If multiple buttons are used in a GridView control, use the
// CommandName property to determine which button was clicked.
if
(e.CommandName ==
"Seleccionar"
)
{
int
index =
Convert
.ToInt32(e.CommandArgument);
GridViewRow
row = GridView1.Rows[index];
string
contrato = Server.HtmlDecode(row.Cells[0].Text);
lbl_NomCliente.Text = contrato;
}
}
the PageIndexChanging
protected
void
GridView1_PageIndexChanging(
object
sender,
GridViewPageEventArgs
e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataSource = pubs;
GridView1.DataBind();
}
Thanks for your help
Antonio
Reply
Answers (
2
)
Multi thread application
Create Dynamic Menu From Database