Dinkin Posted October 26, 2023 Share Posted October 26, 2023 Добрый день. В таблице есть колонки с функционалом редактирования, но для определенных ячеек надо запретить эту возможность. Как то можно это задать? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 26, 2023 Share Posted October 26, 2023 Здравствуйте, ReadOnly свойства колонок? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 26, 2023 Author Share Posted October 26, 2023 Но мне не всю колонку надо блокировать, а только часть ячеек в ней Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 26, 2023 Share Posted October 26, 2023 Какие условия? Если я правильно понял Вас, то на форуме есть решения, и на стороне клиента, также и на стороне сервера. Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 26, 2023 Author Share Posted October 26, 2023 Sherzod, Первым делом сначала пробую найти уже существующие решение на форуме, но так как тут интернациональные темы, возможно не все замечаю или думаю что мне э\то не подходит. А условие простое, к примеру если значение ячейки = 3, то блокировать ее. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 26, 2023 Share Posted October 26, 2023 Вот к примеру: 2 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 27, 2023 Author Share Posted October 27, 2023 Спасибо. Только как только я посылаю SendResponse Выдает ошибку. void __fastcall TCategoriesForm::GridAjaxEvent(TComponent *Sender, UnicodeString EventName, TUniStrings *Params) { if(EventName == "load") { if((Grid->Columns->Items[2]->Field->AsString == L"Пользователь")) UniSession->SendResponse("false"); else UniSession->SendResponse("true"); } } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 27, 2023 Share Posted October 27, 2023 Вы уверены что используюте синхронный запрос? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 27, 2023 Author Share Posted October 27, 2023 Ну я использую обычную связку TFDQuery + TDataSource + TUniDBGrid и запрос SELECT, я не знаю как в Uni это отрабатывает синхронно или асинхронно. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 27, 2023 Share Posted October 27, 2023 9 minutes ago, Dinkin said: я не знаю как в Uni это отрабатывает синхронно или асинхронно. Я имею в виду js code: function beforeedit(editor, context, eOpts) { return ajaxRequest(this, 'getCheck', [], false).responseText == 'true'; } Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 27, 2023 Author Share Posted October 27, 2023 52 minutes ago, Sherzod said: Я имею в виду js code: function beforeedit(editor, context, eOpts) { return ajaxRequest(this, 'getCheck', [], false).responseText == 'true'; } я извиняюсь, снова привыкаю к Uni, это сюда добавлять Form-> Script ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 27, 2023 Share Posted October 27, 2023 5 minutes ago, Dinkin said: то сюда добавлять Form-> Script ? Нет. Сюда: 1 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted October 27, 2023 Author Share Posted October 27, 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.