Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
App Crash with IWDBGrid and bootstrap
#2
More on this. I have another form that I added a grid and all was fine until I added this jquery component in the grid and now this is bombing when rendering. More information since I have isolated what exactly is bombing now is I added a editbox control for the column in the GridRenderCell that has its CSS set to the jquery which initial renders 100% but each render after that causes the crash.

jquery init in form create:
JQueryStarReadOnlyGrid.OnReady.Text := '$(''.RatingGridReadOnly'').rating({''displayOnly'':true,''showClear'':false,''size'':''sm'',''step'':.1,';
JQueryStarReadOnlyGrid.OnReady.Text := JQueryStarReadOnlyGrid.OnReady.Text + '''starCaptions'':{0.5: ''.5 Star'',1: ''1 Star'',1.5: ''1.5 Star'',2: ''2 Stars'',2.5: ''2.5 Stars'',3: ''3 Stars'',3.5: ''3.5 Stars'',4: ''4 Stars'',4.5: ''4.5 Stars'',5: ''5 Stars''}})';

rendercell:
if (ARow > 0) and (AColumn = 1) and (not Assigned(ACell.Control)) then
begin
ACell.Control := TIWEdit.Create(Self);
with TIWEdit(ACell.Control) do
begin
Name := self.Name + 'RowSelector' + inttostr(ARow);
Tag := ARow;
Caption := 'Rating';
Text := UserSession.spRenderGrid.FieldByName('Star_Rating_Text').AsString;
css := 'RatingGridReadOnly';
end;
end;

The render has no jquery init so maybe that is the issue. that is the only difference between the create and render that I can think of. I comment out the css init though and there is still the crash. only when I comment out the whole code block so there is no control added dynamically does this start working. So perhaps the issue is in the addition of the control dynamically and nothing to do with the jquery or bootstrap. I am going to try to use a different controls or settings there without the jquery for now to see if I can see how things go.
Reply


Messages In This Thread
RE: App Crash with IWDBGrid and bootstrap - by bob9999 - 12-31-2018, 09:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)