Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:616300
More Search Options
RSS Available
Matching Posts
Re: How to set a gridview column to readonly within code
I'm lost. I don't really follow the code here. Why would I modify the edititemtemplate AFTER someone hits the 'Edit' button. Shouldn't I do that as the gridview is being rendered or something? And I already mentioned that I don't want to put both a label and a textbox in each column's edit item template and then swap between them. Please let me know if there's a better alternative for me to be able to display the information the way I want and make sure users can't
Posted to
Data Presentation Controls
(Forum)
by
klgrube
on 8/20/2007
Re: How to set a gridview column to readonly within code
Thank you! However, setting the textbox control enabled property to false in the edit item template is precisely what I DO NOT want to do. It leaves a fakey looking 'textbox' with the data in the textbox grayed out. I want a label to display the text value of the dta clearly. I just don't know the best way to get it there. There's no room for two controls in the edit item template, so I can't just throw in a label and then swap between the textbox and the label using the 'visible'
Posted to
Data Presentation Controls
(Forum)
by
klgrube
on 8/20/2007
Re: How to set a gridview column to readonly within code
I'm sorry! I forgot to mention that these are template fields, not directly bound fields. I tried the code for setting a bound field, and I got the error message, "Unable to ast object of type System.Web.UT.WebControls.TemplateField' to type 'System.Web.UI.WebControls.BoundField.' Is there a way I can just set this property on the column in the grid view rather than the data field? Please let me know. But if not, please let me know how to work with the Template Field. I have
Posted to
Data Presentation Controls
(Forum)
by
klgrube
on 8/19/2007
How to set a gridview column to readonly within code
Hi! I have an asp.net 2.0 gridview on a web page with 10 columns. If the user who accesses the page has admin access, they are allowed to edit eight of the columns. But if they're not admins, they can only edit one of the columns. I cant' figure out how to set individual columns as readonly. Which command subroutine would you use? The gridview Row Command, RowCreated, Rowdatabound? In pseudo code, I'd say something like . . . if useraccess <> "Admin" then Gridview1.column
Posted to
Data Presentation Controls
(Forum)
by
klgrube
on 8/19/2007
Filed under: gridview readonly property code
Re: Ajax Update Panel
I'm having exactly the same problem! It'd be nice if someone actuallly responded!!!!! Karen
Posted to
ASP.NET AJAX UI
(Forum)
by
klgrube
on 3/15/2007
Setting the text of a detailsview template item in the databound event
This is going to sound really stupid, but I haven't been able to find a decent, simple answer to this question and it's getting really frustrating. On a web page, I have a detailsview. One of the columns is called 'CustomerType' In the data, that column is populated with the letter 'S' for Supplies or the letter 'H' for Hardware. That field is a template item . . In the edit template, there is a drop down set up with the display text "Supplies" or "Hardware" and the values "S" or "H" which are bound
Posted to
Data Presentation Controls
(Forum)
by
klgrube
on 3/15/2007
Filed under: asp.net 2.0 detailsview findcontrol template
Re: Maintin scroll position in gridview with fixed header panel on select/edit
Woohoo!!!!! I've been struggling with this so much, and the answer was so easy! All that was necessary was to go a little deeper into the parent node! This is really terrific! I take back every bad thing I was thinking about AJAX! Yes, I remember your earlier posts, and I thank you so very much for answering here. You made it possible for me to provide my users what they've been asking for. I'm truly grateful. I have no clue how points are added here, but you deserve a whole truckload for hanging
Posted to
Web Forms
(Forum)
by
klgrube
on 2/22/2007
Re: Controlling Scrolling (ooh, I'm a poet)?
Yes, thank you. I did try that and it still isn't working. Karen
Posted to
ASP.NET AJAX UI
(Forum)
by
klgrube
on 2/21/2007
Re: Controlling Scrolling (ooh, I'm a poet)?
Thanks! You're right, and I actually do have my own post on this matter: Sorry about the misspelling in the title, but here's the name of the post. I've just added some code that shows the unwanted scrolling behavior really clearly . . . I hope that helps. Here's the title of my post: Maintin scroll position in gridview with fixed header panel on select/edit Feel free to take a look and see if you can get it to work. I'll gladly award points and all of that. That would be cool! Thanks!
Posted to
ASP.NET AJAX UI
(Forum)
by
klgrube
on 2/21/2007
Re: Maintin scroll position in gridview with fixed header panel on select/edit
Here's an example of code that doesn't work correctly but should!!! At the moment, I'm ignoring the fact that my real code uses a master page. I can't even get this much to work correctly. It does work well without the update panel, however. Imports System.Collections.Generic Partial Class FixedHeaderScrollPosition Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim list As List(Of Data) = New List(Of Data) Dim I As Integer
Posted to
Web Forms
(Forum)
by
klgrube
on 2/21/2007
Page 1 of 3 (27 items) 1
2
3
Next >
TechNet Edge:
Forefront Secure Endpoint Demo and Interview
ASP.NET:
Resizing images from the server using WPF/WIC instead of GDI+
Silverlight:
Deploying your Silverlight and WCF RIA Services application
Channel 9:
Juan Chen and Nikhil Swamy: FINE, a Compiler for End-to-End Security Verification
Channel 10:
Get the Outlook Hotmail Connector Beta
Channel 10:
MSN to Launch New Lifestyle Site from Wonderwall Creator
Channel 10:
Behind the Windows 7 Startup Animation
Channel 9:
Reactive Extensions API in depth: CombineLatest
Channel 9:
C9 Lectures: Dr. Graham Hutton - Functional Programming Fundamentals Chapter 11 of 13
WindowsClient:
New WPF Showcase: Scrum Sprint Monitor
WindowsClient:
WPF/XAML helping VS2010 Extensibility
WindowsClient:
HTTP 403.9 with ADO.NET Data Services
WindowsClient:
xml syntax highlighting in Silverlight
Channel 9:
Channel 9 Emerges in China
WindowsClient:
Overlaying Icons on the Windows 7 Taskbar with WPF 4
Channel 9:
The Outlook calendar starts in 1601 - But Why?
ASP.NET:
Bytes by MSDN: Brad Abrams Interview with Billy Hollis: Silverlight 4, RIA Services and VS2010
Mix Online:
Pictures or it Didn't Happen
Channel 9:
Reactive Extensions API in depth: even more Zip
TechNet Edge:
SDL For Agile
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online