Jump to content

Search the Community

Showing results for tags 'columns'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 8 results

  1. Save and restore the order and width of columns in UnidbGrid These functions can be used in forms If the form contains a grid, just pass the grid and leave the second parameter empty If the form contains multiple grids, you can also pass a second word in the second parameter in addition to the grid Virtual table (kind of memory tables) tables are used for saving and retrieving, but you can use JSON or XML Procedure TDMT.SaveGrids_SaveGridLayout(Grid: TUniDBGrid; Const KeyAlt: String = ''); Var i: Integer; vt: TVirtualTable; Begin If Not Assigned(Grid) Then Exit; Grid.Refresh; vt := VTGridLayouts; // حذف قبلی Try SaveGrids_DeleteGridLayout(Grid, KeyAlt); // ذخیره جدید For i := 0 To Grid.Columns.Count - 1 Do Begin vt.Insert; vt.FieldByName('GridKey') .AsString := Grid.Parent.Name + '_' + Grid.Name; vt.FieldByName('GridKeyAlt') .AsString := KeyAlt; vt.FieldByName('FieldName') .AsString := Grid.Columns[i].FieldName; vt.FieldByName('ColIndex') .AsInteger := Grid.Columns[i].Index; vt.FieldByName('ColWidth') .AsInteger := IfThen(Grid.Columns[i].Width>150,Grid.Columns[i].Width,150); vt.Post; End; Finally SaveGrids_SaveToFile; End; End; Procedure TDMT.SaveGrids_LoadGridLayout(Grid: TUniDBGrid; Const KeyAlt: String = ''); Var i: Integer; vt: TVirtualTable; EffectiveKey, FieldName: String; Begin If Not Assigned(Grid) Then Exit; vt := VTGridLayouts; EffectiveKey := IfThen(KeyAlt <> '', KeyAlt, Grid.Parent.Name + '_' + Grid.Name); vt.Filtered:=False; Vt.Filter:='(GridKeyAlt='+ QuotedStr(KeyAlt)+') Or (GridKey='+QuotedStr(Grid.Parent.Name + '_' + Grid.Name)+' And GridKeyAlt ='+ QuotedStr('')+')'; vt.Filtered:=True; For i := 0 To Grid.Columns.Count - 1 Do Begin FieldName := Grid.Columns[i].FieldName; vt.First; If Vt.Locate('FieldName',FieldName,[]) Then Begin Grid.Columns[i].Flex := 0; Grid.Columns[i].Index := vt.FieldByName('ColIndex').AsInteger; Grid.Columns[i].MinWidth := 100; Grid.Columns[i].Width := vt.FieldByName('ColWidth').AsInteger; End; End; End; Procedure TDMT.SaveGrids_DeleteGridLayout(Grid: TUniDBGrid; Const KeyAlt: String = ''); Var vt: TVirtualTable; Begin If Not Assigned(Grid) Then Exit; vt := VTGridLayouts; vt.Filtered := False; vt.Filter := '(GridKeyAlt=' + QuotedStr(KeyAlt) + ') Or (GridKey=' + QuotedStr(Grid.Parent.Name + '_' + Grid.Name) + ' And GridKeyAlt =' + QuotedStr('') + ')'; vt.Filtered := True; vt.First; While Not vt.IsEmpty Do vt.Delete; vt.Filtered := False; End; procedure TDMT.SaveGrids_SaveToFile; begin VTGridLayouts.SaveToFile(CurrentPath + '\GridLayouts.xml'); end; procedure TDMT.SaveGrids_LoadFromFile; begin if FileExists(CurrentPath + '\GridLayouts.xml') then VTGridLayouts.LoadFromFile(CurrentPath + '\GridLayouts.xml'); VTGridLayouts.Open; end;
  2. The problem I encountered when displaying livestock data is that: The field descriptions (column headers) do not align with the values displayed in the same column. In fact, it seems that the field values do not match their headers and the data is shifted or displayed in the wrong column. Fields like "Gender", "Gender Code", "Serial", "Date of Birth" and... are in a row but their values seem to be shifted in between. Some columns have a value of zero but it is not clear whether that zero is related to the code or the text. All the records are similar but the table UI is not reliable because the display order is messed up. Has anyone had a similar experience in UNIGUI? Could this be due to the Columns, DataField, Alignment, or GridOptions settings? Does anyone have any suggestions for ensuring that the field matches the correct column in TUniDBGrid? I would appreciate your advice on where this problem comes from and how to fix it. uni-1.95.0.1592 Delphi 11
  3. Dear UniGUI Support, I am currently testing both UniGUI and IntraWeb as part of a migration process for a VCL application to the web. During my testing of UniGUI, I have encountered two issues that I would like assistance with: DBGrid Column Visibility Issue: In the UniGUI DBGrid, when I click on the grid, go to "Columns", and uncheck columns to hide them, they disappear as expected. However, once I refresh the page or close and reopen the application, all the columns are displayed again. I would like to know how to keep the columns hidden even after refreshing the page or restarting the application. The application I am migrating is multi-user, and each user should be able to choose which columns they want to display. For example, User 1 may choose to display columns such as ID, Name, and Phone, while User 2 may choose to display Name, Address, and Email, hiding the others. Multi-Language (RTL and LTR) Issue: My application is multilingual, supporting both RTL and LTR languages. The issue I have encountered is that when User 1 selects RTL on PC 1, all other users (User 2 on PC 2 and User 3 on PC 3) also experience the application in RTL, even if they have selected LTR. I would like to know how to ensure that User 1 remains in RTL while User 2 and User 3 remain in LTR, regardless of the choices made by other users. Any assistance or guidance you can provide on resolving these issues would be greatly appreciated. Thank you for your support. Best regards, BM
  4. Hi all, Is it possible to change column index in the UniGrid runtime? Or How to change order of columns in the grid? example: grid.Columns[1].index:=5; br,mk.
  5. DEV_THS

    TUniDBGrid

    Hello, I would like to know how to set the ColumnHideable property at run time: = False uniDbGrid1.Columns [index] .Menu.ColumnHideable: = False; Thank you!
  6. Based on following discussion: http://forums.unigui.com/index.php?/topic/5358-unidbgrid-get-set-sorting-state-of-column/ It would be importand if we could get/set the sorting status of a column by code. Something like TUniDBGrid.columns[0].Sort(asc); TUniDBGris.colimns[0].SortingState; (ssNone, ssAsc, ssDesc) Then we could save and reset the sort state of a grid. At moment, if you open a form with a grid, you can not set the column shown as sorted which is actually sorted in the dataset behind. So, if the user clicks on the column header, nothing occurs but the header is shown as sorted, what it already was before..
  7. Is there a way of auto sizing columns in a UniStringGrid so that the width of the column is based on the widest cell text item in the column?
  8. I should have a column in my DBGrid who shows a button. With a click on this button, i would open another form, showing details of the clicked data row. Can that be done?
×
×
  • Create New...