I have a sharepoint list and the phone number field is in the format ###-###-#### and it ends up going to 2 lines. How can I set a width on that particular column? Do I need to do it from sharepoint designer?
there is no way to do this out of the box. Have to use sharepoint designer or jquery. Check out this msdn post
http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/f99303bb-6a95-4c05-951c-ff0185c4e864
This can be done via the xsltlistform webpart. drop it into the page in sharepoint and connect it to your list and move the columns around as needed.
Note: this is not the same as modifying the view, which as titan said is not available out of the box without opening the view page in sharepoint designer and modifying the xslt directly.
Best way is to use Alt+0160 Hard Space. Just type it once and copy this "Space" and paste as many you want!! Bingo!!
In SharePoint Designer 2010 I was able to modify column widths by opening the view I wanted to adjust, then lengthening the with of the column Title Field simply by dragging the field's box bigger.
This worked for what I was doing, but I noticed with some columns it affected others, I guess because they shared the same styling? I don't know enough to be certain.
<style>
/* new class created */
.ms-longg
{
width:500px
}
</style>
<script type="text/javascript">
$(document).ready(function(){
//removed existing class
$('input[title^="State"]').removeClass('ms-long');
//add New class for that textbox
$('input[title^="State"]').addClass('ms-longg');
});
</script>
Click here see more details
you can also use the below script to expand the width of specific column. Just edit the page then add script editor web part and add below code.
note: the column name is the internal name.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js">/script>
<script language="javascript" type="text/javascript">
jQuery(document).ready(function() {
var el = document.getElementsByName("<internal column name>");
el[0].style.width ="<size>";
});
</script>
Related
I've never worked before with SharePoint, that's why maybe my question is so basic but I could't find out the way to do this.
This picture contains what I've done so far.
I'm working with a SharePoint where I don't have all the administrator permitions, that's why I don't if teh option I need is disabled or just I can't find it.
You can see I have my page divided into 3 parts:
-the Left section, where I have a scheme of what i have in the middle.
-the Middle seccion, where I have the buttons.
-The Right section, this section I don't really need it so I want to delete it but I couldn't find the way to do it, and although I dont have anything there, It have a blank.
This is all the options I have in configuration:
We can add the code below into script editor web part to remove the right web part zone.
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("div[zoneTitle='Right']").closest("tr").children("td").eq(0).attr("width","100%");
$("div[zoneTitle='Right']").closest("td").hide();
})
</script>
Or we can use CSS style to hide the Right section.
<style>
div[zoneTitle='Right']{
display:none;
}
</style>
How we can change the text of the TAB Item dynamically based on Order Type in Sales order screen.
for example: for TR order type, I want to change Document Details to Transfer Details.
To my knowledge there is no DAC binding for changing Tab Header Text from the business logic layer (graph). A possible workaround if you have a limited number of alternative Tab Header Text could be to create a tab for each of them and dynamically hide them based on your display condition.
How to hide Tabs in Acumatica:
Hiding a tab from the user interface dynamically
The other option would be to use JavaScript to change the inner element of the Tab Header Control.
Both options are less than ideal and can have an impact if you're looking to have your customization certified by Acumatica but if it's a hard requirement that's the only ways to do it that I'm aware of.
In the following example I'm using the hardcoded HTML Control ID for the Tab Header Control that I looked up using the Inspect Element feature provided by HTML browsers:
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<script type="text/javascript">
$(function() {
$(document)
.ready(function() {
document.getElementById("ctl00_phG_tab_tab0").innerHTML = "My Tab Header Text";
});
});
</script>
[...]
</asp:Content>
SharePoint 2010 Custom List Form Tool Tip Field Help
I have a custom form in SharePoint and I need to add to formatted field help on mouseover, what is a good way to accomplish this?
STandard tooltips go away to fast.
Oh, by the way, we are NOT using InfoPath we are using SharePoint designer. We use to use Overlib but can't get it to work with SharePoint code.
Thanks for suggestions
We can use jQuery Tooltip from jQuery UI to achieve it. The code below for your reference:
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function(){
$("input[title='Title']").tooltip();
})
</script>
Add the code to a content editor web part in the custom form page. This code works for the Title field, you can add similar code to make it works for other fields.
I have a search box web part. In that web part I have created an instance of SearchBoxEx like
SearchBoxEx par=new SearchBoxEx
par.goImageUrl=""
par.DropDownMode= DropDownModes.DisplayScopeDD;
Button sear= new Button();
sear.Click += new EventHnadler(sear_Click);
I have added a button to that search Box web part.Now I have to read the scope selected in the SearchBoxEx in the sear_Click event.Can anyone please guide me in the right direction
Any help would be really appreciated.
You could read the Request.QueryString["s"] parameter, even when it is a post, the SearchBoxEx adds it.
Edit
Based on the comments and new info, are you using 'pure' javascript? This would be a jquery example:Search
WARNING: You should change the site masterpage INSIDE your site with SharePoint designer, not the one in the C:\Program Files\etc... folder. You could also navigate to the http://yourportal/_catalogs/masterpage library and download a copy of the default.master to change it then upload it back to the library, do all this carefully, you can break your sharepoint very easily.
Insert above the </HEAD> tag in your masterpage:
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
function newSearchResultsPageWithScope()
{
var scope = $(".ms-sbscopes select").val();
location.href = "/CustomResultsPage.aspx?s=" + scope;
}
</script>
The jquery portion is pretty straightforward, it gets the <td> with the class="ms-sbscopes", and the <select> element under it, then it sets the 'scope' variable to the selected value of the scopes dropdown.
Also, customizing the masterpage in a sharepoint site is fine, do not worry with that.
Is there a way to dynamically change the hyperlink associated with an ECB menu in WSS 3.0? For instance, I have a list with 2 fields. One field is hidden and is a link, the other is the title field which has the ECB menu. The title field currently links to the item's view page - but we want it to link to the link-field's url. Is that possible?
UPDATE - 5/29/09 9AM
I have this so far. See this TechNet post.
<script type="text/javascript">
var url = 'GoTo.aspx?ListTitle='+ctx.ListTitle;
url += '&ListName='+ctx.listName;
url += '&ListTemplate='+ctx.listTemplate;
url += '&listBaseType='+ctx.listBaseType;
url += '&view='+ctx.view;
url += '&';
var a = document.getElementsByTagName('a');
for(i=0;i<=a.length -1;i++)
{
a[i].href=a[i].href.replace('DispForm.aspx?',url);
}
</script>
This gives me a link like so (formatted so it's easier to see):
GoTo.aspx
?ListTitle=MyList
&ListName={082BB11C-1941-4906-AAE9-5F2EBFBF052B}
&ListTemplate=100
&listBaseType=0
&view={9ABE2B07-2B47-4390-9969-258F00E0812C}
&ID=1
My issue now is that the row in the grid gives each item the ID property above but if I change the view or do any filtering you can see that the ID is really just the row number. Can I get the actual item's GUID here?
If I can get the item's ID I can send it with the list ID to an application page that will get the right URL from field in the list and forward the user on to the right site.
I think the easiest solution and one I use regularly to modify default sharepoint functionality without having to install server side code is to inject some javascript onto the page to make the necessary modifications.
The Content Editor webpart is ideal for this if you don't want to edit the page source itself. Together with the IE Developer Toolbar or Firebug to inspect the elements you want to edit you should be able to achieve what you need with just a couple of lines of javascript.
Let me know if you need any further detail on getting this work.
The title/link to edit menu is a computed field - basically a combination of the title and item id. If you look at the definition of the field (off the top of my head I think it's in fields.xml) you should be able to create a modified version in your schema.xml that uses the url field in its RenderPattern.
Following up on Tom's answer, you can use the SharePoint Solution Generator in VseWss 1.3 to generate a Visual Studio solution that can re-create your list. You will faint when you see the huge amount of XML that the views use in the schema.xml file but you will see the render pattern that Tom referred to and you should be able to get a general idea of how to modify it to suit your needs.
Gotta love SharePoint. Where small customizations means "take what I give you or rewrite it from scratch"