Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 21 23:15
    stale[bot] closed #6989
  • Aug 21 23:15
    stale[bot] commented #6989
  • Aug 21 09:26
    tolgato commented #6990
  • Aug 20 20:47
    stale[bot] closed #6987
  • Aug 20 20:47
    stale[bot] commented #6987
  • Aug 20 17:47
    stale[bot] labeled #7000
  • Aug 20 17:47
    stale[bot] commented #7000
  • Aug 20 06:03
    Radhika-SuriyaPrakash commented #3643
  • Aug 20 02:51
    wuzhenda commented #6990
  • Aug 19 09:46
    pranavbhagwat81 edited #7019
  • Aug 19 09:46
    pranavbhagwat81 edited #7019
  • Aug 19 09:46
    pranavbhagwat81 edited #7019
  • Aug 19 09:46
    pranavbhagwat81 edited #7019
  • Aug 19 09:46
    pranavbhagwat81 edited #7019
  • Aug 19 09:45
    pranavbhagwat81 opened #7019
  • Aug 19 09:23
    stale[bot] unlabeled #6990
  • Aug 19 09:23
    tolgato commented #6990
  • Aug 19 09:23
    tolgato commented #6983
  • Aug 16 20:39
    sneilan-merieux commented #4011
  • Aug 15 21:05
    mikeymco edited #7018
