This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
I need to extend nojoPortal to support our custom Catalog. So, after reading the great documentation, I was able to create a custom Module, add it to the site using the admin/Advanced Tools menu, and get my control to show up - great.
My control has a GridView in it. The GridView is connected to a SQLDataSource, and it does display data from the database - again, that's great. But, if I style the Gridview with header colors and alternate row colors, these settings aren't displayed when the control is viewed from the browser. All I see is a very basic black and white grid, with my data from the database. But the style info is not changing the look of the GridView.
If I take my control and make it into a stand-alone page, the header colors and alternate row colors are displayed. This is not a stylesheet issue because the GridView isn't using a stylesheet, the values are hard coded into it. What is causing mojoPortal to strip out the style from a GridView?
Thanks for a great product,
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
CellPadding="4" ForeColor="#333333" GridLines="None">
<RowStyle BackColor="#EFF3FB" />
<asp:BoundField DataField="seq" HeaderText="seq" InsertVisible="False" ReadOnly="True" SortExpression="seq" />
<asp:BoundField DataField="PartNumber" HeaderText="PartNumber" SortExpression="PartNumber" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
Probably you need to set EnableTheming="false" on your GridView.
Alternatively, you could also use <mp:mojoGridView and then you would have some styles that match other grids in mojoportal.
Hope it helps,
Setting EnableTheming="false" worked. I didn't know about that property.
Thanks - Jim