I have grid that have Country and State column. This grid data add using combo box. After add data i want to fully disable combo box in the grid
This my code for disable combo box
gridRegionsRoweditor.on('beforeedit', function(roweditor, rowIndex){
var record = this.gridRegions.store.getAt(rowIndex);
if(typeof record.data.ROWDATE != 'undefined'){
grdcmbCountry.setDisabled(true);
grdcmbState.setDisabled(true);
return false;
}else{
grdcmbCountry.setDisabled(false);
grdcmbState.setDisabled(false);
}
},this);
Above solution not perfect to me. when i double click on the one of the combo box that view unclear combo box. How can avoided this unclear combo box form the grid?(when i disable combo box that want to look like label). Is that possible to remove double click event in the these cell for my problem?
use this function and check
setDisabled(true/false);
or else check this link
for disable combo in extjs use
grdcmbState.setDisabled(true);
above code work for me
Related
In my application I have lot of combo boxes available. I need to click an arrow button which is on combo box. I am using Selenium IDE. When I record the clicking of the arrow button from combo box it will work at that time, but when I come back to same page it will display that the element is not found.
Thank you in advance.
I recommend you to understand first, how values are coming into your combo boxes. I think when you clicked on combo box, AJAX call will be fired and values will be loaded into your combo boxes.
You can use the command "waitForElementPresent" or "waitForTextPresent" when clicked on combo box.
Do not click on combo box button while recording.......
Do right click on button and get element by ID
I have a grid and when I click on a button in the toolbar of the panel I want to check if a row in the grid is selected.
If true I need de value of one cell of that row, so I can put it behind a url.
But I have no idea how I can use the selection model to get the cell value of a selected row in EXT JS 4.
Perhaps try something like:
grid.getSelectionModel().getSelection()
This will return an array of all selected records withing the grid.
Then, you can iterate over the selection, find your row and call row.get('PropName') to get the value.
Hope this helps.
You're approaching the issue backwards though. You want to register for the 'selectionchange' event from the grid.
thisController.control ({'#mygrid':
{
selectionchange:onSelectionChange}
});
function:onSelectionChange(model, selected, eOpts )
{
//do work here
}
So basically you want to create an event driven model.
How do I include a combo box option in a property grid at run time using code.
Create a UITypeEditor. It's GetEditStyle() override should return UITypeEditorEditStyle.DropDown
is it possible to change a combo box to text box using vba?
As an addition to the suggestion about hiding the text box I have seen people use a text box to cover all but the dropdown arrow of the combo box (text box set to be on top of course) and then updated the text box on the after update event of the combo box
I forget why they did it that way in the end but it worked and IMHO is better than hiding the combo box as you might have issues with it still having focus
As far as I know there are two methods. If the form is in design mode then running;
Application.RunCommand acCmdChangeToTextBox
while the combobox is in focus will make it turn into a textbox.
However you cannot do this at runtime. Say you want to show a textbox after selecting a value from the combobox, on the Change event of the combobox you just hide it and show a textbox that was previously hidden. Use the visible property of the combobox and the textbox for this.
I have a silverlight datagrid with a single editable column. This column has a combo box. To open the combo i have to click on the cell three times. Once to select the row, once to enter edit mode, and once to open the combo.
alt text http://lh4.ggpht.com/_L9TmtwXFtew/Sw6YursbUmI/AAAAAAAAGlg/QJCLu0K7o_8/image_thumb%5B6%5D.png
IMHO this is really bad UX so I would like the row to enter edit mode when the user does a row click or mouse over and allow the combo to be opened when with a single click.
The row would then drop out of edit mode if the user does a mouse off the row.
Is this possible?
What is the best way to approach this?
Thanks,
Mark
Simple way: handle DataGrid_MouseLeftButtonUp and make your desired behavior.
void MyDataGrid_MouseLeftButtonUp(sender , e)
{
if (MyDataGrid.SelectedItem != null) //ensure we have current item
{
//set current column
MyDataGrid.CurrentColumn = MyDataGrid.Columns[4];
//call begin edit
MyDataGrid.BeginEdit();
//now open combobox
MyComboBox.IsDropDownOpen = true; // a.)
}
}
I hope you catch the ideea.
a) * here I'm not sure if 100% working.
(and, of course, you need a reference to MyComboBox (ComboBox control defined in column template)*
Good luck
rlodina
setting datagrid.selectedIndex will fix the issue