How to have custom control in DataGridView display object's value?

I have a sample project located
here
The project has a main form `Form1` where the user can enter customers in a datagridview. The `CustomerType` column is a custom control and when the user clicks the button, a search form `Form2` pops up.
The search form is populated with a list of type `CustomerType`. The user can select a record by double-clicking on the row, and this object should be set in the custom control. The `DataGridView` should then display the `Description` property but in the background
each cell should hold the value (ie. the `CustomerType` instance).
The relevant code is located in the following classes:
The column class:
public class DataGridViewCustomerTypeColumn : DataGridViewColumn
public DataGridViewCustomerTypeColumn()
: base(new CustomerTypeCell())
public override DataGridViewCell CellTemplate
get { return base.CellTemplate; }
set
if (value != null && !value.GetType().IsAssignableFrom(typeof(CustomerTypeCell)))
throw new InvalidCastException("Should be CustomerTypeCell.");
base.CellTemplate = value;
The cell class:
public class CustomerTypeCell : DataGridViewTextBoxCell
public CustomerTypeCell()
: base()
public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle);
CustomerTypeSearch ctl = DataGridView.EditingControl as CustomerTypeSearch;
if (this.Value == null)
ctl.Value = (CustomerType)this.DefaultNewRowValue;
else
ctl.Value = (CustomerType)this.Value;
public override Type EditType
get { return typeof(CustomerTypeSearch); }
public override Type ValueType
get { return typeof(CustomerType); }
public override object DefaultNewRowValue
get { return null; }
And the custom control:
public partial class CustomerTypeSearch : UserControl, IDataGridViewEditingControl
private DataGridView dataGridView;
private int rowIndex;
private bool valueChanged = false;
private CustomerType value;
public CustomerTypeSearch()
InitializeComponent();
public CustomerType Value
get { return this.value; }
set
this.value = value;
if (value != null)
textBoxSearch.Text = value.Description;
else
textBoxSearch.Clear();
private void buttonSearch_Click(object sender, EventArgs e)
Form2 f = new Form2();
DialogResult dr = f.ShowDialog(this);
if (dr == DialogResult.OK)
Value = f.SelectedValue;
#region IDataGridViewEditingControl implementation
public object EditingControlFormattedValue
get
if (this.value != null)
return this.value.Description;
else
return null;
set
if (this.value != null)
this.value.Description = (string)value;
public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context)
return EditingControlFormattedValue;
public void ApplyCellStyleToEditingControl(DataGridViewCellStyle dataGridViewCellStyle)
this.BorderStyle = BorderStyle.None;
this.Font = dataGridViewCellStyle.Font;
public int EditingControlRowIndex
get { return rowIndex; }
set { rowIndex = value; }
public bool EditingControlWantsInputKey(Keys key, bool dataGridViewWantsInputKey)
return false;
public void PrepareEditingControlForEdit(bool selectAll)
//No preparation needs to be done
public bool RepositionEditingControlOnValueChange
get { return false; }
public DataGridView EditingControlDataGridView
get { return dataGridView; }
set { dataGridView = value; }
public bool EditingControlValueChanged
get { return valueChanged; }
set { valueChanged = value; }
public Cursor EditingPanelCursor
get { return base.Cursor; }
#endregion
private void CustomerTypeSearch_Resize(object sender, EventArgs e)
buttonSearch.Left = this.Width - buttonSearch.Width;
textBoxSearch.Width = buttonSearch.Left;
However, the `DataGridView` is not displaying the text and it also is not keeping the `CustomerType` value for each cell.
What am I missing?
Marketplace: [url=http://tinyurl.com/75gc58b]Itza[/url] - Review: [url=http://tinyurl.com/ctdz422]Itza Update[/url]

Hello,
1. To display the text, we need to override the ToString method for CustomerType
public class CustomerType
public int Id { get; set; }
public string Description { get; set; }
public CustomerType(int id, string description)
this.Id = id;
this.Description = description;
public override string ToString()
return this.Description.ToString();
2. To get the cell's value changed, we could pass the cell instance to that editing control and get its value changed with the following way.
public partial class CustomerTypeSearch : UserControl, IDataGridViewEditingControl
private DataGridView dataGridView;
private int rowIndex;
private bool valueChanged = false;
private CustomerTypeCell currentCell = null;
public CustomerTypeCell OwnerCell
get { return currentCell; }
set
currentCell = null;
currentCell = value;
public CustomerTypeSearch()
InitializeComponent();
private void buttonSearch_Click(object sender, EventArgs e)
Form2 f = new Form2();
DialogResult dr = f.ShowDialog(this);
if (dr == DialogResult.OK)
currentCell.Value = f.SelectedValue;
this.textBoxSearch.Text = f.SelectedValue.Description;
#region IDataGridViewEditingControl implementation
public object EditingControlFormattedValue
get
if (this.currentCell.Value != null)
return (this.currentCell.Value as CustomerType).Description;
else
return null;
set
if (this.currentCell != null)
(this.currentCell.Value as CustomerType).Description = (string)value;
public object GetEditingControlFormattedValue(DataGridViewDataErrorContexts context)
return EditingControlFormattedValue;
public void ApplyCellStyleToEditingControl(DataGridViewCellStyle dataGridViewCellStyle)
this.BorderStyle = BorderStyle.None;
this.Font = dataGridViewCellStyle.Font;
public int EditingControlRowIndex
get { return rowIndex; }
set { rowIndex = value; }
public bool EditingControlWantsInputKey(Keys key, bool dataGridViewWantsInputKey)
return false;
public void PrepareEditingControlForEdit(bool selectAll)
//No preparation needs to be done
public bool RepositionEditingControlOnValueChange
get { return false; }
public DataGridView EditingControlDataGridView
get { return dataGridView; }
set { dataGridView = value; }
public bool EditingControlValueChanged
get { return valueChanged; }
set { valueChanged = value; }
public Cursor EditingPanelCursor
get { return base.Cursor; }
#endregion
private void CustomerTypeSearch_Resize(object sender, EventArgs e)
buttonSearch.Left = this.Width - buttonSearch.Width;
textBoxSearch.Width = buttonSearch.Left;
Cell:
public class CustomerTypeCell : DataGridViewTextBoxCell
public CustomerTypeCell()
: base()
public override void InitializeEditingControl(int rowIndex, object initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
base.InitializeEditingControl(rowIndex, initialFormattedValue, dataGridViewCellStyle);
CustomerTypeSearch ctl = DataGridView.EditingControl as CustomerTypeSearch;
ctl.OwnerCell = this;
public override Type EditType
get { return typeof(CustomerTypeSearch); }
public override Type ValueType
get { return typeof(CustomerType); }
public override object DefaultNewRowValue
get { return null; }
Result:
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to use custom control.

    hi all,
        how to use custom controls in screen painter.
    can i add image to my screen  using custom control.
    is there any other way to display image on screen.
    give me some notes about custom control.
    and sample programs to display image and also the use of custom control.
    regards,
    bhaskar.

    hi vinod,
    u can use the class <b>cl_gui_picture</b> to work around with pictures on the screen
    just define a custom control on the screen
    create an object of custom container.
    create another object of cl_gui_picture giving container name as the parent name...
    u can check out the class using the transn se24....
    pls post if additional info is required...
    Regards,
    Vs

  • Generic custom control that can display an image or swf?

    Hi,
    I want to create a custom control that can take an image or swf as an argument and display it in the same way.
    If the programmer uses this control (which essentially is a button with custom display) I want him to be able to just state the source and the text that is to be shown. Like this:
       <myControls:myButtonControl descriptionText="swf object" symbolObject="{Application.application.shape01swf}">
    or
       <myControls:myButtonControl descriptionText="img object" symbolObject="{Application.application.shape01img}">
    where shape01swf and shape01swf are embeded objects as follows:
       [Embed("../assets/swf/Shape01.swf")]
        public var shape01swf:Class;
       [Embed("../assets/images/Shape01img.jpg")]
       public var shape01img:Class;
    Which kind of object should I create in my custom control that can display this?
    Right now I have created a Class that extends VBox so that I can display the image/swf above the descriptionText.
    (I am using Flex 3.)

    Aha, so the Image control can use an swf as a source as well?
    I just assumed that it could not and I would have to use the SWFLoader to do it.
    So, this is my solution:
            override protected function createChildren():void{
                iconField = new Image();
                addChild(DisplayObject(iconField));
                textField = new Text();
                addChild(DisplayObject(textField));
                super.createChildren();
            private function init(e:Event):void{
                iconField.source = symbolObject;
                textField.text = descriptionText;
    Thanks!

  • How to save Custom control records through module pool program ?

    Hi guru ,
    1. How to save Custom control records through module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi,
    can refer following code -
    IN PAI , CODE is as follows-
    *&      Form  editor_output
    FORM editor_output .
    NARRATION1 is name of custom controller
      IF v_editor IS INITIAL.
      Create obejct for custom container
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name              = 'NARRATION1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT v_editor
          EXPORTING
            wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position
            wordwrap_position          = line_length
            wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                     = v_custom_container
          EXCEPTIONS
            error_cntl_create          = 1
            error_cntl_init            = 2
            error_cntl_link            = 3
            error_dp_create            = 4
            gui_type_not_supported     = 5
            OTHERS                     = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " editor_output
    getting textdata in internal table as follows
    *&      Form  create_text
    FORM create_text .
      REFRESH : it_texttable,
                it_text.
      IF v_doc_number IS NOT INITIAL.
        IF v_editor IS NOT INITIAL.
          CALL METHOD v_editor->get_text_as_r3table
            IMPORTING
              table                  = it_texttable
            EXCEPTIONS
              error_dp               = 1
              error_cntl_call_method = 2
              error_dp_create        = 3
              potential_data_loss    = 4
              OTHERS                 = 5.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Now, our final text data is in internal table it_texttable.
    pls, Reward if found helpful.

  • How to save Custom control records ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    REPORT  ZCUSTOMC.
    CLASS event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS: handle_f1 FOR EVENT f1 OF cl_gui_textedit
                 IMPORTING sender,
                 handle_f4 FOR EVENT f4 OF cl_gui_textedit
                 IMPORTING sender.
    ENDCLASS.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm.
    DATA: init,
          container TYPE REF TO cl_gui_custom_container,
          editor    TYPE REF TO cl_gui_textedit.
    DATA: event_tab TYPE cntl_simple_events,
          event     TYPE cntl_simple_event.
    DATA: line(256) TYPE c,
          text_tab LIKE STANDARD TABLE OF line,
          field LIKE line.
    DATA handle TYPE REF TO event_handler.
    START-OF-SELECTION.
      line = 'First line in TextEditControl'.
      APPEND line TO text_tab.
      line = '----
      APPEND line TO text_tab.
      line = '...'.
      APPEND line TO text_tab.
      CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      IF init is initial.
        init = 'X'.
        CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',
                       editor    EXPORTING parent = container,
                       handle.
        event-eventid = cl_gui_textedit=>event_f1.
        event-appl_event = ' '.                     "system event
        APPEND event TO event_tab.
        event-eventid = cl_gui_textedit=>event_f4.
        event-appl_event = 'X'.                     "application event
        APPEND event TO event_tab.
        CALL METHOD: editor->set_registered_events
                     EXPORTING events = event_tab.
        SET HANDLER handle->handle_f1
                    handle->handle_f4 FOR editor.
      ENDIF.
      CALL METHOD editor->set_text_as_stream EXPORTING text = text_tab.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'INSERT'.
          CALL METHOD editor->get_text_as_stream IMPORTING text = text_tab.
        WHEN 'F1'.
          MESSAGE i888(sabapdocu) WITH text-001.
        WHEN OTHERS.
          MESSAGE i888(sabapdocu) WITH text-002.
          CALL METHOD cl_gui_cfw=>dispatch.      "for application events
          MESSAGE i888(sabapdocu) WITH text-003.
      ENDCASE.
      SET SCREEN 100.
    ENDMODULE.
    CLASS event_handler IMPLEMENTATION.
      METHOD handle_f1.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-004.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>set_new_ok_code   "raise PAI for
             EXPORTING new_code = 'F1'.           "system events
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
      METHOD handle_f4.
        DATA row TYPE i.
        MESSAGE i888(sabapdocu) WITH text-005.
        CALL METHOD sender->get_selection_pos
             IMPORTING from_line = row.
        CALL METHOD sender->get_line_text
             EXPORTING line_number = row
             IMPORTING text = field.
        CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.
    ENDCLASS.
    aniruddh

  • How to save Custom control records module pool program ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi Subasha,
    Please check the format below since it is based on a working code
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
    For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
    ****************fill header..from SO10( t-code )
    GW_THEAD-TDNAME = loc_nam. " unique key for the text
    GW_THEAD-TDID = 'ST'. " Text ID
    GW_THEAD-TDSPRAS = SY-LANGU.
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
    *Read Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • How to use custom control in Dialog Programming?

    How can I call a subscreen using custom control in Dialog Programming?
    The required subscreen contains a calender. Any class or something available for this purpose. Please suggest.

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • How to have more that 50 charecteristics displayed in BEx Analyser

    Hi *,
    I have the Problem that I cannot open a Query in BEX Analyser (BI 7.0) because I have more than 50 characteristics.
    But our customer needs alle the fields...
    Did somebody know how I can solve this? Can I configure this value (50) somewhere?
    Thanks

    You can keep them under free characterstics and display them in BEx analyzer when there is a need.

  • How to create custom controls?

    I created some 3D automation symbols using AutoCad 2000, saved them in BMP, then open in Photoshop and imported into Labview using Ring but i didn't get what i wanted. I can't change colors and can't eliminate frame around the picture (ring). I read help but i didn't find so much help.
    Does anyone wont to explain in step by step how to do that.Which picture format is the best for that. I found at the discusion forum poor explanation with just one example. I know how to create control (simply import couple images into same Ring, but i need to do cosmetics.
    Any help i appreciate.
    Attached is .VI (labview 6.1)with valve i vanted to make as control, so please show me on that example how to do that.
    Attachments:
    Valve.vi ‏12 KB

    Just some tips here:
    1)First of all, if you want to create a custom control, it's better to work with LabView control files ("ctl" extension) rather than VI's. (Select a control you want to customize on the front panel, and choose "Customize control" from the "Edit" menu - you will be presented with a new special window where you have much more possibilities to change the appearance of your control. Two modes are available there - "edit" to set the data type of your control and "customize" (or personalise) - to change its appearance).
    2)I think that the problem you mention about - can't change colors and can't eliminate frame around the picture (ring)- is that near by all LV controls use two colors - foreground and background (toggled by F and B keys on the
    color selection panel) and by default you change only one of them for 3D borders. To elimate the frame you must make then both transparent.
    And here is your control - ctl file - a bit changed by me.
    Attachments:
    valve.ctl ‏11 KB

  • How to create custom control  in SE51

    Hi,
    Can any1 help me out to create a custom control in se51.
    Thanks in advance.

    *****Class variables*********
    DATA:
    GO_GRID type ref to cl_gui_alv_grid,
    go_custom_container type ref to cl_gui_custom_container.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZMENU'.
      PERFORM CREATE_OBJECTS.
      PERFORM DISP_DATA.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  CREATE_OBJECTS
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_OBJECTS .
      CREATE OBJECT GO_CUSTOM_CONTAINER
        EXPORTING
          CONTAINER_NAME              = 'CUST_CONTROL'.
      CREATE OBJECT GO_GRID
        EXPORTING
          I_PARENT          = GO_CUSTOM_CONTAINER.
    *&      Form  DISP_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM DISP_DATA .
    CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IS_LAYOUT            = LS_LVCLAYOUT
          IS_PRINT             = LS_PRINT
          IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
        CHANGING
          IT_OUTTAB            = <TEMP_TAB>
          IT_FIELDCATALOG      = LT_LVCFIELDCAT[]
          IT_SORT              = LVC_TSORT[].

  • How to  Get input from  User and Display it's Value

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Changed to Integer but still the problem persists.
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(int)br.read();
    Count++;
    b=(int)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

  • How to use custom label formats to display currency and percentage

    Hi There,
    I need a pie chart to display both currency and percentage. I have the cell format editor open for custom cell formats (from the pie chart label format menu) but am not sure how to write the expression.
    I've tried something like this but get an error:
    $ #,###  -  % #,###
    How can I display both currency and percentage for the same label?
    Any pointers in the right direction would be much appreciated.
    Cheers
    Ben

    labels built into Keynote can be displayed as percentage or value, not both
    The choice is made in:   Inspector > chart > series > data point settings
    the work around is to manually add text boxes with the currancy value entered in each box, as in $2.00

  • How to structure a control and its display in the same while loop and same display panel (instead of display panel and a seperate parameter-setting panel )

    As you can see, I need to adjust the Target position to certain value (like 1068.88), the actual position is showing 1066.99.  What kind of flow control structure will achive this goal?
    Notice the Labview example "Vibration analysis"  may shed some light on this issue.  Will someone give out a simpler code to show how it works?
    Attachments:
    Spectrometer Control V3.0.vi ‏113 KB

    lightblue,
    Just to make sure we are on the same page, you would like to set the position, then monitor it.  Is that correct?  In that case, you might have a few options.  You could have a sequence that would set the position, and then a while loop that would monitor the position, however this wouldn't allow you to update anything else.  The other option would be to use parallel while loops, which would be similar to the parallel sequence structure you have below.  The only issue with this would be that if you are calling the driver from both loops, you could run into errors.  The Vibration Analysis.vi takes the setpoint, then calculates the actual available position, so it won't serve as a very good example, code-wise. 
    Hope this helps!
    Andy F.
    National Instruments

  • How to have custom js functions?

    I have a javascript function defined in Javascript field and is called from a button onClick.
    It is working fine. This javascript function is used in few forms. So I created a new file customjs.js in the includes folder and removed the Javascript field. The onclick property of the button has the javascript and added a new HTML field to include the customjs.js but this does not work and gives Object doesnot exist as the javascript error.
    Then I moved this function to Standard.js (as this is loaded for all UserForms), but even here the same javascript error message is shown.
    1) Can you add custom js files inside the includes folder?
    2) How to we include them in the UserForms?
    Any ideas?
    Thanks,

    Hi,
    Were you able to call js function from a form?
    I am trying to call a js function and I did the same as mentioned in this post, added custom script in the includes folder and updated commonScripts.jsp with the custom script. Calling the js function from the form like this..
    <Property name='onClick' value='myprogress()'/>
    Is this the correct way to call a js function?
    Also I trying this from a Link, but strangely none of the javascript code is not evaluating at all. I tried a simple 'alert' but still that is also not working, can you please tell what I am missing? I tried using Button and the javascript code is evaluating correctly, I am not sure why it is not working with Link.
    Thanks in advance.

  • How to have a control on number of carriers in an OFDM TX Rx

    Hi,
    I'm relatively new to Labview. So please excuse my 'naive' questions. I've made a Baseband OFDM Tx/Rx using LV 2009 and Modn toolkit. The steps I've used are interleaving, channel coding, mapping bits to symbols and then IFFT (omitted the Cyclic Prefix part as of now). The receiver is designed in a similar manner.  I used 128 bit PN sequence initailly as the source. But now I've managed to convert a JPG into a bitstream for further modulation. I think my VI is making only one OFDM symbol and I'm presently having no control over the number of carriers used.
    I'm posting the VI over here. I would like help in a few things
    1.  How do I control the number of carriers say 128,256,512 or 1024?
    2.  Even if I achieve this simullation how  do I specify (and control) the carrier frequencies, guard band etc?
    I do not have any Hardware as of now. I'm just implementing baseband OFDM Tx and Rx in the same VI. Planning to go about making a Tx and Rx separately using PXIe chassis and 5641 IFRIO cards. Any leads would be highly appreciated!
    RVLV
    Attachments:
    TEST.zip ‏101 KB

    gary1234 wrote:
    Dear Cotton,
    I tried searching for a Java Script forum. Could not find it.Dear Gary,
    I question either your competence or the veracity of this claim. A Google search for JavaScript forum returns 19,000,000+ results.
    Please reply if you can help.
    Thanks for enlightening me that Java script is different than Java.This is the third time now you have been so enlightened.
    I am not sure how is it harming you if I post the Java script question here.Please don't be a wank. It is inappropiate for anyone, including you, to ask off topic questions on this, or any other forum. This forum is NOT for JavaScript questions and that is all there is to it.
    So now go to Google. Type JavaScript Forum into the search box and find yourself a JavaScript forum and ask your JavaScript question there.
    This isn't rocket science and your excuse as to why you haven't done so is at best flimsy but more likely just a lie.

Maybe you are looking for

  • My iPad 2 is no longer charging

    Since updating, my ipad does not work with the charger anymore.  I have restarted and reset it, and still no luck.

  • B2B batching fails for one failed message

    We have B2B batching implemented for outbound messages. If any one of the messages (to be batched in next cycle) ends in an error, whole Batch is stopped and no message is completed. Is there any set up we can do, so that other messages still get bat

  • Serial number LR 5.3 online?

    How to get a serial number for lightroom five online?

  • Photo size choices

    In an older version of HP Photosmart, you were able to choose how many wallet, 4X6, etc. sizes you wanted on one sheet of paper.(You checked a box of the sizes your wanted and how many of each. It then created the layout). The new version seems to on

  • Keynote crashes and reboots the laptop! How do you stop this??

    I am using Keynote 3.0.2 on a MacBook 2Ghz Intel Core Duo with 1GB RAM. I have a 200 slide presentation with some embedded video (about 200MB file). From time to time when I hit "Play" to start the presentation, Keynote crashes and the macBook reboot