Yosi
@yosiasz
@mrpackethead that is pretty much how ui-grid displays data. Look at any of the examples in http://ui-grid.info/docs/#!/tutorial/Tutorial:%20106%20Binding%20examples
Jeff Grossman
@jeffgrossman3000
@greatPHPer Not sure I understand your context but in my app there are three sets of columns in the grid and I platoon them at different times using, e.g.:$scope.gridOptionsMon.columnDefs[3].visible = true;
Andrew
@mrpackethead
@yosiasz , the example i found, had some 'static' json embedded in the .js
@yosiasz , the example there has static json as well
Yosi
@yosiasz
@mrpackethead so in your controller that fetches the data from an api, you provide the data being returned from your api to the grid's data property.
Andrew
@mrpackethead
@yosiasz , i need an example.
Yosi
@yosiasz
@mrpackethead we need sample of your current code of api and controller
TANVIR AHMED KHAN
@khancom
hey whats up
I want to dig the angular with my axe
How should I do that
Yosi
@yosiasz
@khancom Not sure I understand your question. What do you need to do?
Arslan Nawaz
@arsinawaz
Hi anyone there?
I have been facing and issue with UI GRID, the focus looses when the row being edited is refreshed with new data. I have tried to fix the situation but no luck
Anyone have any idea or point to into the right direction to fix that issue..
Jeff Grossman
@jeffgrossman3000
@arsinawaz May we see it?
Arslan Nawaz
@arsinawaz
@jeffgrossman3000 I have another query, if you can help me with that? I want to bind a keydown event to the textbox when in edit mode. The use case is that on press of f8 key i wast to duplicate the contents of the cell above and put it in the focused cell which is already in edit mode :) Any idea how to achieve that?
I know that there is a viewportkeydown event but that only fires when the cell is focused and not when the cell is in editmode meaning when the textbox is being shown
I'm following this example to use the custom edit cell template in order bind the keydown event but there is another issue, which is the afterCellEdit doesn't give changed values when editing. Its always showing the oldValue and newValue as same even though i change it in the textbox.
http://plnkr.co/edit/tredgZBT3Y8qUtCt71YJ?p=preview
I'm not sure what i'm doing wrong
Jeff Grossman
@jeffgrossman3000
@arsinawaz In your plunkr, if I edit+ENTER then it ignores me but if I edit+BLUR (...click on something else...) then the change keeps.
@arsinawaz I think the issue is that you need to respond to the cell editor events, not provide a new template. I didn't have time yesterday to finish nosing around.
Ilya Shamsudinov
@ilyasham
How is angular better than React?
Yosi
@yosiasz
@ilyasham wrong chat room. but read this -> https://programmingwithmosh.com/react/react-vs-angular/
Jeff Grossman
@jeffgrossman
@arsinawaz OK, had some time to look around. Your second report, about afterCellEdit, is wrong: it does give new and old values, respectively -- if the value changed. So, if you exit onBlur then the console shows the right output, if you exit by ENTER then the console shows the right output but you can't tell.
@arsinawaz Back to your main question. I did not find a way to do it. You would have to enable detection of fkeys in a plain-old text control and I'm not sure how you'd do that other than by processing every keystroke yourself (which is probably not a good idea). So, can we change the requirement? For example, if the edit has not begun -- merely focus is on the right cell -- then the keyDownOverrides feature works.
Jeff Grossman
@jeffgrossman
@arsinawaz A thought: if you don't need F8 for anything else, can you capture it (perhaps with ng-keypress?), determine if you're in mid-edit of a cell, and copy data into it?
suresh
@SureshNegi
hi
anyone there
Yosi
@yosiasz
@SureshNegi what is your question
Howard Taylor
@howzilla_gitlab
I have one page that will show either an accordion or a grid. The user can switch between the two views of the same data, ui-grid is the initial view. First time through the grid sorting works fine. If the user clicks the radio button to switch to the accordion then switches back to the grid the sorting functionality is lost. Initially when the grid is fully working every time a column heading is clicked to sort there is a postback. After the sorting hoses there is no postback when clicking a column header. The page is not dead because I can set criteria on the page and fetch new data but still the sorting will not work. I am using v3.1.1 but I upgraded to 4.7.1 and it still does it. My call to initialize the grid has nothing about sorting except on the colDefs such as { field: 'MyFieldName', displayName: 'Header Display name', width: '50', cellFilter: "dateMoment :'MM/D/YY HH:mm'", sort: { priority: 1 }}. Is there something else I should be doing to "assist" with the sorting? Thanks.
Jeff Grossman
@jeffgrossman3000
@howzilla_gitlab Are you doing anything more than hiding/revealing the div that the grid is in?
Chris Stephens
@cstephe
@howzilla_gitlab as @jeffgrossman3000 is alluding to. I remember having an issue similar when I was loading the grids via tabs. you needed to call something like gridApi.grid.refresh(true); perhaps it was another gridAPi call but I remember once I knew it was related to creating the grid after wiring had occurred I was able to find the right solution. But I'm a bit fuzzy.
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 - one odd thing is the arrow on the column header that indicates the direction of sorting is toggling up then down but there is no postback activity
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 I have $scope.$watch('ViewChoiceValue', function (value) { ... << that is a radio button with the two choices. From there I set a var: vmPar.showAccordion that is used to toggle the visiblity of the two: <div ng-controller="loadStatusGridController as vm" ng-show="!vmPar.showAccordion">. Once that is accomplished Imake a boradcast call to the correct controller: $scope.$broadcast('CallRequestData', { });
Jeff Grossman
@jeffgrossman3000
@howzilla_gitlab I have never hidden a grid. Reading around, the official screed (and ideas about what to do) is here: http://ui-grid.info/docs/#!/tutorial/Tutorial:%20108%20Hidden%20Grids
@howzilla_gitlab There appear to be several kinds of calls to 'awaken' the grid after it has quiesced (due to no rendering).
@howzilla_gitlab And, yes, F5 is a browser key; you have to catch it.
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 - if I try to go past Angular 1.6.x I will have problems. This is an old system that uses the ".then" syntax. The entire framework would crap out due to that syntax.
Jeff Grossman
@jeffgrossman3000
@howzilla_gitlab Fair enough. Then, when the radio button clicks back, can you do gridApi.refresh() or the internal call $scope.gridOptions.$gridServices.DomUtilityService.RebuildGrid($scope.gridOptions.$gridScope, $scope.gridOptions.ngGrid); ? Another thing to try is to add 'ui-grid-auto-resize' to the grid's dom element.
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 - I just put a sample grid from the link you sent me on Hidden grids onto the page along with my grid. I load it the same way the sample does from a json file. Both grids load up and sort. I switch to the accordion view then back and my grid won't sort but the sample grid does. The only difference I can tell is my grid is a Directive. Sorry I neglected to mention that earlier. Does that tell you anything? Thanks for helping.
Jeff Grossman
@jeffgrossman3000
@howzilla_gitlab It does not, sorry. But it is ve-r-r-y interesting that an OOB grid works and yours doesn't. That makes me suspicious of your code. Can you try stripping away and simplifying until it starts working again? (I presume I don't have the environment to run it but I can try eyeballing it.)
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 - I think the problem is the code that syncs the filtering for the two views - grid vs accordion. I am getting it narrowed down.
Howard Taylor
@howzilla_gitlab
@jeffgrossman3000 - the grid is now sorting but the issue I am having is one of $scope. I sync the two views using a common searchCriteria var. That var is used to set $scope.filter where it is used in a different call in a different file to fetch data. I am setting the $scope.filter but when I get to the call to fetch the data it has the PREVIOUS $scope.filter criteria. If I hit all the same code again it then has the correct $scope.filter criteria. For some odd reason $scope.filter is not "really" accepting the change the first time.
voldemortt
@voldemortt
Hi
Does this support Angular 8 ?
Yosi
@yosiasz
@voldemortt No => http://ui-grid.info/
pranavbhagwat92
@pranavbhagwat92
Hello Guys, HandsOnTable has the feature of cell types.
in which we can mention datatypes to individual cells.
Is this feature available in UI-Grid. Or can we implement it using api's. Need leads guys...
@SweetJimmy_gitlab did you get the answer to your question. I am also looking for it. Please reply.
Jeff Grossman
@jeffgrossman
@pranavbhagwat92 I think there is no way to declare the datatype of an individual cell. You can provide a cell editor for a column so perhaps you can enforce your type-specific rules in there.
Yosi
@yosiasz
Hello, when my grid has multi select and filter enabled on a column, if user selects more than one record I want to disable filter, or disable multi select when in filter mode. When setting vm.gridVirtualmachines.enableFiltering = true; dynamically, it does nothing. Is there a way to do this dynamically? Thanks