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
293
DropdownProvider not working with objectdatasource to update data
posted

Hi,

I have dropdownprovider for a column in webdatagrid. I have objectdatasource mapped to the grid. All the text fields works fine. But dropdownprovider doesnt return the correct value to the object data source update method. Can anyone provide with an example how to accomplish that?


<ig:WebDataGrid ID="wdgWorkbench" runat="server" Width="90%" Height="555" DataKeyFields
="TrialId"


AutoGenerateColumns="false" DataSourceID="objDSTrial" CellSpacing="0" OnDataBinding
="wdgWorkbench_OnDataBinding"


OnInitializeRow
="wdgWorkbench_InitializeRow">


<ErrorTemplate
>

There is some error. Please contact administrator.

</ErrorTemplate
>


<EditorProviders
>


<ig:DropDownProvider ID
="ClientProvider">


<EditorControl runat="server" DisplayMode="DropDownList" TextField="ClientName" ValueField
="ClientId"


DataSourceID="sdsClient" Width="150"
/>


</ig:DropDownProvider
>


<ig:WebDateChooserProvider ID="DateInputProvider"
/>


<ig:DropDownProvider ID
="DepartmentProvider">


<EditorControl ID="EditorControl1" runat="server" DisplayMode="DropDownList" TextField
="Department"


ValueField="DepartmentId" DataSourceID="objDSDepartment" Width="100" DropDownOrientation
="Default"


Font-Underline="false" EnableCachingOnClient="true"
/>


</ig:DropDownProvider
>


</EditorProviders
>


<Columns
>


<ig:TemplateDataField Header-Text="Preview" Key="Preview" Width
="5%">


<ItemTemplate
>


<asp:ImageButton ID="imgPreview" runat="server" CausesValidation="false" ImageUrl
="~/images/view.jpg"


Height="16" Width="16" AlternateText="Preview" ImageAlign="Middle" ToolTip
="Click to preview document"


CommandArgument='<%#Bind("TrialId") %>' OnCommand="imgPreview_Command" Style="cursor: auto;"
/>


</ItemTemplate
>


<Header Text="View"
/>


</ig:TemplateDataField
>


<ig:BoundDataField DataFieldName="MailId" Key="MailId" Width
="8%">


<Header Text="Mail Id"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="Source" Key="Source" Width
="15%">


<Header Text="Source"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="FaxId" Key="FaxId" Width
="10%">


<Header Text="Fax Number"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="ReceivedDate" Key="ReceivedDate" Width
="20%">


<Header Text="Received Date"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="Client" Key="ClientId" Width
="13%">


<Header Text="Client"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="PageNum" Key="PageNum" Width
="8%">


<Header Text="Page #"
/>


</ig:BoundDataField
>


<ig:BoundDataField DataFieldName="Department" Key="DepartmentId" Width
="16%">


<Header Text="Department"
/>


</ig:BoundDataField
>


<ig:TemplateDataField Header-Text="Lock" Key="Lock" Width
="5%">


<ItemTemplate
>


<asp:ImageButton ID="imgLockUnlock" runat="server" CausesValidation="False" Height
="16px"


Width="16px" OnDataBinding="imgLockUnLock_OnDataBinding" ImageAlign
="Middle"


CommandArgument='<%#Bind("LockedFlag")%>'
/>


</ItemTemplate
>


<Header Text="Lock"
/>


</ig:TemplateDataField
>


</Columns
>


<Behaviors
>


<ig:Activation
/>


<ig:Selection RowSelectType="Multiple" CellClickAction="Row"
/>


<ig:EditingCore
>


<Behaviors
>


<ig:CellEditing Enabled
="true">


<EditModeActions EnableF2="true" EnableOnActive="true" MouseClick="Single"
/>


<ColumnSettings
>


<ig:EditingColumnSetting ColumnKey="TrialId" ReadOnly="true"
/>


<ig:EditingColumnSetting ColumnKey="Preview" ReadOnly="true"
/>


<ig:EditingColumnSetting ColumnKey="ReceivedDate" EditorID="DateInputProvider"
/>


<ig:EditingColumnSetting ColumnKey="ClientId" EditorID="ClientProvider"
/>


<ig:EditingColumnSetting ColumnKey="DepartmentId" EditorID="DepartmentProvider"
/>


</ColumnSettings
>


</ig:CellEditing
>


</Behaviors
>


</ig:EditingCore
>


<ig:Paging Enabled="true" PageSize
="16">


</ig:Paging
>


<ig:Sorting SortingMode="Single" Enabled="true"
/>


</Behaviors
>


<ClientEvents AJAXResponse="WebDataGridView_AJAXResponse"
/>


<EditorProviders
>


<ig:WebTextEditProvider ID="WebTextEditProvider1"
/>


</EditorProviders
>


</ig:WebDataGrid
>


</div
>

</

div
>

<

asp:ObjectDataSource ID="objDSTrial" runat="server" SelectMethod
="GetTrialData"


TypeName="TrialDemo" EnablePaging="True" SelectCountMethod
="GetTrialDataCount"


StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName
="maximumRows"


SortParameterName="sortBy" UpdateMethod="UpdateTrialData" EnableCaching
="false">


<UpdateParameters
>


<asp:Parameter Name="Source" Type="String"
/>


<asp:Parameter Name="ClientId" Type="Int32"
/>


</UpdateParameters
>

</

asp:ObjectDataSource
>

<

asp:SqlDataSource ID="sdsClient" runat="server" EnableCaching="true" ConnectionString="<%$ ConnectionStrings:APPConnectionString %>
"


SelectCommand
="SELECT [ClientID], [Name] as [ClientName] FROM [Client] WHERE ([Active] = @Active) ORDER BY [Name]">


<SelectParameters
>


<asp:Parameter DefaultValue="true" Name="Active" Type="Boolean"
/>

 

</SelectParameters
>

</

asp:SqlDataSource
>

<

asp:ObjectDataSource ID="objDSDepartment" runat="server" EnableCaching="true" SelectMethod
="GetTrialDepartment"


TypeName="TrialDemo"></asp:ObjectDataSource
>

 

Parents
No Data
Reply
  • 105
    posted

    I have the same issue.  The dropdown provider is not returning the new value in the row update event.   Is there any solution offered by Infragistics to this issue?

Children
No Data