C++ builder TstringGrid get string from specific cell
Tag : cpp , By : PaulPlum
Date : March 29 2020, 07:55 AM
hope this fix your issue Hello everybody i have C++ tStringGrid , I don't have a working dev enviroment up that can build this but try: assert( StringGrid1->ColCount > 3 && StringGrid1->RowCount > 2 );
UnicodeString cell_str = StringGrid1->Cells[3][2];
|
Getting a specific cell value in an Access Database with C#
Tag : chash , By : Johannes
Date : March 29 2020, 07:55 AM
I hope this helps . In my database, I have 3 columns: time, strike and vol. I am unable to get for example the 3rd value of the 2nd column. I am only able to get the 1st value of any column. , OleDbDataReader reads database rows one-by-one. while (ObjReader.Read())
{
VolT0 = ObjReader.GetValue(0).ToString(); //time column value
VolK0 = ObjReader.GetValue(1).ToString(); //strike column value
VolK1 = ObjReader.GetValue(2).ToString(); //vol column value
Console.WriteLine("time = {0}, strike = {1}, vol = {2}", VolT0 , VolK0, VolK1 );
}
|
Colouring a single cell in a Delphi DrawGrid on click and on a timer
Date : March 29 2020, 07:55 AM
hope this fix your issue The only real difference between TDrawGrid and TStringGrid is that TDrawGrid does not store any cell data itself whereas TStringGrid does, and also that you have to draw everything yourself in a TDrawGrid whereas TStringGrid default-draws the cell strings for you (but you can also custom draw the cells if desired). You have your own arrays for storing your cell data. Use the OnDrawCell event to draw the cells however you want. It gives you the Col and Row of the cell currently being drawn. You would simply access the corresponding array elements and set the grid's Canvas properties accordingly, such as its Brush.Color and Font.Color, then call the Canvas.FillRect() and Canvas.TextRect() methods as needed. As for handling clicks, all you would do is update your array as needed and then Invalidate() the grid to trigger a repaint using the latest data. procedure TForm1.TimerTick(Sender: TObject);
begin
// update contents of currentArray as needed...
DrawGrid1.Invalidate;
end;
procedure TForm1.DrawGrid1Click(Sender: TObject);
begin
if currentArray[DrawGrid1.Col][DrawGrid1.Row] <> 'T' then
begin
currentArray[DrawGrid1.Col][DrawGrid1.Row] := 'T';
DrawGrid1.Invalidate;
end;
end;
procedure TForm1.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Longint; Rect: TRect; State: TGridDrawState);
begin
if currentArray[ACol][ARow] = 'F' then
begin
DrawGrid1.Canvas.Brush.Color := clWhite;
DrawGrid1.Canvas.Font.Color := clBlack;
end else
begin
DrawGrid1.Canvas.Brush.Color := clBlack;
DrawGrid1.Canvas.Font.Color := clWhite;
end;
DrawGrid1.Canvas.FillRect(Rect);
DrawGrid1.Canvas.TextRect(Rect, Rect.Left, Rect.Top, currentArray[ACol][ARow]);
end;
|
How to access the value of specific cell in Tableau?
Date : March 29 2020, 07:55 AM
help you fix your problem I'll give a broad answer, for a broad question. Tableau does not work like Excel. It's closer to Access (or SQL) than to Excel. It does not see an excel table like a collection of cells, with addresses based on row and column. It sees it as a database table, a collection of entries.
|
How do I update a specific cell in access
Date : March 29 2020, 07:55 AM
|