Databind DataGrid

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Guys,

I am developing a webpart for Sharepoint. I have a databinded
dropdownlist which databinds from an existing Sharepoint List.

Now, when the user makes a selection in this DropDownList, I want that
a DataGrid should be populated. Now this DataGrid also databinds to
another existing Sharepoint List.

Any ideas, how I can achieve this. Don't worry about Postbacks or
populating datagrid, I have allready sorted that out.

Please HELP...

At the moment I am doing this.
Private Sub DataGrid_BindData
' Datagrid Properties
myDG = New DataGrid
myDG.GridLines = GridLines.Both
myDG.AutoGenerateColumns = False
myDG.Enabled = True
myDG.EnableViewState = True

' Column - 1
Dim bCol As New BoundColumn
bCol.HeaderText = "Sample "
bCol.DataField = myDDL.SelectedValue '<-- here i am passing the
selected item of
' of
dropdownlist. This style is not working.
dgBookings.Columns.Add(bCol)
End Sub

What should I do

.



Relevant Pages

  • Re: WebPart Postback
    ... ..Net Frenzy wrote: ... I have a dropdownlist that databinds from an existing Sharepoint List. ... matter what selection I make nothing appears in the datagrid. ...
    (microsoft.public.sharepoint.portalserver.development)
  • WebPart Postback
    ... I have a dropdownlist that databinds from an existing Sharepoint List. ... matter what selection I make nothing appears in the datagrid. ... On a normal web-form we would do somthing like ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Databind DataGrid
    ... dropdownlist which databinds from an existing Sharepoint List. ... Now, when the user makes a selection in this DropDownList, I want that ... a DataGrid should be populated. ... populating datagrid, I have allready sorted that out. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Selecting related data in multiple DataGrids when clicking a row
    ... may be because when you make your selection, ... > problem concerning selecting data in DataGrid controls. ... > except with five DataGrids for the selected counsellor. ... > Dim cm As CurrencyManager ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Can rows be ordered in a datatable?
    ... > re-bound to the DataGrid. ... > a selection from the product menu, then recalculate the order, and lastly ... > Is there a way to re-order the rows rather than deleting and re-inserting ... > and re-inserting after each time the users selects another item. ...
    (microsoft.public.dotnet.framework.adonet)