Hello,
I have a MySql data table that I display in a GridView in ASP .NET. The table is too large to display without paging, so I have added and OnPageIndexChanging event and corresponding handler to the GridView. But, in the GridView, when I click the next page index, the grid view disappear. See my code below.
Any help on this is very appreciated.
Best regards
Kurt Jakobsen -
protected void g_GridCtrl_PageIndexChanging(object sender, GridViewPageEventArgs e)
-
{
-
g_GridCtrl.PageIndex = e.NewPageIndex;
-
g_GridCtrl.DataBind();
-
}
-
-
-
-
void FillInGridView()
-
{
-
string myConnString = ConfigurationSettings.AppSettings["DSN_Fyrr"];
-
MySqlConnection myConnection = new MySqlConnection(myConnString);
-
string strSQL = "SELECT LocationName FROM PartLocationDef ORDER BY LocationName;" ;
-
MySqlDataAdapter myDataAdapter = new MySqlDataAdapter(strSQL, myConnection);
-
DataSet myDataSet = new DataSet();
-
myDataAdapter.Fill(myDataSet, "FailTypeDef");
-
g_GridCtrl.DataSource = myDataSet;
-
g_GridCtrl.DataBind();
-
myConnection.Close();
-
}
-
-
-
<asp:GridView ID="g_GridCtrl" runat="server" AllowSorting="true" AllowPaging="true" DataKeyNames="LocationName" OnPageIndexChanging="g_GridCtrl_PageIndexChanging" AutoGenerateColumns="False" OnSorting="g_GridCtrl_Sorting">
-
<Columns>
-
<asp:BoundField ReadOnly="true" HeaderText="Location Name" DataField="LocationName" SortExpression="LocationName" />
-
</Columns>
-
</asp:GridView>
-
1 1143 Atli 5,058
Recognized Expert Expert
This is more of a .Net problem than a MySQL problem so I'm moving it over to the .Net forums. Moderator Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Adams-Blake Co. |
last post by:
In table is record, field called CompanyName that has: Joe\'s Place (I
added the slashes before inserting the field.)
This will NOT work:
$x="Joe's Place";
$sql="Select * from Company where CompanyName LIKE '%" . addslashes($x) .
"%'";
(standard MySQL query code)
I don't get an error, but I don't get a hit either!
|
by: Wilfred Johnson |
last post by:
I thought that I'd try php / mysql on windows 2000. I am running php
5.0.0 and it works fine, except when I try to use mysql functions. I
get:
Fatal error: Call to undefined function mysql_connect() in ...
The documentation is unclear to me. It says that mysql support is now
built in, but it doesn't work. Google searches say that it's not...
|
by: Miguel Cardenas |
last post by:
Hello list
For some strange reason `mysql_config --...` does not work. If try something
like
gcc -o progname `mysql_config --cflags` progname.c `mysql_config --libs`
(NOTE: "/usr/local/mysql/bin" is in the PATH var, mysql_config works when
invoked)
|
by: Saqib Ali |
last post by:
I have set up MySQL on my machine and can successfully use it.
However, I'm trying to set up TOra so that I can browse the databases
effectively. I'm having lots of trouble trying to get TOra to work
with MySQL.
Please take a look at the notes below and please let me know why I'm
having trouble and how to fix it.....
Thanks
-Saqib
|
by: Mark |
last post by:
the Following bit of code doesn't work.
It seems to respond to the second, starting with 'add iif statement
for Good Practice', but not to the first, starting 'add iif statement
for archived'
Help me to sort this out, it has taken me almost a week to wade
through and it still won't work.
Select Case Forms("frmForce").OpenArgs
| |
by: nsh |
last post by:
mailing.database.mysql, comp.lang.php
subject: does "LOAD DATA" EVER work?!? I've tried EVERYTHING!
version info:
my isp is running my web page on a linux box with php ver. 4.4.1
according to phpinfo, the "mysql api client is ver. 4.0.25" - I have no
idea how this relates, if at all, to the mysql engine's version.
background:
|
by: Michael |
last post by:
Hi,
I'm trying to do something which should be very simple - connect to the
MySQL database. Here is the call, followed by the error msg.
$conn = mysql_connect("localhost", "root", "");
Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/buildhw.php on
line 13
|
by: Kurt Jakobsen |
last post by:
Hello,
I have a MySql data table that I display in a GridView in ASP .NET. The table is too large to display without paging, so I have added and OnPageIndexChanging event and corresponding handler to the GridView. But, in the GridView, when I click the next page index, the grid view disappear. See my code below.
Any help on this is very...
|
by: ssnaik84 |
last post by:
Hi Guys,
Last year I got a chance to work with R&D team, which was working on DB scripts conversion..
Though there is migration tool available, it converts only tables and constraints..
Rest of things (stored procedures, functions).. we have to manually edit.
That time, we face some interesting challenges.. I failed to document all of them,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |