Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Is there a way to assign a different style to the detail view of a grid?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to assign a different style to the detail view of a grid?

    I have a somewhat unique grid with a detail view. I applied styling that works well for the RO part but it makes the detail view look awful. Is there an easy way to apply a different style to the detail view?

    Thanks for any feedback!

  • #2
    Re: Is there a way to assign a different style to the detail view of a grid?

    I think I should be able to use javascript to affect the changes I need. In my detail view I want to set the background color of the detail view popup windows to a different color than what is specified in the stylsheet using

    $('GRID1.DETAILVIEW_PART.FORM').style.background ='#013668'

    It is not working though. No errors, it just doesn't do anything for me. Using a pop-up window to display detail.

    Comment


    • #3
      Re: Is there a way to assign a different style to the detail view of a grid?

      When I select the element with firebug. This is the html for that specific element.

      <table id="GRID1.DETAILVIEW_PART.FORM" class="ProjectMgmtProjectsGrid" cellspacing="0" cellpadding="2" a5isdirty="false" a5dataregion="A5DataRegion" a5ondirty="GRID1_GridObj._setDVControlDirty()" a5focuscontrol="V.R1.NAME">

      I am not sure if I need to somehow also reference the window object as well since I am using a pop window to affect the change. This is the grid part of the window that I've pasted the html in for.

      Comment


      • #4
        Re: Is there a way to assign a different style to the detail view of a grid?

        Tried $('GRID1.DETAILVIEW_PART.FORM').addClass('NewClass') also but to no avail

        Comment


        • #5
          Re: Is there a way to assign a different style to the detail view of a grid?

          Try the $ss helper function.
          http://wiki.alphasoftware.com/Gettin...+in+Version+10
          Also try altering some of the divs within the form until you can make something look different.
          Remember, it's about basic javascript / CSS rules, not Alpha's.

          Comment


          • #6
            Re: Is there a way to assign a different style to the detail view of a grid?

            Originally posted by coleresources View Post
            Tried $('GRID1.DETAILVIEW_PART.FORM').addClass('NewClass') also but to no avail
            You may want to use '{grid.componentName}.DETAILVIEW_PART.FORM' --- so you can reference everywhere without worrying about what the system may name your grid. This is just a tip. It actually won't fix your issue.

            ...

            But the below will help:

            In your Grid's style sheet section (Properties > Miscellaneous > Local CSS definitions), add the following:
            Code:
            .nobackground {
            background: none;
            }
            And put this in the Grid Properties > Layout Options > Class map:
            Code:
            [class.gridData]=nobackground
            This will remove the background for both the grid and the detail view.

            If you want your grid to have the original background, then you would need to add this to the onGridRenderComplete client-side event:
            Code:
            $('{grid.componentName}.GRID_PART.DATAREGION').style.background = '#ffffff';
            ...or whatever variant of style function call you want to make. Change #ffffff to whatever your old grid background color was.

            Now, you can put this in your onDetailViewRender event:

            Code:
            $('{grid.componentName}.DETAILVIEW_PART.FORM').style.background='#013668';
            UPDATE: [class.gridData] defines the CSS for each row in the grid. The super to [class.gridData] is [class.gridPart]. {grid.componentName}.GRID_PART.DATAREGION contains all the rows in the grid. Setting the background for it will set the background for all rows --- since their background color is now nothing.

            Good luck.
            ---
            Sarah
            Last edited by TheSmitchell; 02-03-2013, 01:45 PM. Reason: Had incorrect grid ID in original
            Alpha Anywhere latest pre-release

            Comment


            • #7
              Re: Is there a way to assign a different style to the detail view of a grid?

              I should elaborate more.

              In the Style Builder in Parts > Grid, there's a property called the "Grid Data" selector. Every row of data in the Grid and Detail View has this Grid Data selector. The [class.gridData] is this Grid Data selector. If you set [class.gridData] = someOtherClass, every row of data in the Grid and Detail View will use that class instead of the "Grid Data selector defined in the style builder for your project's style.

              If you wanted to be precise about setting the background on your detail view and minimize side-effects, you could do this:

              In the onDetailViewRender event:
              Code:
              $acn('{grid.componentName}.DETAILVIEW_PART.FORM', 'myBackgroundOverride');
              In the Grid > Properties > Miscellaneous > Local CSS definitions
              Code:
              .myBackgroundOverride .GrBlueGridData {
              background-color: #013668;
              }
              "GrBlueGridData" will need to be replaced with whatever the name for the Grid Data selector is defined as in your project's style. In GrBlue, it's called "GrBlueGridData". This attribute is assigned to every TD in a grid data row --- this includes the Detail View.

              The method described in my earlier post will break highlight & select events in your grid. So if you had row highlighting on mouse-over and selection, it will cease to function. It may also kill alternate row highlighting --- I cannot confirm this, though, since I didn't bother testing it. However, using this method will only affect your Detail and will leave the grid parts alone.

              Hope that is more helpful.
              ---
              Sarah
              Alpha Anywhere latest pre-release

              Comment


              • #8
                Re: Is there a way to assign a different style to the detail view of a grid?

                Sarah,

                That is extremely helpful and I have made progress. When I open the detail view for an existing record it looks just like I want it to but when I create a new record, the detail view window does not reflect the changes I've made. When I inspect the element in firebug it appears to be the same element that exists to view detail for an existing record. Any ideas?

                Thanks you for your help!

                Comment


                • #9
                  Re: Is there a way to assign a different style to the detail view of a grid?

                  I see now that it's a different event if I am creating a new record. Thanks!

                  Comment


                  • #10
                    Re: Is there a way to assign a different style to the detail view of a grid?

                    Originally posted by coleresources View Post
                    I see now that it's a different event if I am creating a new record. Thanks!
                    Yes. The onDetailViewRender is not called when an new record view is opened. You'll need to also include your CSS code in the afterDetailViewNewRecord event.
                    Alpha Anywhere latest pre-release

                    Comment

                    Working...
                    X