Search Results

Search found 16885 results on 676 pages for 'custom headers'.

Page 56/676 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Custom page sizes in paging dropdown in Telerik RadGrid

    Working with Telerik RadControls for ASP.NET AJAX is actually quite easy and the initial effort to get started with the control suite is very low. Meaning that you can easily get good result with little time. But there are usually cases where you have to go a little further and dig a little bit deeper than the standard scenarios. In this article I am going to describe how you can customize the default values (10, 20 and 50) of the drop-down list in the paging element of RadGrid. Get control over the displayed page sizes while using numeric paging... The default page sizes are good but not always good enough The paging feature in RadGrid offers you 3, well actually 4, possible page sizes in the drop-down element out-of-the box, which are 10, 20 or 50 items. You can get a fourth option by specifying a value different than the three standards for the PageSize attribute, ie. 35 or 100. The drawback in that case is that it is the initial page size. Certainly, the available choices could be more flexible or even a little bit more intelligent. For example, by taking the total count of records into consideration. There are some interesting scenarios that would justify a customized page size element: A low number of records, like 14 or similar shouldn't provide a page size of 50, A high total count of records (ie: 300+) should offer more choices, ie: 100, 200, 500, or display of all records regardless of number of records I am sure that you might have your own requirements, and I hope that the following source code snippets might be helpful. Wiring the ItemCreated event In order to adjust and manipulate the existing RadComboBox in the paging element we have to handle the OnItemCreated event of RadGrid. Simply specify your code behind method in the attribute of the RadGrid tag, like so: <telerik:RadGrid ID="RadGridLive" runat="server" AllowPaging="true" PageSize="20"    AllowSorting="true" AutoGenerateColumns="false" OnNeedDataSource="RadGridLive_NeedDataSource"    OnItemDataBound="RadGrid_ItemDataBound" OnItemCreated="RadGrid_ItemCreated">    <ClientSettings EnableRowHoverStyle="true">        <ClientEvents OnRowCreated="RowCreated" OnRowSelected="RowSelected" />        <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"            ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" />        <Scrolling AllowScroll="true" ScrollHeight="360px" UseStaticHeaders="true" SaveScrollPosition="true" />        <Selecting AllowRowSelect="true" />    </ClientSettings>    <MasterTableView DataKeyNames="AdvertID">        <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />        <Columns>            <telerik:GridBoundColumn HeaderText="Listing ID" DataField="AdvertID" DataType="System.Int32"                SortExpression="AdvertID" UniqueName="AdvertID">                <HeaderStyle Width="66px" />            </telerik:GridBoundColumn>             <!--//  ... and some more columns ... -->         </Columns>    </MasterTableView></telerik:RadGrid> To provide a consistent experience for your visitors it might be helpful to display the page size selection always. This is done by setting the AlwaysVisible attribute of the PagerStyle element to true, like highlighted above. Customize the values of page size Your delegate method for the ItemCreated event should look like this: protected void RadGrid_ItemCreated(object sender, GridItemEventArgs e){    if (e.Item is GridPagerItem)    {        var dropDown = (RadComboBox)e.Item.FindControl("PageSizeComboBox");        var totalCount = ((GridPagerItem)e.Item).Paging.DataSourceCount;        var sizes = new Dictionary<string, string>() {            {"10", "10"},            {"20", "20"},            {"50", "50"}        };        if (totalCount > 100)        {            sizes.Add("100", "100");        }        if (totalCount > 200)        {            sizes.Add("200", "200");        }        sizes.Add("All", totalCount.ToString());        dropDown.Items.Clear();        foreach (var size in sizes)        {            var cboItem = new RadComboBoxItem() { Text = size.Key, Value = size.Value };            cboItem.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);            dropDown.Items.Add(cboItem);        }        dropDown.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;    }} It is important that we explicitly check the event arguments for GridPagerItem as it is the control that contains the PageSizeComboBox control that we want to manipulate. To keep the actual modification and exposure of possible page size values flexible I am filling a Dictionary with the requested 'key/value'-pairs based on the number of total records displayed in the grid. As a final step, ensure that the previously selected value is the active one using the FindItemByValue() method. Of course, there might be different requirements but I hope that the snippet above provide a first insight into customized page size value in Telerik's Grid. The Grid demos describe a more advanced approach to customize the Pager.

    Read the article

  • Custom trackpad mapping doesn't work for all applications

    - by picheto
    I found out I could invert my trackpad scrolling, so as to work more like the OS X "natural scrolling", which I liked better. To do that, I run the following command on startup: xinput set-button-map 11 1 2 3 5 4 7 6 Where 11 is the touchpad id (found with xinput list and xinput test 11). This inverts the vertical and horizontal two-finger scrolling, and works fine in Terminal, Chrome, Document Viewer, etc. However, it doesn't work in Nautilus and some applications such as the Update Manager, as they keep the usual mapping. I'm running Ubuntu 12.04 x64 Why does this mapping work for some applications but not for others? I know there is software I can download to do the same, but this method seemed "cleaner". Thanks

    Read the article

  • exposing subcontrols from the custom widget plugin in QT

    - by Santosh
    I am using QT 4.3. I have created one custom widget plugin. I could be able to show it in the desiner tool box as well as use it on the form with no problem. This custom widget internally holds QGroupBox, QLabel, QTextEdit. Now I want to apply the styles to individual componets of this custom widget. I want to expose these internal conrols as sub-control and style them. This would be similar to tear subcontrol of QTabWidget. In style sheet we can refer it as QTabWidget::tear... Is there any way by which I can do similar thing with my custom widget?

    Read the article

  • ubuntu 10.04: boot error for custom compiled kernel - gave up wating for root device

    - by atharva
    Hi, I have installed lucid on my Lenevo Laptop (Y 410 series , x86 platoform) and it is working fine. Now I have compiled kernel 2.6.37 from the downloaded from the kernel tree. I followed usual procedure of compileing kernel (make menuconfig,make. make modules etc). Then I created the initrd image using mkinitramfs and updated my grub using upadate grub command. Update-grub detects the initrd image of the compiled kernel. However when I boot from this kernel it gives me following error: Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline) -Check rootdelay= (did the system wait long enough?) -Check root= (did the system wait for the right device?) -Missing modules (cat /proc/modules; ls /dev) ALERT! root=UUID=/... does not exist and then it falls onto initramfs prompt. I have tried following solutions discussed in different ubuntu forums: 1. disable uuid and point root=/dev/sda8 (sda8 is where my kernele image resides (both default kernel and compiled one) from /etc/default/grub 2. compile kernel using CONFIG_DEVTMPFS=y suggested here Still I am unable to boot from the compile kernel. Could someone please suggest me the solution ?

    Read the article

  • Writing custom Django fields and widgets

    - by hekevintran
    Django has very good documentation that describes how to write custom database fields and custom template tags and filters. I cannot find the document that describes how to write custom form fields and widgets. Does this document exist? The way I've been able to write custom form fields and widgets is by reading the Django source code and imitating what I see there. I know that there are still things about implementing fields and widgets that I do not completely understand because I have not read any high level document that describes their interfaces.

    Read the article

  • LXR plugin for Trac for custom C++ based projects

    - by user1542093
    I am currently trying to look at the possibility of an LXR or LXR type extension for Trac for cross referencing and indexing of large C++ projects. I had been looking at what LXR had been doing with the Linux kernel source code and was fascinated by the cross referencing and the amount of detail offered. Is there a way I could set up such an LXR system for my own C++ based source code, preferably using trac.

    Read the article

  • Rich snippet for Google Custom Search - Schema.org

    - by Joesoc
    I am trying to extract the book URL from a link using microdata. The format is specified in schema.org. Here is my html. <div class="col-sm-4 col-md-3" itemscope itemtype="http://schema.org/Book"> <div class="thumbnail"> <img src="{{ book.thumbnailurl }}" itemprop="thumbnailUrl" style="width: 100px;height: 200px;"> <div class="caption"> <h4><span itemprop="name">{{ book.name }}</span> - <span itemprop="author">{{ book.author }}</span></h4> <p><span itemprop="about"> {{ book.about }}</span></p> <p> <a href="{{ book.url }}" itemprop="url" onclick="trackOutboundLink(‘{{ book.name }}’);"> <button type="button" class="btn btn-default btn-md"> <span class="glyphicon glyphicon-book"></span>Read </button> </a> </p> </div> </div> </div> When I use google snippet testing tool the JSON API returns book as a html link. However when I make the call in javascript the value of url is text("Read"). What am i missing ?

    Read the article

  • GLSL per pixel lighting with custom light type

    - by Justin
    Ok, I am having a big problem here. I just got into GLSL yesterday, so the code will be terrible, I'm sure. Basically, I am attempting to make a light that can be passed into the fragment shader (for learning purposes). I have four input values: one for the position of the light, one for the color, one for the distance it can travel, and one for the intensity. I want to find the distance between the light and the fragment, then calculate the color from there. The code I have gives me a simply gorgeous ring of light that get's twisted and widened as the matrix is modified. I love the results, but it is not even close to what I am after. I want the light to be moved with all of the vertices, so it is always in the same place in relation to the objects. I can easily take it from there, but getting that to work seems to be impossible with my current structure. Can somebody give me a few pointers (pun not intended)? Vertex shader: attribute vec4 position; attribute vec4 color; attribute vec2 textureCoordinates; varying vec4 colorVarying; varying vec2 texturePosition; varying vec4 fposition; varying vec4 lightPosition; varying float lightDistance; varying float lightIntensity; varying vec4 lightColor; void main() { vec4 ECposition = gl_ModelViewMatrix * gl_Vertex; vec3 tnorm = normalize(vec3 (gl_NormalMatrix * gl_Normal)); fposition = ftransform(); gl_Position = fposition; gl_TexCoord[0] = gl_MultiTexCoord0; fposition = ECposition; lightPosition = vec4(0.0, 0.0, 5.0, 0.0) * gl_ModelViewMatrix * gl_Vertex; lightDistance = 5.0; lightIntensity = 1.0; lightColor = vec4(0.2, 0.2, 0.2, 1.0); } Fragment shader: varying vec4 colorVarying; varying vec2 texturePosition; varying vec4 fposition; varying vec4 lightPosition; varying float lightDistance; varying float lightIntensity; varying vec4 lightColor; uniform sampler2D texture; void main() { float l_distance = sqrt((gl_FragCoord.x * lightPosition.x) + (gl_FragCoord.y * lightPosition.y) + (gl_FragCoord.z * lightPosition.z)); float l_value = lightIntensity / (l_distance / lightDistance); vec4 l_color = vec4(l_value * lightColor.r, l_value * lightColor.g, l_value * lightColor.b, l_value * lightColor.a); vec4 color; color = texture2D(texture, gl_TexCoord[0].st); gl_FragColor = l_color * color; //gl_FragColor = fposition; }

    Read the article

  • Looking to create website that can have custom GUI and database per user

    - by riley3131
    I have developed an MS Access database for a company to track data in regards to production of a certain commodity. It has many many tables, forms, reports, etc. These were all done as the user requested, and resemble the users previously used system, mostly printed worksheets and excel workbooks. This has created a central location for all information and has allowed the company to compare data in a new way. I am now looking to do this for other companies, but would like to switch it to a web application. Here is my question. What is the best way to create unique solutions for individual companies that can have around 100 users each? I would love to create one site that would serve all parties, but that would ruin the customizable nature of what I am developing. I love the ability to create reports, excel sheets, pdf, graphs, etc with access, but am tired of relying on my customers software, servers, etc. I have some experience with WAMP, but I am far better at VBA. I was okay at PHP, and was getting a grasp on JavaScript a few years back. I am also trying to decide whether to go with WAMP or LAMP, if web is the best choice. Also, should I try set up one site for all users that after log-in goes to company specific pages, or individual sites for each company? Should I host or use a service?

    Read the article

  • custom icon in "Places" menu

    - by Gurnarok
    Hi, I'm pretty new to Ubuntu, but I know the basics. I read the "How do I change the folder icons in the “Places” menu?" but it didn't help, did the option #2 since I want to specify it for a single directory (for now). So what should I do? I have the folder image as SVG in: /usr/share/icons/hicolor/scalable/apps/ /usr/share/icons/hicolor/scalable/places/ The image I want to use: and where I want it:

    Read the article

  • Adding custom applications to Gnome launcher

    - by Shaftoe2702
    Looking for a utility that allows me insert an item into the list of applications that GNOME knows about. For example: I have downloaded Eclipse EE (I have some very special plugins that I need to work with, and those plugins don't "like" the version available in the default repository). I'm using GNOME 3, on Ubuntu 11.10. So I want to execute Eclipse w/o opening a terminal and running it. It must be something very simple.

    Read the article

  • Custom Text and Binary Payloads using WebSocket (TOTD #186)

    - by arungupta
    TOTD #185 explained how to process text and binary payloads in a WebSocket endpoint. In summary, a text payload may be received as public void receiveTextMessage(String message) {    . . . } And binary payload may be received as: public void recieveBinaryMessage(ByteBuffer message) {    . . .} As you realize, both of these methods receive the text and binary data in raw format. However you may like to receive and send the data using a POJO. This marshaling and unmarshaling can be done in the method implementation but JSR 356 API provides a cleaner way. For encoding and decoding text payload into POJO, Decoder.Text (for inbound payload) and Encoder.Text (for outbound payload) interfaces need to be implemented. A sample implementation below shows how text payload consisting of JSON structures can be encoded and decoded. public class MyMessage implements Decoder.Text<MyMessage>, Encoder.Text<MyMessage> {     private JsonObject jsonObject;    @Override    public MyMessage decode(String string) throws DecodeException {        this.jsonObject = new JsonReader(new StringReader(string)).readObject();               return this;    }     @Override    public boolean willDecode(String string) {        return true;    }     @Override    public String encode(MyMessage myMessage) throws EncodeException {        return myMessage.jsonObject.toString();    } public JsonObject getObject() { return jsonObject; }} In this implementation, the decode method decodes incoming text payload to MyMessage, the encode method encodes MyMessage for the outgoing text payload, and the willDecode method returns true or false if the message can be decoded. The encoder and decoder implementation classes need to be specified in the WebSocket endpoint as: @WebSocketEndpoint(value="/endpoint", encoders={MyMessage.class}, decoders={MyMessage.class}) public class MyEndpoint { public MyMessage receiveMessage(MyMessage message) { . . . } } Notice the updated method signature where the application is working with MyMessage instead of the raw string. Note that the encoder and decoder implementations just illustrate the point and provide no validation or exception handling. Similarly Encooder.Binary and Decoder.Binary interfaces need to be implemented for encoding and decoding binary payload. Here are some references for you: JSR 356: Java API for WebSocket - Specification (Early Draft) and Implementation (already integrated in GlassFish 4 promoted builds) TOTD #183 - Getting Started with WebSocket in GlassFish TOTD #184 - Logging WebSocket Frames using Chrome Developer Tools, Net-internals and Wireshark TOTD #185: Processing Text and Binary (Blob, ArrayBuffer, ArrayBufferView) Payload in WebSocket Subsequent blogs will discuss the following topics (not necessary in that order) ... Error handling Interface-driven WebSocket endpoint Java client API Client and Server configuration Security Subprotocols Extensions Other topics from the API

    Read the article

  • Writing custom Django form fields and widgets

    - by hekevintran
    Django has very good documentation that describes how to write custom database fields and custom template tags and filters. I cannot find the document that describes how to write custom form fields and widgets. Does this document exist? The way I've been able to write custom form fields and widgets is by reading the Django source code and imitating what I see there. I know that there are still things about implementing fields and widgets that I do not completely understand because I have not read any high level document that describes their interfaces.

    Read the article

  • Ubuntu 10.04: boot error for custom compiled kernel - gave up waiting for root device

    - by atharva
    I have installed lucid on my Lenevo Laptop (Y 410 series , x86 platform) and it is working fine. Now I have compiled kernel 2.6.37 downloaded from the kernel tree. I followed usual procedure of compiling kernel (make menuconfig, make, make modules etc). Then I created the initrd image using mkinitramfs and updated my grub using update-grub command. update-grub detects the initrd image of the compiled kernel. However when I boot from this kernel it gives me following error: Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline) -Check rootdelay= (did the system wait long enough?) -Check root= (did the system wait for the right device?) -Missing modules (cat /proc/modules; ls /dev) ALERT! root=UUID=/... does not exist and then it falls onto initramfs prompt. I have tried following solutions discussed in different Ubuntu forums: disable uuid and point root=/dev/sda8 (sda8 is where my kernel image resides (both default kernel and compiled one) from /etc/default/grub compile kernel using CONFIG_DEVTMPFS=y suggested here Still I am unable to boot from the compile kernel. Could someone please suggest me the solution?

    Read the article

  • Custom Context Menu with Javascript?

    - by viatropos
    Is there a way to add custom fields to the built in browser context menu using Javascript? I know flash/actionscript can do this, how are they doing it? Example: right click on http://josephjewell.com and see the custom context menu. Is this possible with pure javascript or do you have to use flash? Note, I'm looking for adding to the built in browser context menu, not using custom javascript popups to mimic them.

    Read the article

  • Drupal, custom formatter module: PHP has encountered an Access Violation

    - by Patrick
    hi, I'm having a problem with custom formatters in Drupal. I'm using a custom formatter on a CCK file file with the following content: but when I select it to use I get an internal server error: PHP has encountered an Access Violation at 16B357F9 Please note: 1) It sometimes worked, but the page becomes soon unavailable after a while 2) I've tried to replace the custom formatter content with a simple Hello and I get the error anyway, so it should not be related to the content. 3) I'm using another custom formatter with another CCK field and it doesn't give any error. Thanks

    Read the article

  • Running Assemblies in custom application domains

    This sounds like a deep technical thing and internally it's right too. But in a developer prospective, if he needs to run an assembly under a fresh new ApplicationDomain, it's so easy like just use some of the classes defined in System NameSpace. Below I am explaining this with a small console application.

    Read the article

  • SQL Monitor Custom Metric: Out of memory errors

    The number of out of memory errors that have occurred within a rolling five minute window. If you just want to keep an eye out for any memory errors, you can watch the ring buffers for the Out of memory errors alert when it gets registered there. Get alerts within 15 seconds of SQL Server issuesSQL Monitor checks performance data every 15 seconds, so you can fix issues before your users even notice them. Start monitoring with a free trial.

    Read the article

  • Custom Request Templates

    - by Seth P.
    What kind of information do you require from the project management team before you can proceed on a project? Is there a certain format they utilize on Programming Requests which helps you to understand exactly how the development team can succeed with this project. Example: I always like it when project managers mock up forms. It helps significantly to know how they are visualizing the UI for many tasks. Any suggestions on how we can assist the Project Management team in issuing Programming Requests that are as clear as day will be greatly appreciated. Thanks.

    Read the article

  • Tips on Custom Website Development

    Today, successful businesses are not just focused on being ahead of competition but also focus on being front runners, pioneers and consistent leaders. Web king solution offers you a gamut of IT related services, top-notch management skills and marketing insight to keep you at the top of the list.

    Read the article

  • Can I include the path and query string in an IIS "Error Pages" redirect?

    - by Dylan Beattie
    I'm setting up a custom 403.4 handler so that non-SSL requests to my site are redirected to a different URL - and what I'd like to do is to include the script path and query string in the redirect, so that a user who requests http://www.site.com/foo?bar=1 will be redirected to https://www.site.com/foo?bar=1 I know something similar is possible when configuring a top-level site redirect, using the $S, $Q, %v tokens referred to in this IIS reference page - but this syntax doesn't seem to work when configuring a custom error redirect.

    Read the article

  • The Most Recent Aspects of Custom Web Application Development

    In today's untainted playing environment, a playing cannot meet some hiatus by insightful a watch-and-follow approach. The policy makers of every modern-day covering operation playing prerequisite to find dependable that scheme covering strategies are thoughtfully designed and implemented, in visit to meet aweigh of the rivalry and times.

    Read the article

  • Dynamic Custom Fields for Data Model

    - by Jerry Deng
    I am in the process of creating a dynamic database where user will be able to create resource type where he/she can add custom fields (multiple texts, strings, and files) Each resource type will have the ability to display, import, export its data; I've been thinking about it and here are my approaches. I would love to hear what do you guys think. Ideas: just hashing all the custom data in a data field (pro: writing is easier, con: reading back out may be harder); children fields (the model will have multiple fields of strings, fields of text, and fields for file path); fixed number of custom fields in the same table with a key mapping data hash stored in the same row; Non-SQL approach, but then the problem would be generating/changing models on the fly to work with different custom fields;

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >