473,671 Members | 2,568 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 2133
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
3022
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
2539
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
3492
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
3279
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
5287
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
1726
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
1840
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
3455
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
1245
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
8927
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
8825
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
8676
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6237
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
5703
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
4227
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
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.