Remove "column" form DojoX Grid 1.2 - dojo

is there any way to remove the red marked "select column" from an dojo grid?

This specific column is used to display the row selector to select rows. To disable that, just set the rowSelector property of the grid to false.
For example,
var grid = new dojox.grid.DataGrid({rowSelector:false}, node);

Related

Getting text from grid colum while doing horizontal scrolling

There is an angular grid and it has 25 columns. Now only 5 columns are visible on the page and to make other columns visible, I have to do horizontal scroll.
I want the text of all the column headers as grid keeps on scrolling horizontally across. any help from protractor experts?
This question has been asked many times but no solution yet.
Wrote below code but it is giving me the text of visible columns only.
var gridclass= $('.ui-grid-viewport');
var columnheader= $('.ui-grid-columns);
browser.executeScript("$(arguments[0]).scrollLeft(arguments[0].scrollLeft + 20)",gridclass.getWebElement());
columnheader.getText();
Expected: I should get the text of all the columns as grid keep on scrolling
Actual: I am getting the text of only visible columns on the page
Assuming .ui-grid-columns identifies the table row containing the all the column headers can you try using the inner text attribute like so
var columnheaders= $('.ui-grid-columns');
columnheaders.getAttribute('innerText')
Use getAttribute("textContent") instead of getText().
This issue could be due to DOM not render the whole page completely. You could try to set the resolution of browser bigger like 3840 x 2160, then getText() all column headers.

Table Viewer length Increases automatically under Section

I am newbie for the SWT and layouts. I have a Composite A inside that I have Section called "Table Contens" inside that i have another composite "Composite B" inside that I am using Table Viewer which uses TableColumnLayout.
All the composite and sections uses Grid layout and
GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
My problem is,First time the table will contains 5 rows, So the table size arranges accordingly.If i select another file it will be populated with 10 rows and comes with scrollable.
When i go to another tab and come back to this table viewer tab it refreshes the layout and the height of the viewer adjust for the 10 rows.
If I give height and width manually it is working GridData objectivesectiondata=new GridData(670,150);
But I want the table to resize based on the screen but i need to restrict the height of it.
I know i need to do something with the layout .But I dont know how to do it?
I am in need of this very much.Any Advice ?
THanks in advance
Specify the GridData heightHint value, something like:
GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, false);
gridData.heightHint = 150;

summary row for a grid in dojo

I Am looking for a Summary row or a Footer row for a grid where i can display total value of all column ,This footer row should not get scrolled(Virtically) .
Please Correct me if i am wrong .A Summary row for a Grid is not available in Dojo as a Default widget.
I Have achieved the above Summary row feature for Grid By
1) Adding a second grid only with Header Just below the Grid where you want footer row ,as a whole its look like a footer row to a Grid
Problems faced are
1) Column resizing i.e., when you resize any column in Grid 1 the same column in Grid 2(Grid with only Header ) must be resized
The above problem can be solved be capturing a resizing event in Grid 1 and propagating the event to Grid 2.
2) When you resize the column we will get Horizontal scroll Bar For both the Grids
Is there a way to propagate Horizontal scroll event from Grid 1 to Grid 2 so that when u scroll the Grid 1 then simultaneously Grid 2 has to get scrolled or how to get only one scroll for two Grids
Is there any other way to achive above feature for a grid .
I have achieved this by "stacking" the grids together. A primary data and footer grid. Use CSS to hide the heading of the footer grid. You have to use javascript to update the sums for the footer grid.
See demo and detailed reference
DoJo EnhancedGrid has a summary property that can be set, as described in the api documentation

Dojo 1.8 add new row

I am adding a new row to EnhancedGrid with IndirectSelection and FilterPlugin enabled. The code to add new row is:
grid.store.newItem({msConstId: response, msname: msName,description:description, msorder:msorder,eventType:eventTypeVal,eventTypeId:eventTypeId,isngrp:'N',eventAttribute:eventAttributeVal,eventAttributeId:eventAttribute});
grid.store.fetch();
This creates a new row but that is hidden and not visible and is present outside the border of grid. I had to use Firebug to verify that it has been created. This new row is not visible. I checked html code for a visible row with new row and there is no difference in code.
What could be the possible cause?
As you wish :)
grid.store.fetch() has no effect, call grid.render() - this will rerender the table markup with currently loaded store / itemset

dijit.form.Combobox show label Instead of value

I've a dijit.form.Combobox field which uses a ItemFileReadStore to pull Its data.
Teh ItemFileReadStore has two attribute per Item value which will be used for form submission , generally Unique Integers and label which is Human Understandable String.
In ComboBox HTML I've done searchAttr="value" labelAttr="label"
When the ComboBox Shows the list it uses teh label Attribute.
But When the User selects one of the Item it shows the value of that Item.
What I want is , The value Attribute will Still be used for Form Submission. But the User will always see the label in the combobox Control.
alt text http://img822.imageshack.us/img822/6660/dijitcombo.jpg
e.g. I Want to Show The Label for value 3 (Admin) instead of 3
Use FilteringSelect instead of Combobox.
Note: ComboBox only has a single value that matches what is displayed while FilteringSelect incorporates a hidden value that corresponds to the displayed value.
I have tried the following.
var cmbObject = Registry.byId('combo dojo id'); var id =
cmbObject.item.<Code Property>;
You should check if item is null.