473,569 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid and GridView

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 drop connection, dataset,
datatable etc.


Apr 27 '07 #1
3 1553
On Apr 27, 9:30 am, "Toni" <n...@maila.hrw rote:
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 drop connection, dataset,
datatable etc.
What do you mean when you say you "can't use paging and sorting"? Are
there errors? Does the paging footer display? Or does .NET reach out
and prevent you from clicking your mouse?

It's just a matter of turning on paging and sorting properties for
that Gridview.

Apr 27 '07 #2
What do you mean when you say you "can't use paging and sorting"? Are
there errors? Does the paging footer display? Or does .NET reach out
and prevent you from clicking your mouse?

It's just a matter of turning on paging and sorting properties for
that Gridview.
Paging and Sorting properties are turned on. In GridView I get error. In
DataGrid there is no reaction. I can click on header captions but nothing. I
have caption for next and previous page but when I click, page is reloaded
but not sorted.
Apr 27 '07 #3
On 27 Apr, 15:01, "Toni" <n...@maila.hrw rote:
What do you mean when you say you "can't use paging and sorting"? Are
there errors? Does the paging footer display? Or does .NET reach out
and prevent you from clicking your mouse?
It's just a matter of turning on paging and sorting properties for
that Gridview.

Paging and Sorting properties are turned on. In GridView I get error. In
DataGrid there is no reaction. I can click on header captions but nothing. I
have caption for next and previous page but when I click, page is reloaded
but not sorted.
Hi Toni

In addition to enabling Paging and Sorting have you defined sort
expressions for the columns? I know that when creating a GridView
using visual tools the sort expression defaults to the column value,
but in non-visual handling the result may be unpredicatable.

HTH

Apr 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3524
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I can get this to work; however, the column header on the datagrid is not a link/sortable. What am I missing? Thanks in advance.
6
3320
by: Scott McDaniel | last post by:
I'm using Visual Studio 2005 with the .NET 2.0.50727 framework, and we're using the standard Datagrid control bound to a SQL Server. We have two groups of users - "full edit" users, and "view only" users. We would like to disable the EditCommandColumn of our Datagrid (named dgCertificates) for viewonly users. The intent is that viewonly...
3
4304
by: Alex Maghen | last post by:
I'd like there to be a border around each row of my data-grid but NOT between the columns. I've tried setting BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" ItemStyle-BorderColor="Black" ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1px"
6
2316
by: GaryDean | last post by:
I liked the DataGrid because I was familiar in walking through it to do custom filling and retrieval of data in cases where standard binding wouldn't do the job. I read somewhere that the object model is the same for the datagrid and the gridview. But as I begin to try to manually load a gridview I notice that there is no such thing as a...
2
3431
by: Mike Baugh | last post by:
I am using visual studio 2005 to develop a form using c# I have 3 datagrids on one form. I can set the row color based on a certain value in a column. However this color applies to all 3 datagrida. I would like to set it so that if value of column 3 in datagrid 1 is < 100 set to red, if = 100 set to green if value of column 3 in...
7
7445
by: GaryDean | last post by:
I am writing a method in a component that gets passed a 1.1 Datagrid. The datagrid's columns were created at run time meaning it has no columns collection. How can I access Header and Footer data in the grid? It's not in the grid.items collection - only rows there. there is no grid.header or grid.footer. --
5
2215
by: rcoco | last post by:
Hi, I'm working on a asp.net project with a datagrid. I want the user to be adding data into Sql database using the datagrid. So I'm using a ListBox to do this and edit update and delete. I placed listbox in EditItemTemplate and label in ItemTemplate. but when I try now to edit it does not bring the lisbox but i can read the grid with the sql...
6
3698
by: rcoco | last post by:
Hi, I have a datagrid that is ment to insert data. But when I run the form only the header appears. I would like some advise from you all and solve this problem I'm using visual studio 2003. My code looks like this: private void Fill() { DataTable table = new DataTable(); SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from
7
17310
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work either! Does anyone know how can I make this work? Thanks in advance!
7
3022
by: Mark B | last post by:
Can someone write some VB.Net example code for me that does this: 1) Creates a gridview control with the results of a SQL stored procedure that has 1 parameter (text) 2) Adds an extra column that displays the result of a VB.Net function that uses a value from an existing column I have spent 4 hours trying to do this after Googling for...
0
7703
marktang
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...
0
7618
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...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
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...
1
5514
isladogs
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...
0
5223
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...
1
2117
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
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.