Serg Posted July 12, 2023 Share Posted July 12, 2023 Не удается установить Locked у Columns UniDBGrid в Runtime Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2023 Share Posted July 12, 2023 9 minutes ago, Serg said: Не удается установить Locked у Columns UniDBGrid в Runtime Не все свойства могут быть изменены во время выполнения. Quote Link to comment Share on other sites More sharing options...
Serg Posted July 12, 2023 Author Share Posted July 12, 2023 У меня динамические поля и я не могу задать до построения. Но первые 2 поля всегда одинаковые и должны быть Locked. Возможно ли решить? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 12, 2023 Share Posted July 12, 2023 33 minutes ago, Serg said: У меня динамические поля и я не могу задать до построения. Каким образом назначаете? Quote Link to comment Share on other sites More sharing options...
Serg Posted July 13, 2023 Author Share Posted July 13, 2023 После получения данных. with MainForm.UniDBGrid11 do begin for i:=0 to Columns.Count-1 do begin if Columns[i].FieldName='subjob_id' then begin//= Columns[i].Visible:=false; Columns[i].Readonly:=true; end;//= if Columns[i].FieldName='subjob_id' then begin//= Columns[i].Visible:=false; Columns[i].Readonly:=true; end;//= if Columns[i].FieldName='jobBuilding_id' then begin//= Columns[i].Visible:=false; Columns[i].Readonly:=true; end;//= if Columns[i].FieldName='job_name' then begin//= Columns[i].Title.Caption:='Наименование <br> работ'; Columns[i].Width:=125; Columns[i].DisplayMemo:=true; Columns[i].Expanded:=true; Columns[i].Title.Alignment:=taCenter; Columns[i].Readonly:=true; Columns[i].Locked:=true; end;//= if Columns[i].FieldName='subjob_name' then begin//= Columns[i].Title.Caption:='Наименование <br> подработ'; Columns[i].Width:=125; Columns[i].DisplayMemo:=true; Columns[i].Expanded:=true; Columns[i].Title.Alignment:=taCenter; Columns[i].Readonly:=true; end;//= if i>3 then begin//= //Columns[i].Title.Caption:='Площадь<br>по группе<br>'+IntToStr(i-3); Columns[i].Width:=105; Columns[i].Title.Alignment:=taCenter; Columns[i].Editor:=MainForm.UniFormattedNumberEdit6; Columns[i].Readonly:=false; end;//= end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2023 Share Posted July 13, 2023 18 minutes ago, Serg said: После получения данных... Я думаю, что лучшим решением на данный момент является динамическое создание сетки тоже. Quote Link to comment Share on other sites More sharing options...
Serg Posted July 13, 2023 Author Share Posted July 13, 2023 И в созданной в Runtime сетке можно будет устанавливать Locked? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2023 Share Posted July 13, 2023 Just now, Serg said: И в созданной в Runtime сетке можно будет устанавливать Locked? Да. Quote Link to comment Share on other sites More sharing options...
Serg Posted July 13, 2023 Author Share Posted July 13, 2023 Спасибо Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2023 Share Posted July 13, 2023 Пожалуйста. Quote Link to comment Share on other sites More sharing options...
Serg Posted July 13, 2023 Author Share Posted July 13, 2023 Спасибо. Все работает 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.