troubleshooting Question

Disable DataGrid Hyperlink on row basis

Avatar of dotnet0824
dotnet0824 asked on
C#ASP.NETVisual Basic.NET
3 Comments1 Solution1617 ViewsLast Modified:
I display all the users of an application in a DATAGRID (.NET 1.1Framework)
I have an edit option as a HyperlinkColumn in the dataGrid where they can edit a record.

Now I want to retrict the edit functionality according the NT login.
For eg : I can edit my record but not others. I can view other records only.
How can i restrict that edit functionality in the datagrid. Can the Edit Hyperlink be disabled
for other users allowing me only to edit my record.  

here is my datagrid with edit Hyperlink

<TD><asp:datagrid id="Grid1" runat="server"
PageSize="5" PagerStyle-Mode="NextPrev" PagerStyle-NextPageText="Next ->" PagerStyle-PrevPageText="<- Previous"
<asp:BoundColumn DataField="Name" HeaderText="Member Name">
<ItemStyle Wrap="False"></ItemStyle>
<asp:BoundColumn DataField="Project" HeaderText="Project Name"></asp:BoundColumn>
<asp:BoundColumn DataField="Description" HeaderText="Project Status Description"></asp:BoundColumn>
<asp:HyperLinkColumn Text="Edit" DataNavigateUrlField="History_ID" DataNavigateUrlFormatString="http://localhost/Test/AddRecord.aspx?HistoryID={0}">
<ItemStyle HorizontalAlign="Center" Width="10%"></ItemStyle>
<PagerStyle NextPageText="Next -&gt;" Font-Bold="True" PrevPageText="&lt;- Previous" HorizontalAlign="Center"
ForeColor="#ffffff" BackColor="#1B497D"></PagerStyle>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros