Hi,
I have enabled paging in my gridview control and am now trying to work out
how to programmatically access it. With my gridview i have an "Add" button
which adds a new row to the gridview and underlying data source, and
initialises values to null, except for primary key which is auto incremented
in SQL Server. When this new row is added, i want to navigate to the page in
the gridview containing the new addition (the last row), and then set the
edit index property to this row so it is in edit mode for the user. Problem
is, that by default, if i have say 20 records in the gridview and the paging
is set to only display 5 records at a time, it will show the first 5 by
default, when i want the last records. Can someone help me out here? Im
relatively new to ASP programming (2 weeks...) so am slowly amassing
knowledge.
Cheers,
DMC 1 2296
Hello,
Try to set the current page index explicitly.
Niraj Ranka
"DMC" <no***@noreply.comwrote in message
news:12*************@corp.supernews.com...
Hi,
I have enabled paging in my gridview control and am now trying to work out
how to programmatically access it. With my gridview i have an "Add" button
which adds a new row to the gridview and underlying data source, and
initialises values to null, except for primary key which is auto
incremented
in SQL Server. When this new row is added, i want to navigate to the page
in
the gridview containing the new addition (the last row), and then set the
edit index property to this row so it is in edit mode for the user.
Problem
is, that by default, if i have say 20 records in the gridview and the
paging
is set to only display 5 records at a time, it will show the first 5 by
default, when i want the last records. Can someone help me out here? Im
relatively new to ASP programming (2 weeks...) so am slowly amassing
knowledge.
Cheers,
DMC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ck388 |
last post by:
For some reason when I enable the callback feature of the gridview I
still get a page refresh, that is it seems like there is a postback
that occurs, not a callback which is just supposed to update...
|
by: tfsmag |
last post by:
Hello,
I have a function that returns a dynamically created gridview. This
works fine, however it does not seem to be able to maintain state when
adding sorting or paging to the gridview. Does...
|
by: Stu Lock |
last post by:
Hi,
I've spent the last hour trawling google for this - but all I find are
people asking the same question!
I have a gridview which is being databound to an empty datasource. I can
display...
|
by: davidjgonzalez |
last post by:
I have a GridView that has paging enabled. Each item (as defined in an
ItemTemplate) includes several controls which have operations i would
like to Atlas-enable. Everything is working well except...
|
by: Chuck |
last post by:
I'm setting the column with for a gridview (25+- columns) and have
paging turned on.
When the gridview is first displayed, the column widths are all set to
the default. But after paging to...
|
by: gerry |
last post by:
The PagerSettings.Visible property is not being handled properly by the
GridView control.
The value assigned to this property is not applied until after a postback.
Simplest test :
.aspx...
|
by: Andrew Robinson |
last post by:
I am using the following code to preload a few controls in the FooterRow
within a GridView control:
protected void Page_Load(object sender, EventArgs e) {...
|
by: Toni |
last post by:
In DataGrid and GridView I can't use paging and sorting. I am connected to
database with code, not visual. Can I use paging and sorting if I populate
data to grid with code, or I need to drag and...
|
by: =?Utf-8?B?UGhpbCBKb2huc29u?= |
last post by:
Hello,
I have an asp.net 2.0 gridview with the paging enabled. I don't want to
display the footer, but it always displays with the page numbers displayed.
I have set the grid's showfooter to...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |