Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Binded DropDown list

Reply
Thread Tools

Binded DropDown list

 
 
Mira Vizjak
Guest
Posts: n/a
 
      07-15-2003
Hi
I'm using a datagrid with a dropdown list in it. The dropdown list is filled
with values from SQL database, it's autopostback property is set to true and
when I select another item in it, the SelectedIndexChanged event fires
properly, but I can't the index or value of the selected item. SelectedValue
and SelectedItem is Nothing, Request.Params("DropDown1") is empty as well.
Thanks for your help!

Jure


 
Reply With Quote
 
 
 
 
Anatoly
Guest
Posts: n/a
 
      07-16-2003
Please post some code snippet.
Probably you fill dropdown every time, use IsPostBack property to fill it
only first time you enter the page.
Also check if EnableViewState of dropdown and page is set to true.


"Mira Vizjak" <> wrote in message
news:bf1qbl$jf9$...
> Hi
> I'm using a datagrid with a dropdown list in it. The dropdown list is

filled
> with values from SQL database, it's autopostback property is set to true

and
> when I select another item in it, the SelectedIndexChanged event fires
> properly, but I can't the index or value of the selected item.

SelectedValue
> and SelectedItem is Nothing, Request.Params("DropDown1") is empty as well.
> Thanks for your help!
>
> Jure
>
>



 
Reply With Quote
 
 
 
 
Anatoly
Guest
Posts: n/a
 
      07-16-2003
Sorry, can not see any connection between refill dropdown and empty Datagrid
???
Please explain.

"Mira Vizjak" <> wrote in message
news:bf2t75$hda$...
> Yes, I do fill drop down every time on PageLoad, otherwise the datagrid is
> empty on postback.
>
>



 
Reply With Quote
 
Mira Vizjak
Guest
Posts: n/a
 
      07-16-2003
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Security.IsInRoles("Admins") = False Then
Response.Redirect("default.aspx")
End If
If Page.IsPostBack=False then
BindGrid()
End If
End Sub
In this case when I select an item from ddl control the datagrid on the page
posted back is empty.

If Security.IsInRoles("Admins") = False Then
Response.Redirect("default.aspx")
End If
BindGrid()
End Sub
In this case when I select an item from ddl control the datagrid on the page
posted back is full.


 
Reply With Quote
 
Anatoly
Guest
Posts: n/a
 
      07-16-2003
I can't see from code you post where do you fill the dropdown.
Fill it once when Not IsPostBack.

"Mira Vizjak" <> wrote in message
news:bf33em$me0$...
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> If Security.IsInRoles("Admins") = False Then
> Response.Redirect("default.aspx")
> End If
> If Page.IsPostBack=False then
> BindGrid()
> End If
> End Sub
> In this case when I select an item from ddl control the datagrid on the

page
> posted back is empty.
>
> If Security.IsInRoles("Admins") = False Then
> Response.Redirect("default.aspx")
> End If
> BindGrid()
> End Sub
> In this case when I select an item from ddl control the datagrid on the

page
> posted back is full.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML-Binded TreeView - How to select node on client side without PostBack amirmi ASP .Net 1 09-08-2006 06:40 PM
XML-Binded TreeView - How to select node on client side without PostBack amirmi ASP .Net 0 08-01-2006 08:50 PM
XML-Binded TreeView - How to select node on client side without PostBack amirmi ASP .Net 0 08-01-2006 08:49 PM
how second and first arg are binded? Hunter Hou C++ 8 08-10-2004 09:26 PM
How Determine Binded Column Amar ASP .Net 0 02-25-2004 11:38 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57