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

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
 
J

Jeff Dillon

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
 
G

Guest

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?
 
J

Jeff Dillon

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
 
G

Guest

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?
 
G

Guest

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!!
 
G

Guest

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
 
G

Guest

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
 
C

Cor Ligthert

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
 
G

Guest

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?
 
C

Cor Ligthert

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
 
G

Guest

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
 
G

Guest

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

Thanks
 
G

Guest

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>
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top