I have not been able to find a resolution to this issue. I am getting the InstructorID instead of the InstructorName in the webdropdown when the RowEdittingTemplate opens. The BoundDataField Key="Instructor" is an int just like InstructorID. I have come across this issue before with a simple YN dropdown where 1 = Yes and 0 = No. I wound up converting the database field from int to varchar to take the text YN. A lazy and irritating work around.
Your assistance is very much appreciated. Below is the WebDataGrid with my issue.
<ig:WebDataGrid ID="wdgScreeningFee" runat="server" AutoGenerateColumns="False" DataSourceID="dsScreeningFee" Height="800px" Width="900px" StyleSetName="IG" DataKeyFields="PK_ScreeningFeeID" BorderStyle="None"><Columns><ig:BoundDataField DataFieldName="Instructor" Key="Instructor" Width="60px"><Header Text="Instructor" /></ig:BoundDataField></ig:TemplateDataField></Columns><EditorProviders><ig:DropDownProvider ID="wdgScreeningFee_Instructorddn"><EditorControl runat="server" ClientIDMode="Predictable" DataKeyFields="InstructorID" DataSourceID="dsInstructorAbbr" DropDownContainerMaxHeight="250px" EnableAnimations="False" EnableDropDownAsChild="False" TextField="InstructorName" ValueField="InstructorID" StyleSetName="IG" Width="75px"><DropDownItemBinding TextField="InstructorName" ValueField="InstructorID" /></EditorControl></ig:DropDownProvider></EditorProviders><Behaviors><ig:EditingCore><Behaviors><ig:RowDeleting /><ig:RowEditingTemplate CancelButton="buttonCancel" OKButton="buttonOK"><EditModeActions EnableOnActive="True" RowSelectorMouseClick="Single" /><ClientBindings><ig:RowEditingClientBinding ColumnKey="Instructor" ControlID="control_Instructor" GetValueJavaScript="$find({ClientID}).get_currentValue()" SetValueJavaScript="$find({ClientID}).set_currentValue({value},true)" /><RowEditingClientEvents /><Template><div style="background-color:#B0CBE6;border:1px solid black;"><ig:WebDropDown ID="control_Instructor" runat="server"DataSourceID="dsInstructorAbbr" DataKeyFields="InstructorID" DropDownContainerMaxHeight="200px" EnableAnimations="False" EnableDropDownAsChild="true"TextField="InstructorName" ValueField="InstructorID" DropDownItemBinding-TextField="InstructorName" DropDownItemBinding-ValueField="InstructorID"StyleSetName="IG" CssClass="TableText" Width="200px" ><ClientEvents Initialize="setZIndex" /></ig:WebDropDown></Template></ig:RowEditingTemplate><ig:RowEditing><ColumnSettings><ig:EditingColumnSetting ColumnKey="Instructor" EditorID="wdgScreeningFee_DropDownProvider1" /></ColumnSettings></ig:RowEditing></Behaviors></ig:EditingCore><ig:Selection CellClickAction="Row" RowSelectType="Single"></ig:Selection><ig:Activation></ig:Activation><ig:Sorting><ColumnSettings><ig:SortingColumnSetting ColumnKey="DeleteItem" Sortable="False" /><ig:SortingColumnSetting ColumnKey="Comments" Sortable="False" /></ColumnSettings></ig:Sorting></Behaviors></ig:WebDataGrid>
Hello Viggen2002,
Thank you for contacting Infragistics Developer Support!
I strongly suggest you to use WebDropdown as editor provider not Editor template.
I have modified your code to work as you expect. You can review the attachment.
For more refer about using WebDropDown with editor providers refer to http://es.infragistics.com/samples/aspnet/data-grid/dropdown-editors.
Hello,
I am still following up. Have you been able to resolve the issue?If you have any concerns or questions, please feel free to contact me, I will be glad to help you.Thank you for choosing Infragistics components!