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
265
When RowEdittingTemplate opens WebDropDown displays Value not Text
posted

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>

Parents
No Data
Reply Children