EditCommandColumn w can set it to Visible=true for some users?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I Set the EditCommandColumn to Visible=False to stop people who are not
allowed to make any changes to a record. How can set it to Visible=true for
some users? Please answer in VB
Thanks
Stan
 
Do you have the users log on? How are you authenticating users?

What is your backend database, and what does your connection string look
like?

Jeff
 
Yes I authenticating users , I use a <add key="ConnectionString"
value="server=xxxx;uid=xxk;pwd=xx;database=xx;"/>

all i want to know is how do you Set the EditCommandColumn to Visible=True?
 
Um...HOW do you determine a user? How do "retrieve" the code in the user
record? How do you modify the where clause to retrieve the correct "user
record". How are you authenticating and validating users? Do you have a
login screen?

Jeff
 
Forget about the user Can i set the column to true?

all i want to know is how do you Set the EditCommandColumn to
Visible=True?
 
What are 6 year old?
I am trying to a get a answer and your playing games. I am working to hard
to play foget it!!
 
The reason I asked is because if this was SQL Server, and you had users
login appropriately, then you could limit your result set by using
suser_sname() in your WHERE clause, and not return this column at all for
particular users.

Jeff
 
Thank you but i have a code based on A company code. I don't want to use sql
to control the switch to turn the true or false. I would like to control it
in the program.
stan
 
Stanley,

In addition to Jeff

You know how to set it to false, to set it to true is the same however
"true" instead of "false"

Cor
 
What is wrong with you people if i knew how to set it to false, i would not
ask the question!!!!! How I set to False is <asp:EditCommandColumn
Visible=False EditText="<img src=images/edit.gif border=o align=absmiddle
alt='edit this item'>"
UpdateText="<img src=images/ok.gif border=o align=absmiddle alt='save
changes'>" CancelText="<img src=images/cancel.gif border=o align=absmiddle
alt='cancel editing'>" />
HOW DO I SET IT IN A USER CONTROL?
 
Stanley,

Exactly as Jeff, told, by directly suplying what you want. Now you come with
a complete other question.

Blaming people is not the right way to get help, especially not when it is
obviously your own fault that you did not get the right answer..

This was your first question.
I Set the EditCommandColumn to Visible=False to stop people who are not
allowed to make any changes to a record. How can set it to Visible=true for
some users? Please answer in VB

And now it becomes this
What is wrong with you people if i knew how to set it to false, i would
not
ask the question!!!!! How I set to False is <asp:EditCommandColumn
Visible=False EditText="<img src=images/edit.gif border=o align=absmiddle
alt='edit this item'>"
UpdateText="<img src=images/ok.gif border=o align=absmiddle alt='save
changes'>" CancelText="<img src=images/cancel.gif border=o align=absmiddle
alt='cancel editing'>" />
HOW DO I SET IT IN A USER CONTROL?

I hope you find your solution soon.

Cor
 
Cor Ligthert said:
Stanley,

Exactly as Jeff, told, by directly suplying what you want. Now you come with
a complete other question.

Blaming people is not the right way to get help, especially not when it is
obviously your own fault that you did not get the right answer..

This was your first question.

And now it becomes this


I hope you find your solution soon.

Cor
 
Hey,
Try this in your "ItemDataBound" event.
e.Item.Cells(n).visible = "True" where "n" is the position of the cell.

Thanks
 
no that did not work , But thanks for some kind answer. My prolbem is that It
is a E ditCommandColumn and i know know how to change it theres my code

<asp:datagrid id="CodeDetail" runat="server" OnItemCommand="ItemCommand"
OnEditCommand="EditCommandheader"
OnUpdateCommand="UpdateCommandheader"
OnCancelCommand="CancelCommandHeader" OnItemCreated="ItemCreatedcode">
<Columns>
<asp:BoundColumn DataField="GroupName" HeaderText="Code file" />
<asp:BoundColumn Visible="False" DataField="Program"
HeaderText="Program" />
<asp:BoundColumn Visible="False" DataField="Squence"
HeaderText="Sequence" />
<asp:BoundColumn DataField="Tip" HeaderText="Description" />
<asp:EditCommandColumn Visible=False EditText="<img
src=images/edit.gif border=o align=absmiddle alt='edit this item'>"
UpdateText="<img src=images/ok.gif border=o align=absmiddle alt='save
changes'>" CancelText="<img src=images/cancel.gif border=o align=absmiddle
alt='cancel editing'>" />
<asp:TemplateColumn runat="server">
<itemtemplate>
<asp:HyperLink Runat="server" ImageUrl="images/edit.gif"
NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Program") %>'
Id="Goprogram" />
<asp:Label Runat="server" Visible=False Text='<%#
DataBinder.Eval(Container.DataItem, "Tip") %>' Id="Tip" />
</itemtemplate>
<EditItemTemplate>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
 
Don’t talk down to me. I am not an expert programmer and. I am working a 16
hour day trying to get the job done before I get let go. I post a question
and wait for an answer, working on something else until I get the answer. I
don’t see how I got in the program makes any difference my problem is still
that same. Some can display the data and other can change it. I am sorry
that I did not word the question to your likening. But the idea that I have
the answer but I will not give it you unless you answer my question does not
make any sense to me. I am seating waiting for an answer and to get that
response is not what am waiting for. This is not how you share information,
or exchange ideas with others, including experts from around the globe.
 
Back
Top