Abaksoft Posted February 18 Posted February 18 Hi @Sherzod Is it possible to add a toggle (Yes / No) on each UnimDBListGrid record like Mega DEMO : Grid - WidgetColumn2 ? Something like this where user can switch (Yes / No) directly on the record : Thx. 2
Abaksoft Posted April 6 Author Posted April 6 Good morning @Sherzod I finded a way to add a Button on each row on GetText : procedure TMainmForm.ClientDataSet1ClientGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin Text :=Sender.AsString + ' <button id="myid' + intToStr(ClientDataSet1.RecNo) + '">' + ' Show' + '</button>' + //******************************* ' <script>' + ' document.getElementById("myid' + intToStr(ClientDataSet1.RecNo) + '").addEventListener("click", function () {' + ' ajaxRequest(MainmForm.UnimDBListGrid1, "MyEvent2", []);' + ' });' + ' </script>'; //******************************* end; Also, I managed to retrieve the click event from AjaxEvent (on an UnimHTMLFrame), but not for UnimDBListGrid. What i am doing wrong ? Could you please analyze this prg in attachment. Many Thx UnimDBListGrid_Ajax_Event.7z
Sherzod Posted April 7 Posted April 7 Hi @Abaksoft Try: procedure TMainmForm.ClientDataSet1ClientGetText(Sender: TField; var Text: string; DisplayText: Boolean); var RowId: string; begin RowId := IntToStr(ClientDataSet1.RecNo); Text := Sender.AsString + ' <button onclick=''ajaxRequest(MainmForm.UnimDBListGrid1, "MyEvent2", ["row=' + RowId + '"])''>' + ' Show' + '</button>'; end; 1
Abaksoft Posted April 7 Author Posted April 7 44 minutes ago, Sherzod said: Hi @Abaksoft Try: procedure TMainmForm.ClientDataSet1ClientGetText(Sender: TField; var Text: string; DisplayText: Boolean); var RowId: string; begin RowId := IntToStr(ClientDataSet1.RecNo); Text := Sender.AsString + ' <button onclick=''ajaxRequest(MainmForm.UnimDBListGrid1, "MyEvent2", ["row=' + RowId + '"])''>' + ' Show' + '</button>'; end; Wow... Great, You're a key player in Unigui !!! We'll always need you. Many Thx Maestro 1
Abaksoft Posted April 7 Author Posted April 7 Mobile interaction Hi Unigueers, For those are interesting, here is a sample for wonderful modern design used on current Mobile applications. Thx to Unigui Team. Mobile_Interraction.7z 1
Recommended Posts