need to hide the columns of Gridview when detailsview is in insert mode

How?
LVL 1
Ammar IqbalSenior IT Consultant/senior Software engineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
   <asp:GridView ID="MyGrid" runat="server">
            <Columns>
                <asp:BoundField ReadOnly="True" HeaderText="ID" 
                  [b]InsertVisible="False"[/b] DataField="ProductID"
                    SortExpression="ProductID">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
           </Columns>
    </asp:GridView>

Open in new window

0
 
Carl TawnSystems and Integration DeveloperCommented:
Set the "InsertVisible" attribute of the relevant columns to False.
0
 
Ammar IqbalSenior IT Consultant/senior Software engineerAuthor Commented:
where should i set thsi?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Ammar IqbalSenior IT Consultant/senior Software engineerAuthor Commented:
and how give me the example
0
 
Kumaraswamy RConnect With a Mentor Commented:
If mode ="Add"

 do this...
Me.GridViewSample.Columns.Item(10).InsertVisible = False

0
 
Amandeep Singh BhullarCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.