Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Alvin Bruney [MVP] #1
Re: blank line between records
this sort of requirement requires custom work to be done in the
itemdatabound
an approach would be to check the type of cell being fired (header, footer,
item etc)
and make your rows appropriately
--
Regards,
Alvin Bruney
[ASP.NET MVP [url]http://mvp.support.microsoft.com/default.aspx][/url]
Got tidbits? Get it here... [url]http://tinyurl.com/27cok[/url]
"zino" <zino@newsgroups.nospam> wrote in message
news:CC80FFDC-5172-460A-8C6D-21F4DAF59449@microsoft.com...>I have a datagrid in a asp.net page, with an edit/save/cancel image for
> editing ...
>
> when I bind the grid to the datasource, is there anyway that I can make
> the
> grid display its records as :
>
> 2 records simultaneously then a blank line then 2 records simultaneausly
> then blank line then .....
>
> the blank line work as visual seperator between each 2 records, I need to
> insert this blank line at run time in ItemDataBound event or OnItemCreated
> event with the editing pictures hidden. how can I do it ??
Alvin Bruney [MVP] Guest
-
WebServicesConnector delivers blank records <<<HELP>>>
I created a data cconnection with the wizard in Flash MX 2004 BUT the datagrid displays blank records. I tryed using the list and the textboxes.... -
insert blank row between records
i need to insert a blank row between each row of data - is this possible ? thanks mark -
how to parse blank-line-separated records
Hi, all -- I'm wrestling with a data file containing owners and contact info and it suddenly occurred to me that I could probably change my... -
Inserting blank records
I need to import records created in filemaker to an accounting program (MYOB). It can only recognise different records if there is a blank in... -
Adding blank rows after a series of records
On Wed, 23 Jul 2003 14:04:49 -0700, "Chuck Dickson" <CDICKSO@USAIRWAYS.COM> wrote: That would be pretty tough. The only way I can think to do... -
Steven Cheng[MSFT] #2
Re: blank line between records
Hi Zino,
As for the problem you mentioned, I think there're two means you can try:
1. Since the DataGrid control generate its items through the datasource's
records. We can add some particluar records in the DataSource so as to help
generate the particular blank GridRows. This can avoid additional
operations in DAtaGrid.
2. The ASP.NET DataGrid control is fixed represent by a html <table>
element and all the controls are added in each tablecell in each
DataGridRow. So its hard to add split row between two Row Item manually in
DataGrid. (No matter in ItemCreated or ItemDataBound event). If you do want
to implement such display layout, I suggest that you try using the DataList
control instead since it can provide more flexible functions on customize
display lay out. How do you think of this?
Also, if you have any other ideas ,please also feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
[url]http://msdn.microsoft.com/asp.net/whidbey/default.aspx[/url]
Steven Cheng[MSFT] Guest
-
Jos #3
Re: blank line between records
Steven Cheng[MSFT] wrote:
Another idea might be to convert one column to a TemplateColumn,> Hi Zino,
>
> As for the problem you mentioned, I think there're two means you can
> try:
> 1. Since the DataGrid control generate its items through the
> datasource's records. We can add some particluar records in the
> DataSource so as to help generate the particular blank GridRows. This
> can avoid additional operations in DAtaGrid.
>
> 2. The ASP.NET DataGrid control is fixed represent by a html <table>
> element and all the controls are added in each tablecell in each
> DataGridRow. So its hard to add split row between two Row Item
> manually in DataGrid. (No matter in ItemCreated or ItemDataBound
> event). If you do want to implement such display layout, I suggest
> that you try using the DataList control instead since it can provide
> more flexible functions on customize display lay out. How do you
> think of this?
>
> Also, if you have any other ideas ,please also feel free to post here.
and adding a <br> tag to the AlternatingItemTemplate of that column.
That would make every other row twice as high.
--
Jos
Jos Guest
-
Duron #4
Re: blank line between records
It is possible to "hack" the DataGrid if you know what HTML tags it renders.
If you can add <br>, you may be able to add </td></tr><tr><td colSpan=5
height=5>, for example, to insert a separator with nicer look.
-Duron
"Jos" <josnospambranders@fastmail.fm> ¼¶¼g©ó¶l¥ó·s»D
:eaJdilqfEHA.2604@TK2MSFTNGP10.phx.gbl...> Steven Cheng[MSFT] wrote:>> > Hi Zino,
> >
> > As for the problem you mentioned, I think there're two means you can
> > try:
> > 1. Since the DataGrid control generate its items through the
> > datasource's records. We can add some particluar records in the
> > DataSource so as to help generate the particular blank GridRows. This
> > can avoid additional operations in DAtaGrid.
> >
> > 2. The ASP.NET DataGrid control is fixed represent by a html <table>
> > element and all the controls are added in each tablecell in each
> > DataGridRow. So its hard to add split row between two Row Item
> > manually in DataGrid. (No matter in ItemCreated or ItemDataBound
> > event). If you do want to implement such display layout, I suggest
> > that you try using the DataList control instead since it can provide
> > more flexible functions on customize display lay out. How do you
> > think of this?
> >
> > Also, if you have any other ideas ,please also feel free to post here.
> Another idea might be to convert one column to a TemplateColumn,
> and adding a <br> tag to the AlternatingItemTemplate of that column.
> That would make every other row twice as high.
>
> --
>
> Jos
>
>
Duron Guest
-
Alvin Bruney [MVP] #5
Re: blank line between records
another approach is to insert an empty row into your dataset, infact you can
do all your row formatting in your dataset, when you are done. just bind to
get a visual of the formatted dataset. i imagine the dataset has a lot more
functionality which would allow you to do this easier.
--
Regards,
Alvin Bruney
[ASP.NET MVP [url]http://mvp.support.microsoft.com/default.aspx][/url]
Got tidbits? Get it here... [url]http://tinyurl.com/27cok[/url]
"Duron" <johnnykhlee@seed.net.tw> wrote in message
news:%23KaUXjvfEHA.704@TK2MSFTNGP09.phx.gbl...> It is possible to "hack" the DataGrid if you know what HTML tags it
> renders.
> If you can add <br>, you may be able to add </td></tr><tr><td colSpan=5
> height=5>, for example, to insert a separator with nicer look.
>
> -Duron
>
> "Jos" <josnospambranders@fastmail.fm> ¼¶¼g©ó¶l¥ó·s»D
> :eaJdilqfEHA.2604@TK2MSFTNGP10.phx.gbl...>>> Steven Cheng[MSFT] wrote:>>>> > Hi Zino,
>> >
>> > As for the problem you mentioned, I think there're two means you can
>> > try:
>> > 1. Since the DataGrid control generate its items through the
>> > datasource's records. We can add some particluar records in the
>> > DataSource so as to help generate the particular blank GridRows. This
>> > can avoid additional operations in DAtaGrid.
>> >
>> > 2. The ASP.NET DataGrid control is fixed represent by a html <table>
>> > element and all the controls are added in each tablecell in each
>> > DataGridRow. So its hard to add split row between two Row Item
>> > manually in DataGrid. (No matter in ItemCreated or ItemDataBound
>> > event). If you do want to implement such display layout, I suggest
>> > that you try using the DataList control instead since it can provide
>> > more flexible functions on customize display lay out. How do you
>> > think of this?
>> >
>> > Also, if you have any other ideas ,please also feel free to post here.
>> Another idea might be to convert one column to a TemplateColumn,
>> and adding a <br> tag to the AlternatingItemTemplate of that column.
>> That would make every other row twice as high.
>>
>> --
>>
>> Jos
>>
>>
>
Alvin Bruney [MVP] Guest



Reply With Quote

