Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
Reading value of cells in a grid |
Sat, Jan 30 2021 11:32 AM | Permanent Link |
Ronald | Hi,
I have a TGrid that is populated with data. I try to read the values Showmessage(Grid1.Rows.Row[0].Value[0]); But I keep getting the message: Error. List index 0 out of bounds Line 1 What is wrong with my code? Ronald |
Sat, Jan 30 2021 12:45 PM | Permanent Link |
Raul Team Elevate | On 1/30/2021 11:32 AM, Ronald wrote:
> I have a TGrid that is populated with data. I try to read the values > > Showmessage(Grid1.Rows.Row[0].Value[0]); > > But I keep getting the message: > > Error. List index 0 out of bounds > > Line 1 > > What is wrong with my code? > This should work in general. Is this bound or unbound and how are you populating it ? I can duplicate the error with unbound if I set RowCount manually and then go and edit the cells (they are set as edits). Adding rows properly with "grid.InsertRow" works OK. Either it's a bug (if one can use RowCount to increase number of rows) or RowCount should be read-only property. Raul |
Sun, Jan 31 2021 4:26 AM | Permanent Link |
Ronald | Raul wrote:
>Either it's a bug (if one can use RowCount to increase number of rows) >or RowCount should be read-only property. Thanks Raul, I forgot to say it is in EWB2, so worries about EWB3. It must have somtething to do with my code elsewhere because I used it before and it worked perfectly. Ii will continue my search. |
Sun, Jan 31 2021 12:04 PM | Permanent Link |
Raul Team Elevate | On 1/31/2021 4:26 AM, Ronald wrote:
> I forgot to say it is in EWB2, so worries about EWB3. > It must have somtething to do with my code elsewhere because I used it before and it worked perfectly. Ii will continue my search. Same questions though as same applies to EWB2 and If unbound make sure you use Grid1.AppendRow and then Grid1.Rows.Row[0].Value[0] should work ok Raul |
Tue, Feb 2 2021 11:47 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Raul,
<< I can duplicate the error with unbound if I set RowCount manually and then go and edit the cells (they are set as edits). >> This is now fixed and the fix will be in 3.00 B2. Thanks ! Tim Young Elevate Software www.elevatesoft.com |
Tue, Feb 2 2021 11:49 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Raul,
Hot fix: WebGrids.wbs unit fixed method: procedure TGridRows.SetCount(Value: Integer); var I: Integer; TempRow: TGridRow; begin FList.BeginUpdate; try if (Value > FList.Count) then begin for I:=(FList.Count+1) to Value do begin TempRow:=TGridRow.Create(Self,NextRowID); TempRow.SetCount(FColumnCount); FList.Add(TempRow); end end else if (Value < FList.Count) then begin for I:=FList.Count-1 downto Value do FList.Delete(I); end; finally FList.EndUpdate; end; end; Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, December 9, 2024 at 02:00 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |