473,836 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid displaying a default number of rows

I would like a DataGrid I am using to show a default number of rows (10) with
the heading, even if the dataset it is bound to returns less than that number
of rows (0-9). It is a databound grid that sometime returns less than 10
rows (paging is enabled with a row count of 10). I would like the grid to
always show 10 rows (blank rows if no data bound to them). Is there a way to
do this?
Nov 21 '05 #1
3 2141
Gerhard,

I don't think that this is reasonable (technical it will probably go)
possible with a windowsform datagrid.

Cor
Nov 21 '05 #2
Hi,

You would have to make sure there were 10 rows of data in the
dataset the datagrid is bound to.

Ken
-----------------------
"Gerhard" <Ge*****@discus sions.microsoft .com> wrote in message
news:63******** *************** ***********@mic rosoft.com...
I would like a DataGrid I am using to show a default number of rows (10)
with
the heading, even if the dataset it is bound to returns less than that
number
of rows (0-9). It is a databound grid that sometime returns less than 10
rows (paging is enabled with a row count of 10). I would like the grid to
always show 10 rows (blank rows if no data bound to them). Is there a way
to
do this?

Nov 21 '05 #3
Thank you. That is what I thought, but wanted to verify.

"Ken Tucker [MVP]" wrote:
Hi,

You would have to make sure there were 10 rows of data in the
dataset the datagrid is bound to.

Ken
-----------------------
"Gerhard" <Ge*****@discus sions.microsoft .com> wrote in message
news:63******** *************** ***********@mic rosoft.com...
I would like a DataGrid I am using to show a default number of rows (10)
with
the heading, even if the dataset it is bound to returns less than that
number
of rows (0-9). It is a databound grid that sometime returns less than 10
rows (paging is enabled with a row count of 10). I would like the grid to
always show 10 rows (blank rows if no data bound to them). Is there a way
to
do this?


Nov 21 '05 #4

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

Similar topics

1
3030
by: Simon | last post by:
Can any one please tell me how to set the width of my datagrid coloums after I have put them into edit mode? At the moment I bind the datagrid to a returning dataset; DataGrid1.DataSource = f.GetData("storedprocedure") DataGrid1.DataBind() This populates my datagrid.
3
2553
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called "Resource" with the following structure : Resource{,en,fr,es} Yes.. these are the only languages supported actually. A couple of rows in that table would look like this :
0
3507
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the full code for the test below. Create a project drop in the code and run. There is nothing crazy about the code. I used the designer to add the dataset and to do the...
1
3301
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple days of struggling, I figure asking you all (the experts) will keep me from going down some dark and dangerous road. The project I have is a fairly simple one, in theory anyway. The gist is to create a page where the user enters an IDNumber,...
1
5296
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so the user doesn't have to scroll horizontally. Essentially, I want to wrap a datagrid row (not text in individual columns) with as much control as possible. Make sense? While this seems simple enough on the surface, I can't figure out how to do...
1
1739
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types like drop downs that have no issue displaying last values in edit mode with seemingly more complicated code. when I attempt to find my textbox with
2
1845
by: Ben | last post by:
Could someone please tell me why couldn't I adjust my column/row properties of my dataGrid? I binded my table, created a new DataGridTableStyle and mapped it to my datagrid. However, my columns width wouldn't changed at all. I am sure this is very easy thing to figure out but I just couldn't see it. Could you please take a look at my codes. What I am missing? Btw, I got these codes from MSDN website: thanks. .....
2
3464
by: Lars Netzel | last post by:
Hi I need to have a limitation for the number of rows one can add in a datagrid (bound from a DataTable), in this case maximum should be 10 rows. My approach I guess is to catch the rownumber in the CurrencyManager via BindingContext.PositionChanged but how do I then stop new rows from being created? in FormLoad() I add a handler for the bindingcontext and a datatable called
3
1251
by: simchajoy2000 | last post by:
Hi, I am using a datagrid which contains a dataset with several tables and I am experiencing an inexplicable behavior that I am unable to resolve. Perhaps it's due to the complexity of my scenario which I will briefly describe here just in case it is a factor: I am querying an Access database and displaying the results in a Datagrid - then the user can perform additional queries based on the displayed Access information and I then...
0
9820
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10846
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10551
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9376
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7793
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6979
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5828
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4458
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
3
3116
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.