Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPostback in a View ControlPostback in a View Control
Previous
 
Next
New Post
5/9/2010 11:50 AM
 
Hi,

I've written a custom module which displays a list of records in a Gridview. I thought the ideal control to house this functionality would be a View control because I didn't want users to "edit" any of the records unless they had selected them first and then clicked on an Update button (at which point they'd then be redirected to an Edit control).

I placed a number of buttons (usual Create, Edit, View, Delete) underneath the GridView and added an event handler to the GridView allowing me to "select" a row.

As I was developing the module, and viewing the control in "Edit" mode, I didn't notice any issue until I logged in as a user with only "View" permissions for the module. Unfortunately, I then found out that I couldn't select a row in my GridView anymore, and clicking the buttons that I had added, had no apparent effect. 

I can of course give all my users "Edit" access to the module and that works fine but I'd prefer it if they didn't *need* Edit access.

Another thing I noticed was that in Edit mode, I could see a pair of radio buttons at the top of my page allowing me to swap between Edit and View. How can I hide this?
 
New Post
5/9/2010 1:03 PM
 
Regarding the postback behavior, it is most likely caused by module output caching which is normally disabled for admin/host users when in edit mode - hence the differences depending on permission level.

To correct this, make sure that Module Output Cache Time or Duration is set to 0 or disabled in the module's settings.

Regarding the edit/view radio buttons being visible. I believe this is normal behavior when the user has edit permissions for a module on the page.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
5/9/2010 6:51 PM
 
Thanks for your reply :) I did try setting the cache to zero after reading another thread but it didn't seem to make any difference. I'd created my module from one of the DNN templates and I never seem to have much luck trying to customise other people's code. Instead, I created a completely new module, taking the DAL code from the original one and that worked perfectly. I wish I knew what the original problem was though - I did wonder about the ModuleActionCollection and the setting of SecurityAccessLevel.Edit - I'll have to look into it when I have some spare time. You're absolutely right about the View/Edit radio buttons as well - I've never really noticed before but I'm still new to module development - that's my excuse ;)
 
New Post
5/9/2010 11:55 PM
 
    You need make some modification to let normal user create/edit records.
   1.  Change SecurityAccessLevel.Edit as SecurityAccessLevel.View while adding ModuleActions in main control interface.
   2. Click "Host - Module definitions" , select the create/edit  control(.ascx), click "edit", it will open "Edit Module Control" ,change "Type" value from "Edit" to "View".
   3. Now normal user can create/edit records without "Edit" permission.

Over 20 + professional dnn modules for News Article, Store, Video Gallery, Photo Gallery, Ultra Flash Player,YouTube Video, Image Slide show, Skin Chameleon and much more from DnnModule.com
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPostback in a View ControlPostback in a View Control


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out