Re: update gridview

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I suggest putting both the TextBox and the DropDownlist on the edit
template.
Depending on the condition, give the right one the property Visible=False.
You can even do this through databinding:
Visible='<%# Eval("somefield") %>'

On update, check which one is visible, and retrieve its value.

--

Riki

<aarif.shah@xxxxxxxxx> wrote in message
news:1141820599.809275.13320@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, i am Aarif,

I Have a gridview.On clicking the edit link of gridview i want my
edititem template(that i have defined ) to show either Texbox control
or dropdown list depending on some condition.
when user clicks on update link of the gridview,the value shoud be
taken from either textbox or selected value of dropdown list
depending upon which control is appearing in the edit mode.

How can i do this?

Aarif Majid



.



Relevant Pages

  • (v2003) Datagrid Dropdownlist Edit Problems
    ... I'm trying to edit data in a datagrid through a dropdown list with different ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Validating Data in a GridView
    ... "Cowboy (Gregory A. Beamer)" wrote: ... Add a disabled dropdown, or textbox, with the value. ... >I have a gridview that uses a sqldatasource. ... When the gridview is in edit mode, one of the columns is a ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Validating Data in a GridView
    ... If the lack of showing it means the user cannot edit it, you have a couple of choices. ... Add a disabled dropdown, or textbox, with the value. ... So, when the gridview comes up, it shows nothing in the column ... validate the selected item of a dropdown when a gridview loads a selected row ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Gray status boxes -- saving, repagination, ""
    ... The Edit menu flashing when you cut/copy/paste is SOP in OS X. ... depending on circumstances it may remain 'lit up' for several seconds. ...
    (microsoft.public.mac.office.word)
  • Re: Is GridView with Dropdown Columns possible?
    ... In the edittemplate I dropped in a dropdownlist ... control, linked it to the SQL View, and bound it to the column. ... Now You can edit the various templates for the given column. ... dropdown lists linked to a query (I already have the Views created in ...
    (microsoft.public.dotnet.framework.aspnet)