Gridview rowupdating dropdownlist c
In order to change the GUI of the boundfield, we need to first convert this bound field to a Template Field.Open the aspx file in design mode and click on the arrow on the top right corner of the Grid View.If Not strline Is Nothing Then If SQL = "" Then SQL = "SELECT tb_entity.Entry, (SELECT avg(rating) FROM tb_comments WHERE " _ & "tb_comments.entry=tb_entity.id) as Rating, tb_kind. Info " _ & "FROM tb_entity INNER JOIN tb_hijack ON tb_= tb_hijack. Kind = tb_" _ & "WHERE tb_entity.entry='" & strline.Well, we always have a reason so I believe it is not working because Selected Value only has a Get (it’s read only) and the value can not be put back.
I have a gridview with template field on column 2 and 4. i've also used msgbox to output all column four's control ID and it's returning nothing.
Replace("'", "''") & "'" Else SQL = SQL & " OR tb_entity.entry='" & strline.
Replace("'", "''") & "'" End If End If Also if i use that, then upon loading of the page, it executes the SELECT command w/c gets all the data from the sql db. user either input strings or upload a text file with strings to parse. page would read the strings from either text box or text file then do a SELECT FROM from the sql db what i would like is upon loading, it wouldn't query the sql db.
The source code it will look like: <asp: Template Field Header Text="state" Sort Expression="state"> < Edit Item Template> <asp: Text Box ID="Text Box1" runat="server" Text='<%# Bind("state") %>'></asp: Text Box> </Edit Item Template> < Item Template> <asp: Label ID="Label2" runat="server" Text='<%# Bind("state") %>'></asp: Label> </Item Template> </asp: Template Field> Once the boundfield is converted to template field, we need to work on the Edit Item Template.
This is the Template that is is used when you click on the Edit link in the Grid View row.i mean i could hide the gridview upon loading but still, it would query the sql db and i don't want the server to have that burden.