Change Display Value in Radio Button Column - radio-button

I have a radio button in datawindow and I want to change the display value using codes depending on command button I'll click. Is it possible? What function I can use? Thanks in advance.

Here is some code:
string ls
dw_1.insertrow(0)
dw_1.setredraw(FALSE)
// get the current values
ls = dw_1.describe("blue_1.values")
//ls is 'Red~tR/Blue~tB/Orange~tO'
// change the values
ls = dw_1.modify("blue_1.values = 'Green~tG/Teal~tT/Brown~tB'")
dw_1.setredraw(TRUE)
The radiobutton column in this example is "blue_1".

Related

How to get a post value in VB.Net

I need help with getting a Value posted from a form in VB.Net.
At the moment there is a form on a php website that is posting 2 values through to me.
name=Max
email=test"test.com
If i was using php i would use :
$name = $_POST['name'];
$email = $_POST['email'];
Now the above fields are now captured within a variable.
How do i do the the same thing in VB.NET
I cannot tell if you are referring to Web text box's or PHP forms but I can help you with Web text box's..
Your question is unclear, but I will try my best.
Assuming you want to get a textbox's value into a variable. You would do like so:
Example Textbox:
<asp:TextBox ID="ExampleTxtBox" runat="server" AutoPostBack="True"></asp:TextBox>
If you want to assign the values on a certain command, for example, a button click. You would put this into the button click handles of the button.
Assuming you want to get the current text/value from the form's text box:
Dim VariableOfTextBox As String 'Creates your Variable
VariableOfTextBox = ExampleTxtBox.text 'Assigns the Value from your Text Box

Set value of checkbox to false

I need to set the value of a checkbox to false where the value of textbox1 is equal to item# in the table I have the checkbox in. I need to do this via a command button click. What is the simplest way to accomplish this?
You can put this code in your userform's CommandButton1_click() event and it should work.
If TextBoxName.Value = "Value of item you are comparing to" Then
CheckBoxName.Value = False
End If
You need to change certain things in this code like adding the name of the text box, name of the check box, and entering the value of the item you want to compare it to.

Setting a Datagrid Column to read only during run time

I have a datagrid, not a datagridview, where I wan to make a column read only if radio button is checked or not.
So I define the column dynamically from a sql query:
Dim bool_col As New FormattableBoolColumn
bool_col.HeaderText = "Bool Colunm"
bool_col.MappingName = "bool_col"
Also on the form are two radio buttons, lets call them A and B.
When A is checked I want to set the bool_col to read only is true.
When B is checked I want to set the bool_col to read only is false.
Let me know if anything else is needed. I'm using the Click event but I can't figure out how to find the column in the Datagrid and set it to read only. Spent all afternoon trying to do that and searched everything I can think of with no luck.
And I can't change it to a datagridview unfortunately. Time and and money constraints on the project prohibit this.
Thanks in advance!
When you create the column you can add a check:
bool_col.ReadOnly = RadioButtonA.Checked
So the read only property of the column will be true if A is checked and false if A is not.
Now this assumes that your radio buttons are in a group so only one of the two can be checked at a time.
If the radio buttons are not in a group then use:
If RadioButtonA.Checked Then
bool_col.ReadOnly = true
else if RadioButtonB.Checked Then
bool_col.ReadOnly = false
End If

using combobox value

Thanks S. Lott for your prompt reply.
My question was about this link in my first post:
Python GTK adding signal to a combo box
I want to reuse the changed value of the combo in the main window GUI
Is it possible this way, and how ?
Thanks for some explanations
Best regards
If you are using a ComboBox with your own custom model, you can always get data for selected item:
index = combo.get_active()
model = combo.get_model()
item = model[index]
print item[0] ## , item[1], ...
But if you are using a text combobox (created with gtk.combo_box_new_text()), that's easier to use:
item_text = combo.get_active_text()
print item_text

Is it possible to Enter editmode to a list box in Grid without double click on the cell?

I was following the example in the following link to try out listbox in the grid
http://forums.silverlight.net/forums/t/53435.aspx
it works except that, I need to double click on the cell to enter to edit mode which then switch to listbox. Is there any other way I can enable list box on getting focus?
Thanks,
The is a very simple way to enter a cell in edit mode without using your mouse. First, you need to get the row in which you have the cell. Then you get the cell, then you change the edit mode to True. If you don't have the row, you can find it by using ItemContainerGenerator on the grid with the business object used in that row (from your ItemSource collection). Here is an example of code :
GridViewRow myRow = MyGrid.ItemContainerGenerator.ContainerFromItem(YourBusinessObject);
GridViewCell myCell = myRow.Cells(YourCellIndex);
myCell.IsInEditMode = True;
Hope this help !