In ASP MVC (RC 1), how can I change the default template for ValidationSummary?
By default it ValidationSummary() shows a bullet list of errors in red. How can I change this? (i.e Have images instead of bullets)
You could use CSS instead of trying to change the html... for example to change the bullets to an image you can use list-style-image.
Related
In a ASP.Net MVC application I wish to show in a kendo grid column a cell () colored via a color I receive in the form #FFAABB from the controller... how can I do that?
can I just apply the color via style received in the viewbag or is there a better way?
Thanks in advance
First of all, is the color is going to be only one that is being passed from the Controller and if so then you can use Viewbag or a Static variable.
But if the colors are going to differ with each rows of the Grid then its better to pass them along the Model and use a template to set the color, please see a demo I created for the same: Column Coloring from Model
I am using colors drop down in list view.In this dropdown,From the datasource,I am able to display colors from my database.
what I want is that,In the drop down,For each value i want to display name of color and squarish box filled with this color.
I have implemented the below for displaying drop down,
<select STYLE="width:90px;height:auto" id="Flag" data-bind="value:prj_flag" data-text-field="usr_color" data-value-field="usr_id" data-source="FlagdatSource" data-role="dropdownlist"></select>
Do you know how to define it NOT using KendoUI? I mean, if you know how to do it using HTML select then you should be able implementing the same in KendoUI using template in DropDownList (check KendoUI DropDownList). Doing this, you reduce your problem to a CSS question instead of a KendoUI.
You should create your server to return not only the text of the for these colors but also the color codes. Then all you need to to is to create a template.
Here it is in action, the only difference is that it is using local data (not coming from a server).
I would like to programmatically set a border around a Form component in Java. How can I do this without having to edit the css style sheet?
You could wrap the form with a Panel component, which has a border defined already. Otherwise, not much alternatives than just using CSS.
One option, if you wish to stay inside the server environment, is to use the CSSInject add-on and add the border using that (you still need to write CSS, but you can do it on the server in a Java file and not inside a regular CSS file).
Vaadin Flow — Style::set to specify CSS
In Vaadin Flow (Vaadin versions 10 and later), you can conveniently set CSS for a widget or layout programmatically. No need to edit separate CSS files, even though styling with CSS files is the recommended way.
On your widget/layout, call getStyle to retrieve the Style object.
On that Style object, call set to pass the name and value of your CSS property.
For example, I find setting a bright colored border on my nested layouts quite helpful for debugging.
myVerticalLayout.getStyle().set( "border" , "6px dotted DarkOrange" ) ;
You can see this in action with this screenshot on my Answer to another Vaadin question here:
i am using partial view for my project but my problem is that my links are on right side of masterpage and when i clicked on particular link the view should displayed on left side on contentplace holder of master page. but right now its showing exactly below so my whole disgne is distrubed.
how to position partial view in asp.net mvc through java script?
so please if anyone know the solution tell me.
thanks
Do you basically mean your HTML is not set to allow the Content on the left, and the Menu on the right?
Maybe you would benefit from a CSS Layout Template? Put the Content placeholder in large column, and the menu PartialView in the side bar.
It might be a problem with your page CSS. Look at your styles for "Float" 's. If you want your content to be to the left of your page, surround your contentPlaceHolder with a div tag and add a "float:left" style to it.
If that doesn't work it might be your view is wider than your master page design is set up for. So it will pop below every other page element to fit on your page!
This is not realy asp.net mvc specific but html. You will have a better chance to solve your problem if you tag your question as html and css.
You can just save the source (I mean the rendered source from within the browser) of the page that doesnt display properly with the extension html in the root of your web. Then start playing with the html.
Request the page by calling http://yourserver/yourpagetodebug.html.
I have been searching some .css layouts for asp.net mvc model.
I like the suggested view, but I want to give a new look to my application just applying a new color scheme.
Someone find some nice schema?
thanks.
If you want to change the color scheme you might want to try Kuler
http://kuler.adobe.com/#themes/newest?time=30
You select the color scheme you like and click on this click this button http://www.rocketweb.nl/download/adjustcolor.jpg button.
Next you select the hex value and copy/past this in the css file of the MVC application, replacing the original color value. Don't forget about the # character!
Or if you are on this page:
http://kuler.adobe.com/#create/fromacolor.
You can create your own color scheme.