Inserting Radio Button Data

I am not able to get <cfinsert> to work to insert into a remote DB2 database.  I have been able to get cfquery INSERT's to insert into the DB2 database.  I have not been able to get radio button data to INSERT into this database.
This is what I have tried:
surveyForm.cfm:
<html>
<head>
<title>Survey Form</title>
</head>
<body>
<h2>Enter a Survey Form</h2>
<cfform action="surveyAction.cfm" method="post">
Branch:
<cfinput type="text" name="BRANCH" size="4" maxlength="4"><br><br>
Contact Name:
<cfinput type="text" name="CONTACT_NAME" size="40" maxlength="40"><br><br>
Did you get what you needed today? &nbsp
<cfinput type="radio" name="NEED_FLAG" id="radio" value="Y">Yes
<cfinput type="radio" name="NEED_FLAG" id="radio" value="N">No
<cfinput type="radio" name="NEED_FLAG" id="radio" value="X">Did Not Answer<br><br>
<br><br>
<input type="Submit" value="Submit"> <input type="Reset"
value="Clear Form"></td>
</cfform>
</body>
</html>
surveyAction.cfm:
<html>
<head> <title>Insert Survey Form</title> </head>
<body>
<!--- This works until I add the radio button to the insert --->
<!--- Insert the new record --->
<cfquery datasource="AXMISC_SURVEY">
   INSERT INTO SURVEY.CAF_SURVEY
   (BRANCH, CONTACT_NAME, NEED_FLAG)
   VALUES
   ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.BRANCH#">,
  <cfqueryparam cfsqltype="cf_sql_char" value="#form.CONTACT_NAME#">
     <cfqueryparam cfsqltype="cf_sql_char" value="#form.NEED_FLAG#">
</cfquery>
</body>
</html>
Thanks,
Jeanne

zer0Weaver wrote:
<!--- This works until I add the radio button to the insert --->
<!--- Insert the new record --->
<cfquery datasource="AXMISC_SURVEY">
   INSERT INTO SURVEY.CAF_SURVEY
   (BRANCH, CONTACT_NAME, NEED_FLAG)
   VALUES
   ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#form.BRANCH#">,
  <cfqueryparam cfsqltype="cf_sql_char" value="#form.CONTACT_NAME#">
     <cfqueryparam cfsqltype="cf_sql_char" value="#form.NEED_FLAG#">
</cfquery>
</body>
</html>
Hi Jeanne,
Thanks for posting the relevant information, but you forgot to mention what _is_ happening  now ;-)  Does an error occur, and if so  what is the error message, etcetera.. ? But my guess would be you are missing a comma in the VALUES (...) clause:
VALUES
<cfqueryparam cfsqltype="cf_sql_varchar" value="#form.BRANCH#">      ,
<cfqueryparam cfsqltype="cf_sql_char" value="#form.CONTACT_NAME#">   ,  <!--- should be a comma here --->
<cfqueryparam cfsqltype="cf_sql_char" value="#form.NEED_FLAG#">

