-1

I can use html tags into KO foreach blog. For example I can use input and p tags. I know couse of problem is runat="server" attribute. But , How can i do it without this attribute.

  <!-- ko foreach: UDFields -->
        <div class="row" data-bind="if: $data.EditorType() != 16">
            <div class="col-xs-2 col-sm-3 col-md-1" style="padding-top: 10px; text-align: right; padding-right: 0px; min-width: 140px; font-weight: bold;">
                <p class="lblModern" data-bind="text: $data.Caption(), attr: { id: $parent.TableName() + '_' + $data.Name() }"></p>
            </div>
            <div data-bind="if: $data.EditorType() == 1">
                <div class="col-xs-4 col-sm-3 col-md-2" style="float: left; width: auto; padding-left: 30px;">
                    <input type="text" class="tabletext form-control" data-bind="value: $data.Value(), attr: { id: $parent.TableName() + '_' + $data.Name(), bindingName: $parent.TableName() + '.' + $data.Name() }" />
                </div>
            </div>

   <!-- /ko -->

But I cant use DevExpress richedit tags, normally. How can I use dx tags below code?

  <script type="text/html" id="UDFieldsRichTemplate">
        <!-- ko foreach: UDFields -->
        <div class="row" data-bind="if: $data.EditorType() == 1">
            <button class="accordion" data-bind="text: $data.Caption(), attr: { id: $parent.TableName() + '_' + $data.Name() }"></button> ------->>> I can use
            <div id="richEditAcc" class="panel">
                   <dx:ASPxRichEdit runat="server" Width="100%" Height="100%" data-bind="..." RibbonMode="None"></dx:ASPxRichEdit> --------->>>>>> I cant use
            </div>
        </div>
        <!-- /ko -->
    </script>
Sergey
  • 5,396
  • 3
  • 26
  • 38

1 Answers1

0

Knockout is a client-side library. It's impossible to repeat server-side controls with the help of the ko foreach binding.

Alexander Bykov
  • 219
  • 3
  • 5