General scenario: I have a radgrid using auto-generated in-place record editing. Datasources are LLBLgen entity collections. One of the columns is username (as in AD account name), but is a GridAutocompleteColumn with the users' display name as the DataTextField so it will be easier for user to make the correct selection. The autocomplete part works (mostly) correctly. What I thought would happen next is when user clicks Update link to confirm selection, the Adname value would be inserted into the grid (and therefore the backing table). But instead, the displayname is being inserted. What am I doing wrong?
Side note (I think): when in edit mode, when I start typing, if I pause for a small while, the autocomplete returns a set of matches but does not rerun and refresh the results as I type additional characters. For now, I get around this by typing really fast so the search gets the whole search string at once.
- Justin
<telerik:RadGrid ID="gridUserAssignment" runat="server" DataSourceID="llblgUserAssignmentData" AllowAutomaticUpdates="true" AutoGenerateEditColumn="true" AllowAutomaticDeletes="false" AutoGenerateDeleteColumn="false" OnNeedDataSource="gridUserAssignment_NeedDataSource" OnDeleteCommand="gridUserAssignment_DeleteCommand" OnEditCommand="gridUserAssignment_EditCommand" OnItemCommand="gridUserAssignment_ItemCommand" OnPdfExporting="gridUserAssignment_PdfExporting"> <ClientSettings> <Selecting AllowRowSelect="True" /> </ClientSettings> <MasterTableView AutoGenerateColumns="False" DataKeyNames="RoleId" DataSourceID="llblgUserAssignmentData" EditMode="InPlace" CommandItemDisplay="Top" > <CommandItemSettings ShowExportToPdfButton="true" ShowExportToCsvButton="true" ShowAddNewRecordButton="False" ShowRefreshButton="false"> </CommandItemSettings> <Columns> <telerik:GridTemplateColumn HeaderText="#" UniqueName="RowNumber" HeaderStyle-Width="3%"> <ItemTemplate> <asp:Label runat="server" ID="lblRowNumberAccessUsers" Width="50px" Text='<%# Container.DataSetIndex+1 %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridAutocompleteColumn DataField="Adname" FilterControlAltText="Filter Adname column" HeaderText="User AD Username" SortExpression="Adname" UniqueName="Adname" DataSourceID="llblgADusers" DataValueField="SAmaccountName" DataTextField="SAmaccountName" Filter="Contains" InputType="Text" SelectionMode="Single" AllowCustomEntry="false" > <telerik:GridBoundColumn DataField="ADuserDetail.Title" ReadOnly="true" FilterControlAltText="Filter User Title column" HeaderText="User Title" SortExpression="Usertitle" UniqueName="Usertitle"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ADuserDetail.Email" ReadOnly="true" FilterControlAltText="Filter email column" HeaderText="User email" SortExpression="email" UniqueName="email"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid><llblgenpro:LLBLGenProDataSource ID="llblgUserAssignmentData" runat="server" DataContainerType="EntityCollection" EntityCollectionTypeName="UserManagement.CollectionClasses.UserRoleUserCollection, UserManagement" ></llblgenpro:LLBLGenProDataSource><llblgenpro:LLBLGenProDataSource ID="llblgADusers" runat="server" DataContainerType="EntityCollection" EntityCollectionTypeName="UserManagement.CollectionClasses.AduserDetailCollection, UserManagement" ></llblgenpro:LLBLGenProDataSource>Side note (I think): when in edit mode, when I start typing, if I pause for a small while, the autocomplete returns a set of matches but does not rerun and refresh the results as I type additional characters. For now, I get around this by typing really fast so the search gets the whole search string at once.
- Justin