ValueList in grid not using value field

10 replies. Last post: December 9, 2010 1:45 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Eric HanigMember

HI,

 

i have a valuelist that is a part of a grid (its a dropdownlist).  The dropdown shows just fine, but when you select from the drop down, instead of showing what is in the Text field of the valuelist, its showing the value field.  This is in 2009 webgrid 7.0

 

 

Eric

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ChallengeQuestionSettings.ascx.cs" Inherits="ChallengeQuestionSettings" %> <%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %> <%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %> <script type="text/javascript" language="javascript"> function wgPrepareCustomAction(grid, xmlr, name)

{

grid.SetStatus1(
'<%Response.Write(Resources.AdminText.MSG_Updating); %>'); return true;

}

function wgCustomActionResponse(grid, xmlrp)

{

grid.SetStatus1(
'<%Response.Write(Resources.AdminText.MSG_Ready); %>');

grid.RefreshAll();

return true;

}

</script><

script> <table cellpadding="0" cellspacing="0" width="900px" class="FormHeader"> <tr> <td style="padding-top: 5px; padding-bottom: 5px; padding-left: 5px" class="FormHeader"> <asp:Label ID="lblChallengeSettingsInfo" runat="server" /> </td> <td style="padding-top: 5px; padding-bottom: 5px; padding-right: 5px" class="FormHeader" align="right"> <a target="_blank" href="../../help.aspx?Context=ChallengeSettings"> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/icons/wc_help16.gif" /></a> </td> </tr> <tr> <td class="FormBody" colspan="2" style="width: 900px; height: 620px;"> <table cellpadding="0" cellspacing="0"> <tr> <td style="padding-left: 5px; padding-right: 5px;"> <table cellspacing="0" cellpadding="0" border="1" style="height: 350px;"> <tr style="height: 620px; width: 900px;"> <td style="height: 620px;" align="left" valign="top"> <ISWebGrid:WebGrid ID="WebGridChallengeQuestion" runat="server" Height="620px" Width="900px" HorizontalAlign="NotSet" DataSourceID="SqlDataSource1"> <RootTable DataKeyField="ChallengeQuestionID"> <Columns> <ISWebGrid:WebGridColumn Caption="ChallengeQuestionID" DataMember="ChallengeQuestionID" DataType="System.Int32" Name="ChallengeQuestionID"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ChallengeQuestion" DataMember="ChallengeQuestion" Name="ChallengeQuestion" TextboxMaxlength="150"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="CultureCode" DataMember="CultureCode" Name="CultureCode" TextboxMaxlength="50" EditType="DropdownList" > </ISWebGrid:WebGridColumn> </Columns> </RootTable> <LayoutSettings InProgressUIBehavior="ChangeCursorToHourGlass" HeaderClickAction="SortMulti" AlwaysShowHelpButton="False" NewRowLostFocusAction="AlwaysUpdate" TreeLines="False" AllowSorting="Yes" RowHeightDefault="20px" RowLostFocusAction="AlwaysUpdate" GridLines="Vertical" HideColumnsWhenGrouped="No" CellPaddingDefault="0" AutoFitColumns="True" ShowRefreshButton="false" AlternatingColors="True" VirtualLoadMode="LargeData" GridLineStyle="Solid" PagingMode="VirtualLoad" AllowContextMenu="false" GridLineColor="221, 236, 254" AllowEdit="Yes" AllowAddNew="Yes" AllowDelete="Yes" EditOnClick="true"> <HeaderStyle BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="#ACA899" BorderStyle="None" ForeColor="Black" BackgroundImage="/CommonLibrary/Images/ColBk.gif" Height="20px" CustomRules="border-bottom: #73A1E4 1px solid"></HeaderStyle> <FrameStyle BackColor="#A9C7F4"> </FrameStyle> <GroupByBox> <LabelStyle BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="Navy" BorderStyle="Solid" BackColor="White"></LabelStyle> <Style BackColor="#B2CDF7"> </Style> </GroupByBox> <EditTextboxStyle BorderWidth="0px" Font-Size="8pt" Font-Names="Verdana" BorderStyle="None"> </EditTextboxStyle> <NewRowStyle Font-Size="8pt" Font-Names="Verdana" ForeColor="DarkGray" BackColor="White"> </NewRowStyle> <FocusCellStyle BorderStyle="Solid" BorderWidth="1px" BorderColor="0, 45, 150"></FocusCellStyle> <RowStyle BackColor="White" CustomRules="text-overflow: ellipsis; overflow-x: hidden" Font-Names="Verdana" Font-Size="8pt" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden" /> <GroupRowInfoStyle Font-Size="8pt" Font-Names="Verdana" BorderColor="Black" BorderStyle="None" BackgroundImage="/CommonLibrary/Images/ColBk.gif" CustomRules="border-bottom: #73A1E4 1px solid"> </GroupRowInfoStyle> <SelectedRowStyle BackColor="#FBE9B8" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden" /> <EditFocusCellStyle BackColor="#E9CD82"> </EditFocusCellStyle> <AlternatingRowStyle BackColor="#DDECFE" CustomRules="text-overflow: ellipsis; overflow-x: hidden" Font-Names="Verdana" Font-Size="8pt" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden" /> <StatusBarStyle BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="#73A1E4" BorderStyle="Solid" BackColor="#DDECFE"> <Padding Bottom="2px"></Padding> </StatusBarStyle> </LayoutSettings> </ISWebGrid:WebGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HostingConnectionString %>" SelectCommand="SELECT * FROM [ChallengeQuestion]" DeleteCommand="DELETE FROM [ChallengeQuestion] WHERE [ChallengeQuestionID] = @ChallengeQuestionID" InsertCommand="INSERT INTO [ChallengeQuestion] ([ChallengeQuestion], [CultureCode]) VALUES (@ChallengeQuestion, @CultureCode)" UpdateCommand="UPDATE [ChallengeQuestion] SET [ChallengeQuestion] = @ChallengeQuestion, [CultureCode] = @CultureCode WHERE [ChallengeQuestionID] = @ChallengeQuestionID"> <DeleteParameters> <asp:Parameter Name="ChallengeQuestionID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="ChallengeQuestionID" Type="String" /> <asp:Parameter Name="ChallengeQuestion" Type="String" /> <asp:Parameter Name="CultureCode" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="ChallengeQuestion" Type="String" /> <asp:Parameter Name="CultureCode" Type="String" /> </InsertParameters> </asp:SqlDataSource> </td> </tr> </table> </td> </tr> </table> </td> </tr>

</table>

table>

 

All times are GMT -5. The time now is 3:35 AM.
Previous Next