Similar Messages

  • Radio button data to php form

    I set up a survey, and I need the info from the radio button
    groups to send to a php form that will email me the results. So far
    I have not been able to get it to work. All I have so far is the
    code below attached to the submit button. I had a working contact
    form that I am trying to add radio buttons to, but they do not pass
    their info like the input text boxs do. I am a beginner with
    actionscript so I am having trouble finding where to get this to
    work. I have all my peramiters set on each radio button too. I just
    do not know what script to add to what I have so it will pass the
    data over to the php form.
    I have the survey as one MC which is inside a scroll pane if
    that matters. What I have so far can be seen here.
    http://ebinx.com/carrand/freestuffswf.swf
    Thanks

    bump

  • Inserting radio buttons in standard template of SRM EBP

    Hi All,
    We have modified the standard ITS service BBPSC01 template SAPLBBP_SC_UI_ITS  120 , to include two radio buttons as below:
    `if (gs_scr_itmovr_h-is_approver == "X")`
    <table>
    <tr>
    <td align="right" class="instruction">
    <label for="apprrej"><input type="radio" name="apprrej" on click="java script:setAp prDefault();" ><b>Approve</b></label>
    </td>
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 
    <td></td>
    <td align="left" class="instruction">
    <label for="apprrej"><input type="radio" name="apprrej" on click="javas cript:setReje ctDefault();" ><b>Reject</b></label>
    </td>
    </tr>
    </table>
    `end`
    When the screen is displayed initially both radio buttons are deselected .Thats fine but after we select any radio button and click any button on screen both the radio buttons are again deselected.
    How to keep the radio button selected after server event?
    Thanks,
    Anubhav
    Regards,
    Anubhav

    I think you have hit on a major conceptual issue that the
    whole software
    industry seems to be quite focussed on namely the
    designer/developer
    conundrum.
    Who knows?
    Maybe ther will be a solution of sorts soon?
    The Krisper wrote:
    > I am having an issue, as a newbie, figuring out how to
    insert forms or radio
    > buttons over top of an exported site design from
    Fireworks 8. I have created my
    > website entirely in Fireworks 8 and the site re-creates
    nicely in DW 8, but I
    > cant seem to just go ahead and insert anything overtop
    the image once its
    > imported into DW. I would love some help help with
    export options (as fireworks
    > sends a jumble of code when exporting html and slices)
    and some help with best
    > practices. I find it useful to create the site in
    Fireworks and any help would
    > be appreciated...
    >
    > Chris
    >

  • Retrieve radio button data from database

    Hello,
    I have a website developed using html, jsp and connected to an oracle database. I have a registration form namely registation.jsp where i have a set of radio buttons. Then I have a duplicate of that form namely registration_edit.jsp which I have named an edit one as all data which i have put on my registration will appear on the edit one where a person can edit his data. The problem is that only the radio buttons and checkboxes i am not able to retrieve their values from the registation.jsp to the registration_edit.jsp. Can u please give the codes for the radio buttons and check boxes? below i am copying some of the codes of my registration_edit.jsp for you to get an idea of what i want.
    Thank you and if u could plz give an urgent response as i need to submit my project.
    For radio buttons:
    <td valign="middle"><input name="biztype" checked="checked" type="radio" id="biztype3" onclick="checko();" value="corporate" />
                    <span class="TXT"> </span> Corporate/Limited</td>
                <td valign="middle"><input name="biztype" checked="checked" type="radio" id="radio2" onclick="checko();" value="partnership" />
      Partnership</td>
                <td valign="middle"><input name="biztype" checked="checked" type="radio" id="biztype1" onclick="checko();" value="other"/>
      Other
        <input name="biztypeo" type="text" disabled="disabled" id="biztypeo" value="<%=biztypeo%>" size="30" maxlength="20"/></td>For check boxes:
    <td width="273" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work1" type="checkbox" id="work1" value="Air conditioning installations" />
                  <font size="2">Air conditioning installations</font></font></td>
                <td width="252" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work2" type="checkbox" id="work2" value="Asphalt paving" />
                  <font size="2">Asphalt paving</font></font></td>
                <td width="277" valign="middle" class="style4"><font face="Verdana, Arial, Helvetica, sans-serif">
                  <input name="work3" type="checkbox" id="work3" value="Cable installation" />
                  <font size="2">Cable installation</font></font></td>Edited by: user4555860 on Jul 8, 2009 11:20 PM

    Mohammed Taj wrote:
    Superb. I never seen this of of urgent query :)
    Thanks
    Regards,
    TajMee too Taj :)
    @OP - It general Database topic. Please post your question unde correct topic to get an answer. Find the related topic from below link:
    http://forums.oracle.com/forums/main.jspa?categoryID=84
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]
    Edited by: Kamran Agayev A. on Jul 9, 2009 11:21 AM

  • How to insert radio button in application?

    Hi tecs,
    I want to insert the radio buttons in my form. But when i am writing
    <h:selectOneRadio id="fileBackup"                <f:selectItem itemValue="1" itemLabel="Installation"/>
    <f:selectItem itemValue="2" itemLabel="Folder/File" />     
    <f:selectItem value="#{backup.fileBackup}" />
    </h:selectOneRadio>
    i m getting error-
    javax.servlet.ServletException: javax.servlet.jsp.JspException: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
    plz tell me how to solve this ? it wud b really nice if some one can tell me the coding of jsp & corresponding bean.
    Thnx in advance.

    <h:selectOneRadio id="fileBackup" value="#{pc_formname.varname}"><f:selectItem itemValue="1" itemLabel="Installation"/>
    <f:selectItem itemValue="2" itemLabel="Folder/File" />
    <f:selectItem  itemvalue="#{backup.fileBackup}"  itemLabel="Folder/Filetemp" />
    </h:selectOneRadio>
    -- value binding expression should be of same type as itemvalue-- raju

  • Radio Button Data Binding

    Hi All,
    I am a vb beginner and I was wondering how you bind a radio button to a field in a database that has choice of 2 values. For example the field in my db is CoverType and the user should be able to select Hardcover or Paperback.
    Don't seem to be able to do get radio buttons to represent this on my form.
    Thanks very much 

    Hi Colin,
    I'm having the same trouble, and although I work in 'Classic' HTML & Vb this might be useful for you.
    I found that with Radio Buttons, you can bind each one in a group to the same DataSrc & DataFld.  Since all the Radios have the same Name and ID they switch between as usual, however, each radio has a different Value which is updated into the XML.
    <xml ID=ERRI>  
    <ROOT> 
    <RATE> 
    <RATE1></RATE1>  
    </RATE> 
    </ROOT> 
    </xml> 
    <Table DataSrc=#ERRI DataFld=RATE>  
    <tr><Td colspan=5><b>Rate This</b></td></tr> 
    <Tr><Td><Input DataSrc=#ERRI DataFld=RATE.RATE1 Value="1" Type=Radio id=Radio1 name=Radio1></Td><td>1</td></Tr>  
    <Tr><Td><Input DataSrc=#ERRI DataFld=RATE.RATE1 Value="2" Type=Radio id=Radio1 name=Radio1></Td><td>2</td></Tr>  
    <Tr><Td><Input DataSrc=#ERRI DataFld=RATE.RATE1 Value="3" Type=Radio id=Radio1 name=Radio1></Td><td>3</td></Tr>  
    <Tr><Td><Input DataSrc=#ERRI DataFld=RATE.RATE1 Value="4" Type=Radio id=Radio1 name=Radio1></Td><td>4</td></Tr>  
    </Table> 

  • Radio Button Data

    I'm putting together a form that I want to contain a group of
    radio buttons. When the form is submitted I want the selected radio
    button to have a value of 1 while all other buttons have a value of
    zero. I am only finding a selectedValue property which won't give
    me anything for the non-selected buttons (at least I don't think it
    will). Any suggestions on how to approach this?

    Hi,
    Please try using getRadioButtonAt function, numRadioButtons
    and selection properties of RadioButtonGroup together to solve the
    problem.
    Hope this helps.

  • Radio buttons and PHP

    I am having a problem getting radio button data into php and I can not seem to find any answers. My project is simple I have a group of radio buttons, when one is selected and a submit button is pressed I want the data from the radio button to populate the subject line of an email and send it. It sounds simple but I am having a lot of problems figuring it out and would appreciate any help I can get. I am good (not great) with flash, ok with PHP but for some reason this is taking a long time to fugure out. I can make a form work with input fields but not with radio button data.

    Use variables, not the text field var option from the Properties panel... not a reliable resource.  Give the textfield an instance name and use its text property to assign the value to a variable.
    I haven't dealt with AS2 to PHP much, but are you using the LoadVars class to manage getting the data to the PHP file?  I think the send() or sendAndLoad() methods are what you want to use.
    If you search Google using "AS2 LoadVars" you are likely to find a number of helpful tutorials, including those that focus on PHP being in the picture.

  • Disabling fields on the basis of radio button selected

    Hi experts,
    I have a requirement where in i have a dialogue screen which has radio buttons and few other input fields.
    when i check a radio button on the screen i have to get an input field greyed out on the same screen immediately.
    i have grouped the input fields to be greyed out as GR1.
    i used the following code in the PBO of the screen which is not working,
    if  oradio eq 'X'.
          loop at screen.
            if screen-name = 'S_CREATE'.
              screen-group1 = 'GR1'.
              screen-input   = 0.
            endif.
            modify screen.
          endloop.
    endif.
    please give some input.

    Hi
    *Hello Just do the Following.*
    *" I think you are missing the below Grouping Part otherwise your code looks ok*
    *go to EDIT -->Grouping--> Radio Button Group --> Define " before this select all the Radio Buttons.*
    *all the radio button names should be r1, r2, r3 etc as declared above " Make their names same whatever you give.*
    *" Assign a Function Code for them So that automatic PAI/PBO will Take Place once you select a radio Button*
    In TOP include/ Global area declare no of radio buttons.
    data : r1, r2, r3. etc " Default they take char with one length.
    if you are in Dialog program
    " I think you are missing the below Grouping Part otherwise your code looks ok
    go to EDIT -->Grouping--> Radio Button Group --> Define " before this select all the Radio Buttons.
    all the radio button names should be r1, r2, r3 etc as declared above " Make their names same whatever you give.
    " Assign a Function Code for them So that automatic PAI/PBO will Take Place once you select a radio Button
    in PBO
    module modify_screen.
    Now in Program
    Module modify_screen.
    if r1 = 'X'.
    loop at screen.
    if screen-group1 = 'GRP'.
    screen-input = 0 " or 1.
    modify screen.
    else" implement for other Radio buttons
    endloop.
    endmodule.
    Cheerz
    Ram

  • Radio Bullet Data  Doesn't Export

    I am having trouble getting the radio bullet the user selects to export to my spreadsheet.
    One is Vacation and the other is PersonalLeave. I named the subfolder EmployeeInfo
    Any idea why the selection does not export. I did click the "Specify Item Values" and named them because I am using a script below to populate a drop down based on which bullet they select.
    Form1.PayInfo.HoursPaid::preOpen - (JavaScript, client)
    this.rawValue == null;
    this.clearItems();
    if(EmployeeInfo.VacationOrPersonalLeave.PersonalLeave.rawValue == "Personal Leave")
    this.addItem("4 Hours", "4");
    this.addItem("8 Hours", "8");
    if(EmployeeInfo.VacationOrPersonalLeave.rawValue == "Vacation")
    this.addItem("4 Hours", "4");
    this.addItem("8 Hours", "8");
    this.addItem("5 Hours", "5");
    this.addItem("10 Hours", "10");

    I am still having the same trouble. The objects function the way I intended but the radio button data still will not export. I must be doing something fundamentally wrong but I can't see what it is. The link below is to a example of what is happening:
    https://acrobat.com/#d=QnUfZGas4GTX9LfmIPuEAQ
    Thanks for your help with this...
    ~Don

  • Size of radio buttons

    Hello:
    I have Adobe Acrobat 9 Standard (9.3.1), and I use the form tool to insert radio buttons (and other fields). While I am able to do most of the things I need to do, I cannot figure out (I have read Help) how to change the size of the radion buttons (or other fields; I can change the text size in text fields, though). The radio buttons are oversized. I assume there must be away to change their sizes. Would appreciate help on this issue.
    Regards,
    Hans L

    I figured it out. I just realized that I had seen the size-change pattern around teh fields when I moved the cursor on top of the field.
    Best regards,
    Hans L

  • Want excute the program accourding to the radio buttons

    hello,
    i am writing an extraction program. here i want to get the out put file in diffrent formats based on the selection on myselection screen.
    if
    I seclect the radio button "EXCEL" the output should be excel file.
    else
    if
    I select the  radio button  "DAT"  the output should be DAT file.
    Thanks,
    vineetha.

    Hi Vineetha,
    Check this program..
    PARAMETERS:p_vbeln LIKE vbrp-vbeln.
    Parameters:EXCEL  radiobutton group GP1.
    Parameters:TEXT  radiobutton group GP1.
    DATA:BEGIN OF it_vbrp OCCURS 0,
         vbeln LIKE vbrp-vbeln,
         posnr LIKE vbrp-posnr,
         meins LIKE vbrp-meins,
         ntgew LIKE vbrp-ntgew,
         END OF it_vbrp.
    START-OF-SELECTION.
         SELECT vbeln
           posnr
           meins
           ntgew FROM vbrp INTO TABLE it_vbrp where vbeln eq p_vbeln.
    if EXCEL = 'X'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME  ='C:\Documents and Settings\Vishnu.Chintala\reddy.xls'
      TABLES
        DATA_TAB                      = IT_VBRP
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Endif.
    If TEXT = 'X'.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME  ='C:\Documents and Settings\Vishnu.Chintala\reddy2.TXT'
      TABLES
        DATA_TAB                      = IT_VBRP
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endif.

  • Insert String array as label content in datagrid row through radio button C# wpf?

    I have written some code for inserting label at runtime having its content set to a string array and then insert that label into a datagrid row . All of this will initiate when certain radiobuttons are checked. code is working perfectly fine. But i need
    to improve this code as i am learning C#, wpf and datagrid. I know there can be a certain way to improve this code. 
    This code will be a nightmare when there are 50 radiobuttons. 
    can it be improve and how it can be? if u can explain that will be very kind of you  
    Xaml Code:
    <Grid>
    <RadioButton x:Name="rb_1" Content="RadioButton" HorizontalAlignment="Left" Margin="351,85,0,0" VerticalAlignment="Top" GroupName="1" />
    <RadioButton x:Name="rb_2" Content="RadioButton" HorizontalAlignment="Left" Margin="351,105,0,0" VerticalAlignment="Top" GroupName="1"/>
    <RadioButton x:Name="rb_3" Content="RadioButton" HorizontalAlignment="Left" Margin="351,120,0,0" VerticalAlignment="Top" GroupName="1" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,159,0,0" VerticalAlignment="Top" GroupName="2" />
    <RadioButton x:Name="rb_4" Content="RadioButton" HorizontalAlignment="Left" Margin="351,179,0,0" VerticalAlignment="Top" GroupName="2"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,199,0,0" VerticalAlignment="Top" GroupName="2" />
    <Button Content="Button" HorizontalAlignment="Left" Margin="713,60,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/>
    <DataGrid x:Name="datagrid_" HorizontalAlignment="Left" Margin="549,85,0,0" VerticalAlignment="Top" Height="253" Width="399" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,226,0,0" VerticalAlignment="Top" GroupName="3" />
    <RadioButton x:Name="rb_6" Content="RadioButton" HorizontalAlignment="Left" Margin="351,246,0,0" VerticalAlignment="Top" GroupName="3"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,266,0,0" VerticalAlignment="Top" GroupName="3" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,298,0,0" VerticalAlignment="Top" GroupName="4" />
    <RadioButton x:Name="rb_8" Content="RadioButton" HorizontalAlignment="Left" Margin="351,318,0,0" VerticalAlignment="Top" GroupName="4"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,338,0,0" VerticalAlignment="Top" GroupName="4" />
    </Grid>
    Code Behind:
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    DataTable dt;
    DataRow dr;
    string[] str = new string[4];
    int location = 0;
    int count = 0;
    private void Window_Loaded(object sender, RoutedEventArgs e)
    dt = new DataTable("emp");
    DataColumn dc1 = new DataColumn("Factors", typeof(string));
    DataColumn dc2 = new DataColumn("Non_Compliant", typeof(string));
    dt.Columns.Add(dc1);
    dt.Columns.Add(dc2);
    datagrid_.ItemsSource = dt.DefaultView;
    private void Button_Click_2(object sender, RoutedEventArgs e)
    if (count >= 1)
    datagrid_.ItemsSource = dt.DefaultView;
    dt.Clear();
    str[0] = "Load Path1";
    str[1] = "Load Path2";
    str[2] = "Load Path3";
    str[3] = "Load Path4";
    int j = 0;
    if (rb_2.IsChecked == true)
    j = 0;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_4.IsChecked == true)
    j = 1;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_6.IsChecked == true)
    j = 2;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_8.IsChecked == true)
    j = 3;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    count++;

    @Usamakhan1990,
    Use usercontrol with label and checkbox is reasonable for a datagrid control if you don't want to have too much code for those radio buttons. So I agree with andy here with that usercontrol.
    So is it required that your radiobutton should be outside the datagrid?
    Anyway, I think you already know that you can bind data to columns yourself. So please check the following thread:
    http://stackoverflow.com/questions/22922533/how-do-i-automagically-bind-a-string-array-to-a-wpf-datagrid
    <DataGrid Name="_dataGrid" Grid.Row="0" AutoGenerateColumns="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column 1" Binding="{Binding [0]}"/>
    <DataGridTextColumn Header="Column 2" Binding="{Binding [1]}"/>
    </DataGrid.Columns>
    </DataGrid>
    Or define the columns from code, in case you have dynamic number of columns, for example :
    string[][] array = fs.CSVToStringArray();
    for (int i = 0; i < array[0].Length; i++)
    var col = new DataGridTextColumn();
    col.Header = "Column " + i;
    col.Binding = new Binding(string.Format("[{0}]", i));
    _dataGrid.Columns.Add(col);
    this.ExternalData._dataGrid.ItemsSource = array;
    And for Radio button part, please see here:
    http://stackoverflow.com/questions/397556/how-to-bind-radiobuttons-to-an-enum
    Best regards,
    Barry
    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.

  • ALV report to display data based upon radio button.

    i am new to abap, I have a requirement its like there are three radio buttons , r1 r2 r3  If i click r1 datas of r1 should display
    if i click r2 datas of r1 and r2 should display if i click r3 datas of r1 r2 and r3 should display , its ALV report. Please give me solution.

    Hi
    You can use by having the radio buttons in the same group. For ex i'm stating if want to have r radio buttons for change, display and create and you select it with a push button you can code it as ..
    //////SAMPLE CODE
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: SRCE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: VARIN RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: ATTR RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-006.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: DOCU RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-007.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: TXELE RADIOBUTTON GROUP ELE.
    SELECTION-SCREEN COMMENT 3(15) TEXT-008.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(15)  TEXT-009 USER-COMMAND DISPL.
    SELECTION-SCREEN PUSHBUTTON 18(15) TEXT-010 USER-COMMAND CHNGE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BLOCK1.
    *PARAMETERS : XXX LIKE T100A-ARBGB MATCHCODE OBJECT YCL_T100A.
    AT SELECTION-SCREEN.
    CASE SY-UCOMM.
    WHEN 'CREAT'.
      MESSAGE I000(YCL_MC01) WITH 'Create'. // or insert your alv code here
    WHEN 'DISPL'.
      MESSAGE I000(YCL_MC01) WITH 'Display'. // or insert your alv code here
    WHEN 'CHNGE'.
      MESSAGE I000(YCL_MC01) WITH 'Change'. // or insert your alv code here
    ENDCASE.
    //////SAMPLE CODE
    In same you can code it.
    Hope this is useful to you.
    Regards
    Vinodh

  • How can I select a radio button in a table regarding the data in the cells?

    Hi everyone
    This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
    This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
    Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
    So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
    Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
    Could you please help me with this problem?? I'm Kind of frustrated with this issue jejeje

    Here is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
    Private Sub RSWVBAPage_afterPlay()
    Dim tbl As HTMLTable
    Dim tblRow As HTMLTableRow
    Dim tblCell As HTMLTableCell
    Dim strValue As String
    Dim rButton As HTMLInputElement
    ' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
    strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
    ' Strip out the ; for inner text comparison
    strValue = Replace(strValue, ";", "")
    ' This will get the table but can be modifoed to be more specific
    Set tbl = RSWApp.om.FindElement(, "TABLE")
    ' This loops through all the rows in the table until a match to the strValue is found
    ' then clicks the radio button. Findelements allows you to specify a root element
    ' once the correct root row is found, FindElemets can get the correct radio button
    For Each tblRow In tbl.rows
      If tblRow.innerText = strValue Then
        Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
         rButton.click
       End If
    Next
    End Sub
    I also uploaded the script I created. You should be able to run it and see how it works.
    This should get you going.

Maybe you are looking for

  • Purpose of having a block in the BPM

    whats the purpose of having a block in the BPM, and what does its attributes BLOCK-Start and BLOCK-end with values "new  transaction"/"no new transaction" means

  • Error in Back date delivery

    Hi All, I want to create one Order in Back date with back date delivery(Picking + PGI) and Billing, i m able to create the Order& Billing  in Back date but when i enter the back delivery date in sales order it will create current date's schedule line

  • Mupen64plus on intel w/ dri2 and kms

    well i can't play any games into mupen and i'm really out of clues, the only thing i'm getting from running in console is the following output http://paste-it.net/public/je2cbc9/ so if anyone could help me i would then be happily playing btw i use a

  • 7.1 NWDS

    Hi All, I installed netweaver 7.1 sneak preview successfully. To deploy the application i have to give the server name(LocalHost and Port) in the preferences but i am unable to find out the location. Can any one guide me to configure the server in pr

  • How to switch from fusion to bootcamp?

    Macbook Pro 15" (late 2008) 2.53 GHz, 320 MB, 8 GB RAM running 10.6.8 Hello, I currently use VMware Fusion 3 to run AutoCAD, 3DS Max Design, and Rhino.  The 3DS Max Design is a new addition, and I have found that the resources available with this con