Formatting a column in a datagrid

If I want to format some data in a column of a datagrid is
there a preferred way of doing that? I have used both an
itemRenderer and a labelFunction
Is there a preference to one or the other?

lableFunction can be used when the tweaking required is very
trivial and you want to modify some text getting displayed.
(custom) itemRenderers can be used when we want to display
something complex within a cell like few controls, icons, labels,
links etc.

Similar Messages

  • Bargraph,icon and a numeric value, together in a single column of advance datagrid

    Hiii,
    I am trying to embed an icon, a bargraph with two values and a numeric value in a single column of advance datagrid. can anybody help me out in giving a solution for this...I have read a  blog where the code explains about the bargraph in advance datagrid, I want to embed numeric value and icon too including bargraph in the column. I am looking for a Bargraph which  takes two values
    In the above image, the graph and rate is shown in a separate column , I require graph to be shown along with the numeric value and a icon in a single column.
    The blog which i refered and got the above output is placed below, it can be used for the reference.
    http://symmetri.blogsome.com/2009/05/22/render-a-bar-graph-within-a-datagrid/

    RVR,
    This is a great exercise to get familiar with LabVIEW's array functions.  A great place to start is actually the LabVIEW help on arrays, located here:
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/grouping_data_with/
    Depending on your data format, you can probably use the Read From Spreadsheet File VI to bring your data into a 2-d array.  You could then use the index array VI to pull your column out.  You could do this in a For loop and use Autoindexing to build your 1,000 column resulting array.  I would leave everything as a String format until I'm done. 
    This doesn't sound like a very difficult task.  Good luck!
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • Problem in Formatting Total Column in Classic Table

    Hi,
    I am using Classic Table.
    I am able to format the column data but i am unable to format the column total value. I searched in forum and tryed something like in the following thread..
    Problem in formatting Total Value in advanced table
    since i am using Classic Tables i am unable to do it.
    I also tried the following
    OATableBean table = ....
    OATotalRowBean totalRowBean = (OATotalRowBean)table.getColumnFooter();
    System.out.println("Formattotal : "+totalRowBean);
    if (totalRowBean != null)
    oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
    totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    in this case the total is not formatted.
    I also refered developer guide. There i found how to set value to total column.. but how to get the value its not given..
    Any body pls help in this regards
    Thanks & Regards

    Hi,
    When i am using Classic Table i am able to format column data but i am not able to format the column Total
    Code i using ;
    OATableBean table = (OATableBean) webBean.findChildRecursive("EmpTestVO12");
    table.prepareForRendering(pageContext);
    OAMessageStyledTextBean totalBean = (OAMessageStyledTextBean)table.findChildRecursive("Salary");
    if(totalBean!=null)
    Formatter formatter = new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
    totalBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    //Properly formatting column data
    Whe i am using OAAdvance Table bean i am able to format the total but i am unabele to format the Column data. Using following code..
    OAAdvancedTableBean tableBean=(OAAdvancedTableBean)webBean.findChildRecursive("region2");
    tableBean.prepareForRendering(pageContext);
    OAColumnBean c1=(OAColumnBean)webBean.findChildRecursive("column12");
    if(c1!=null)
    c1.setAttributeValue(CURRENCY_CODE,"USD");
    Can anybody pls tell me how can i achieve both (column values and totals formatting) using either Classic Table or Advance Table..
    Thanks & Regards,
    Ram

  • Conditionally Formatting One Column Based On The Value of Another Column

    I have the following requirement:
    I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
    I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
    CASE WHEN "Actual Sales" < "Budget Sales" THEN
    RED
    ELSE
    GREEN
    END
    Thoughts anyone?

    CASE WHEN (COL1 - COL2) < 0 then Red else Green end
    regards
    John
    http://obiee101.blogspot.com

  • Is it possible to make a condition for formatting multiple column?

    I am working on financial report like Balance Sheet. So that I am going to have 2 column and 1 on left, 2 and 3 on right.
    I tried to use format multiple columns but can't find any method to define where to break.

    when you create a stored procedure or use a command file( i believe) you can create CASE statements
    CASE WHEN ='BLUE' THEN 'COLUMN1'
    WHEN ='GREEN' THEN 'COLUMN2' END AS BUCKET1
    when you use this as the dataset you will see this as a field
    you can then group by the fields created.

  • Locking middle or last column in a datagrid

    Does anyone know how to lock say the middle or last column in
    a datagrid. What i really need is for the first and fifth column to
    be locked in a datagrid or Advanced datagrid. Is this possible or
    do i need to put two datagrids next to each other and try to sync
    the vertical scroll??
    Thanks,
    -Jay

    >>For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    Can't you just set an explicit width for the first two columns then?, e.g.:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    There is also a MinWidth property that you can use to prevent the columns from being to narrow:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • WebService get list 750 records with 8 columns in mx:DataGrid atleast 2 minutes

    I am using WebService (ASP.NET) to get a list of customers (around 750) records with 8 columns using mx:DataGrid. It takes to list data in the mx grid atleast 2 minutes from offline development data server[SQL SERVER 2005]. It could be better if the list populate the datagrid with-in 1 minute. I didn't find how to resolve the problem. My WebService returns the ArrayCollection within 1 minute.
    Any hints would appreciate!
    T. Ghosh

    It doesn’t matter how many records, what matters is how many attributes and sub-objects.  One customer returned 100 records, each with a transaction history of some 10,000 transactions, although the transactions were not displayed in the datagrid (it would be later in the detail view).  Then the app was configured to convert the records to typed objects.  As one would expect, it took forever.  You might have to create a custom converter or just use the SOAP/XML.

  • Link column in a datagrid

    Hi Dear;
    how can i create an A/R invoice link buttuon as column in as datagrid?
    regards;

    Hi
    it has been already discussed
    anyway Use this code
    dim oLink as SAPbouiCOM.EditTextColumn
    oLink=oGrid.Columns.Item(0)
    oLink.LinkedObjectType = "13" 'please check object type for Ar invoice
    Hope it helps you
    Regards
    Vishnu

  • Alternative to pre .. /pre formatting of columns?

    Hello,
    is there an alternative (maybe css-style - is there a list of these predefined definitions anywhere?) to the <pre>...</pre> formatting of columns.
    The problem of this way of doing it, is that the highlighting feature is not working any more.
    Ralf

    Check for that date 0001.01.01 00:00:00 000 in the script, why so hard?
    But really, I'd use the Conditional Split and check for string representation of the date diverting incorrect records.
    Arthur My Blog

  • Referencing custom filled column (labelFunction) in datagrid

    I got a column in a datagrid which is filled with data using some calculations done in a labelFunction.
    now i got a second column, which need the data of the previous mentioned column.
    normally you would type:  item.Data or something, but that does not work for the calculated field.
    how would i reference the first mentioned column in the labelFunction of the second?
    thnx

    The cheap way is to reference the the other column's labelFunction and call
    it again.  It means that the labelFunction will be called twice per row.
    You can get to the columns via DataGrid(owner).columns[]
    Another possibility is to add the labelFunction to the data objects or a
    subclass of the data objects.

  • How to Format DataTable Column after load Datatable without extra loop ??

    How to Format Column after load Datatable without extra loop ??
    I dont want to do extra logic which can cause performance thing.
    I have datatable which get fill from Dataset after database query, now i need to format column as decimal but without extra logic.
    I was thinking to create clone and than Import row loop but it ll kill performance, its WPF application.
    Thanks
    Jumpingboy

    You cannot do any custom things at all without doing some "extra logic". Formatting a number as decimal is certainly not a performance killer in any way whatsoever though.
    If you are displaying the contents of the DataTable in a DataGrid you could specify a StringFormat in the XAML:
    <DataGrid x:Name="dg1" AutoGenerateColumns="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="Number" Binding="{Binding num, StringFormat=N2}"/>
    </DataGrid.Columns>
    </DataGrid>
    Or if you are using auto-generated columns you could handle the AutoGeneratingColumn event:
    public MainWindow() {
    InitializeComponent();
    DataTable table1 = new DataTable();
    table1.Columns.Add(new DataColumn("num")
    DataType = typeof(decimal)
    table1.Rows.Add(1.444444444444);
    table1.Rows.Add(7.444444444444);
    dg1.ItemsSource = table1.DefaultView;
    dg1.AutoGeneratingColumn += dg1_AutoGeneratingColumn;
    void dg1_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) {
    if (e.PropertyName == "num") {
    DataGridTextColumn column = e.Column as DataGridTextColumn;
    column.Binding.StringFormat = "N2";
    <DataGrid x:Name="dg1" />
     Please remember to mark helpful posts as answer and/or helpful.

  • Removing header, border for only single column in mx:DataGrid

    Hi,
        I am using Flex4 SDK and FlashBuilder4.
    I have a requirement where i need to remove column header, borders and grid lines for only last column in datagrid.
    It should look like there is no column present. This column will be used to show some icon for only selected row.
        Can any one suggest how to implement this. Please provide any sample if you can.
    Thanks

    hi Johnny, it was helpfull for me.
    With the given example i am still getting the grid line gaps with the selected row or hover color between verticle cells of the column.
    As gridlines can only be removed for complete datagrid not for a single column. is it possible ?
    Thanks

  • Iterate single Column in a Datagrid

    How to iterate single column of datagrid using flex3.
    i want to iterate only one column.for eg  say column-5.
    and sum of all the data in col-5.

    Here is an example for enumerating the datagrid.  You can easily change it to do selected items instead.  You could also access the dataprovider source directly vs going through datagrid.
    //Summary function
    protected function UpdateTotal():void
       var fRunningTotal:Number = 0.0;
       var nNodeCount:int = 0;
       //Check if the dataprovider is empty.
       if (dgMyDatagrid.dataProviderLength == 0)
          //Nothing to total, return out.
          return;
       //Loop through all the nodes
       for (nCount = 0; nCount < dgMyDatagrid.dataProviderLength; nCount++)
           //At the current row in the dataprovider convert the 5th object (0 index = start).
           //Add to the running total.
           //If the dataprovider is an XMLListCollection you could address it by name.
           fRunningTotal += Number(dgMyDatagrid.dataProvider.getItemAt(nCount)[4])
       //Do something with the total here... like store it for displaying in a label.

  • Formatting for columns in group above report(non grp col)

    Hi
    I have a report that is group above. So for every record that appears in the group above, below is the corresponding fields. What I am trying to do is apply formatting like font, hide/show etc to the rows below. How can I do that.
    record1...............................<group above>...
    <corresponding columns-latest>
    <corresponding columns-old>
    record2...............................<group above>...
    <corresponding columns-latest>
    <corresponding columns-old>I want to be able to compare latest and old for a particular record and hide/show depending on if the value has changed. I only have one query for this report that is group above. Is it possible?

    Like you did select * from ....(select....)... In reports I wasnt able to create a col to col link for such cases. I need to have the db columns directly in select.
    Secondly, for a workaroudn i even changed that - next challenge was treating xmltype columns using xmlsequence as db columns. So if I have xmlsequence in my query, i cant create col to col link. I have 4 queries with unions. 2 have xmlsequence and 2 doesnt. When i create col to col link for cases with xlseq, it forces me to create a grp link... When i have queries without xmlseq, i can create the col to col link.

  • Is it possible to change an existing PDF from brochure format (2 columns) to single page?

    I have an old PDF, but not the source document. It is in two-column format, that is, two pages of text on one PDF page. I've tried converting to Word in Acrobat Pro XI, but that still preserves the two-column format. It's too big and complex to reformat in Word. I'd like to simply have each of the columns on their own page.

    You can copy the page and crop the left and the rigth column.

Maybe you are looking for

  • How to connect mobile model 2310 or 1112 to comput...

    how to connect mobile model 2310 or 1112 to computer i want to connect my mob to computer to update my ring tons

  • Number range transport request

    Hi, pls tell me are number range intervals  not transported using transport request, if yes then how are number ranges appear in prod. server. thanks Kavita

  • IDOC change pointer key filtering

    Hi Experts, I have created a message type ( ymatmas_xxxx ) and activated change pointers for this message type. So now may requriement is : If I have activated 10 fields in chanage pointer , so IDOC should trigger only if any of the 10 fields are cha

  • Realtime graphing

    Here's my situation: I have labview code I am using to control  a stepper motor. I would like to have a realtime graph that shows the position of the stepper motor (whether actual position or calculated position). I will be dealing with very large am

  • I received an email that said I would needed to verify my acct or it would be cancelled

    I received an email that said if I didn't verify my icloud information that my acct was going to be cancelled withing 24 hours. Is this legit..