blank line between records

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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....
    2. insert blank row between records
      i need to insert a blank row between each row of data - is this possible ? thanks mark
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default Re: blank line between records

    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


    Jos Guest

  5. #4

    Default 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

  6. #5

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139