Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1175
Binding on DropDown does not work how intended
posted

Hello there,

a new day, new problems: On a row I have label with text, when the users wants to edit this row, I want to show a webdropdown and set the text in the dropdown as selected item.

I Found a example how to make this work and tinkered this:

In the RowEditTemplate

                                                <td>
                                                    <%--<div style="width: 160px; z-index: 1000000">--%>
                                                        <stgwc:DropDown ID="ddlRoleTypeEdit" ClientIDMode="Static" DisplayMode="DropDownList"
                                                            TextField="RoletypeDescription"
                                                            DropDownItemBinding-TextField="RoletypeDescription"
                                                            ValueField="RoleTypeCode"
                                                            DropDownItemBinding-ValueField="RoletypeDescription"
                                                            EnableLoadOnDemand="false"runat="server"
                                                            Width="150px"
                                                            EnableDropDownAsChild="true"
                                                            OnInit="DropDown_OnPreRender"
                                                            >
                                                        </stgwc:DropDown>
                                                    <%--</div>--%>
                                                </td>

At the binding I set this:

                                    <ig:RowEditingClientBinding ColumnKey="RoleType" ControlID="ddlRoleTypeEdit"
                                        SetValueJavaScript="$find({ClientID}).set_currentValue(cell.get_element().innerText,true)" />

When I debug I see this works not bad so far, I guess the problem is the clientstate list, which doesnt seem filled at this time.

Is there anything else I have to look at to make this work proper?

Thanks for your response

Matthias

Parents Reply Children