I'm having a bit of trouble starting with these grids and would love some guidance. I'm sure I'm just missing something straightforward, but I can't seem to comb through the documentation that tells me exactly what I'm looking for. So, here goes.
I have a class that contains several subs used for retrieving, editing, deleting, and inserting data into a SQL 2005 database. All of these things work fine.
I want to put an ObjectDataSource on a .aspx page that refers to Select, Update, Insert, and Delete methods from this class. I've done this, and it works fine when I wire it up to a tradional .Net 2.0 Form Control for instance.
<InsertParameters> <asp:Parameter Name="MeetingID" Type="Int64" /><asp:Parameter Name="EmployeeID" Type="Int64" /></InsertParameters>
<UpdateParameters> <asp:Parameter Name="EmployeeID" /> <asp:SessionParameter Name="MeetingID" SessionField="EW_MeetingID" /> <asp:Parameter Name="Attendance" /></UpdateParameters>
</asp:ObjectDataSource>
So, enter the Grid. I dropped a grid on the page with the ObjectDataSource and selected the ID of the ODS in the Grid and ran the page. So far, so good....the data is gathered and displayed.
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" DataSourceID="AttendeeListData" Height="200px" Width="325px" Browser="Xml" DataKeyField="EmployeeID">
</igtbl:UltraWebGrid>
Next, I wanted a dropdown of choices in one of the columns and to hide some of the others. I accomplished this as well.
UltraWebGrid1.DisplayLayout.AllowUpdateDefault = UltraWebGrid.AllowUpdate.YesUltraWebGrid1.DisplayLayout.CellClickActionDefault = UltraWebGrid.CellClickAction.EditUltraWebGrid1.DisplayLayout.Bands(0).Columns(0).Hidden = TrueUltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Attendance").Type = UltraWebGrid.ColumnType.DropDownList
UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Attendance").ValueList.DataSource = dt
UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Attendance").ValueList.DisplayMember = "NativeTranslation"
UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Attendance").ValueList.ValueMember = "IndexValue"
UltraWebGrid1.DisplayLayout.Bands(0).Columns(2).Header.Caption = "Attendee"UltraWebGrid1.DisplayLayout.Bands(0).Columns(3).Hidden = True
End Sub
So, I'm ultimately stuck at how to get the changes I make in the dropdown to trigger the Update method in the ObjectDataSoure. Any thoughts would be greatly appreciated.