Overriding The Default 'No Data' Message In MVCContrib Grid?

Oct 21, 2010

Is it possible to override the default 'There is no Data available' message in MVCContrib Grid with a custom message?

View 1 Replies


Similar Messages:

MVC :: Sorting In Mvccontrib Html.grid In Application

Feb 2, 2011

I have done listing by using html.grid in my mvc application, need to do sorting How can i do that

View 4 Replies

MVC :: Security Exception When Using MVCcontrib Grid On Server

Jun 21, 2010

I am using MVCcontrib grid in my application. Everything works fine on my dev machine. When I publish it to the server and navigate to the page that renders the grid I am getting this error Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. and the source of the error is shown as <%= Html.Grid(Model).Columns(column => {i have added

[Code]....

to the web.config but still&nbsp;get the error&nbsp;

&nbsp;
</textarea></p>
<input type='hidden' name='ID[9]' value='93970' />
<input type='hidden' name='URL[9]' value=[URL]/>
<input type='hidden' name='CAT[9]' value='DataSource Controls' />
<input type='hidden' name='BOARD[9]' value='microsoft' />
<input type='hidden' name='P_DATE[9]' value='Jan 12, 2010 09:43 PM' />
<input type='hidden' name='RANDOM[9]' value='BcIlUOXzN' />
<input type='hidden' name='REPLIES[9]' value='3' />
<input type='hidden' name='USER[9]' value='aziz' />
<p><input class=subject type='text' size='90' name='SUBJECT[9]' value='DataSource Controls :: LINQ using stored procedures and MvcContrib Grid with pagination' /><select name='INDEXED[9]'><option value='1' selected>UPDATE</option><option value='2'>DELETE</option></select>Jan 12, 2010 09:43 PM - Replies: 3 CAT: DataSource Controls<a target=_blank href=[URL]>View</a></p>
<p> <textarea rows=10 cols=100 name='POST[9]' onfocus='setSelRange(this, 0, 0)'/>All,

I have been chasing this erorr all day and coming up blank.&nbsp; I created a stored proceudre(fairly complicated logic), added it to the context, and set the return type to a specific entity type.

It generated this:

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
[Function(Name="dbo.usp_ServiceTemplateSelectByFkID")]
public ISingleResult<ServiceTemplate> usp_ServiceTemplateSelectByFkID([Parameter(Name="FkId", DbType="Int")] System.Nullable<int> FkId)
{
&nbsp;&nbsp;&nbsp; IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), FkId);
&nbsp;&nbsp;&nbsp; return ((ISingleResult<ServiceTemplate>)(result.ReturnValue));
}

I call it from my service with the following method:

public ISingleResult<ServiceTemplate> GetByFkId(int FkId)
{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Db.usp_ServiceTemplateSelectByFkId(FkId);
}

I have tested the stored procedure and it returns the results I want.&nbsp; When I make the service call from the controller, it doesn't error out, however, it should return 4 records in this instance and instead, it returns the same 4 records (repeating the first record 4 times).&nbsp;.........

View 4 Replies

MVC :: How To Add Maxlength Attribute To MVCContrib Grid Column

Nov 16, 2010

i am working in mvc & using MVCContrib grid to show result in grid format.

I want to add restriction to 1 of the grid columns as not to accept more than 3 characters.

how can i add "maxlength" attribute to MVC Contrib grid column.

Or if any other way

View 1 Replies

Auto Generate Grid Using Mvccontrib By Passing Datatable In MVC 2 Application

Jul 6, 2010

In My project i want to use the mvccontrib [URL] to auto generate grid by passing the DataTable to the Grid. Currently Grid does not support this. Grid takes IEnumerable(Of T) and auto generate columns. Is their any way i can achieve this by passing DataTable. Or How do i convert the DataTable to IEnumerable(Of T). My DataTable is completely Dynamic i don't know number of columns or names of the columns at design time. DataTable completely dynamic number of columns are not fixed it just any DataTable. In Short i want to convert Dynamic DataTable to IEnumerable(Of T). Or Is their any better way.

1) One way i tried is using .net 4.0 Dynamic, DynamicObject and ExpandoObject I created a dynamic class as shown here [URL]. I trid passing IEnumerable(Of SampleDynamicObject) but BuildColumns() method is not able to find out the proprieties dynamically added on to it.

2) I think Second way to modify the AutoGenerateColumns() method to work with DataTable, But it looks impossible as Grid Get initialize using IEnumerable(Of T) and all the call on grid for method is using IEnumerable(Of T). So it's come down to converting DataTable to IEnumerable(Of T) and my DataTable are dynamic i don't know their structure at design time So i can't write any specific class to create a object and convert DataTable to IEnumerable(Of T).

View 1 Replies

DataSource Controls :: LINQ Using Stored Procedures And MvcContrib Grid With Pagination?

Jan 12, 2010

I have been chasing this erorr all day and coming up blank. I created a stored proceudre(fairly complicated logic), added it to the context, and set the return type to a specific entity type.

It generated this:

[Function(Name="dbo.usp_ServiceTemplateSelectByFkID")]
public ISingleResult<ServiceTemplate> usp_ServiceTemplateSelectByFkID([Parameter(Name="FkId", DbType="Int")] System.Nullable<int> FkId)
{
IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), FkId);
return ((ISingleResult<ServiceTemplate>)(result.ReturnValue));
}

I call it from my service with the following method:

public ISingleResult<ServiceTemplate> GetByFkId(int FkId)
{
return Db.usp_ServiceTemplateSelectByFkId(FkId);
}

I have tested the stored procedure and it returns the results I want. When I make the service call from the controller, it doesn't error out, however, it should return 4 records in this instance and instead, it returns the same 4 records (repeating the first record 4 times).

In addition, in my controller code, I am using the MVCContrib ToPagedList() method which doesn't appear to work with the ISingleResult interface (forward only cursor, I'm guessing). I have attempted converting the service results to IQuery, List, and Array, however, I still have the problem with the first record being repeated 4 times.

View 3 Replies

Style The MvcContrib Grid Pager To Just Show "1 2 3 4 ..." For Paging?

Aug 24, 2010

Is it possible to style the MvcContrib Grid pager to just show "1 2 3 4 ..." for paging?

View 1 Replies

Forms Data Controls :: Default Message If No Records Found?

Nov 12, 2010

I have a textbox quering a DB and showing the results in a gridview. If no records are found, instead of the present blank response, how can I put up a default message saying no records were found.

View 15 Replies

Custom Server Controls :: How To Custom Controls Derived From Existing Controls - Overriding Default Property Values

Nov 15, 2010

I have some (probably very basic) questions about developing custom controls. I am wanting to derive a set of button controls, and the first one I have started on is a "DeleteButton", that has a additional property (DeleteConfirmationText) that is built into the OnClientClick attribute. To get that added, I overrode the Render method as follows:

[Code]....

This all works well. Now, I will add some logic to make sure that there is some text in the DeleteConfirmationText property, but that isn't the intent of my question.
What I am also wanting to do is to override some of the default property values, so I added that to the default constructor:

[Code]....

Now, in the designer in VS2008, and I look at the properties for the control, there isn't a default value shown in the "Properties" section, and the Causesvalidation still shows the underlying classes default value of "True". As well, in design mode, where the GridView control that containse my DeleteButton control would be displayed, there is an error box "There was an error rendering the control. 'Are you certain you want to delete this attorney?' cound not be set on property 'DeleteConfirmationText'. Here's the markup where I am defining the deletebutton control:

[Code]....

What am I doing wrong?

View 5 Replies

Forms Data Controls :: Setting The Default Button For Grid View ?

Jul 18, 2010

need that when the edit is clicked the update/cancel appear. user types the update and when press the ENTER key the update is made.How to set the update link button as default.

View 5 Replies

Forms Data Controls :: Adding An Extra Row With A Message In The Bottom Of The Grid View?

Nov 18, 2010

I am facing a problem with grid view footer template.. I just want to add a message like hello world in the bottom of the grid view as a seperate row... Right now I am using footer for this..but If the size of footer text increases the width of column which holds that will also increasing.. Is there any way to add a label in the bottom of the grid like

Ex: The number of Students is 200

This will needs to come in the bottom of grid without changing the size of columns..

View 11 Replies

Forms Data Controls :: Grid View That Be Filled Using Code Behind , And It Be Displayed With The Default Paging?

Nov 21, 2010

I have grid view that be filled using code behind , and it be displayed with the default pagingmy problem is I want to add two label behind and after the paging links and fill them with certain text such this example

label1 1 2 3 4 5 6 ..... label2

View 6 Replies

Forms Data Controls :: Nested Grid Dynamically Fill When Parent Grid Button Click Then Expand Child Grid

Jan 16, 2011

i have one grid and one button when i click on that button then it expand and showing another grid under the row of parent grid how to do that.

View 2 Replies

Got Error Message, Default Membership Provider Must Be Specified?

Feb 28, 2011

I'm trying to make my own login functionality without using Membership Provider, but after I login using the

System.Web.UI.WebControls.Login control and set the authentication cookie using FormsAuthentication.SetAuthCookie(username, rememberMe);

I got the following error message, Default Membership Provider must be specified.

View 3 Replies

MVC :: Change Default Value Type Conversion Error Message?

Mar 7, 2010

How can I change default value type conversion error message while posting form value in mvc 2.

View 1 Replies

MVC :: Show Message After Editing Via Jeditable Grid

Dec 1, 2010

i am working in MVC and using jquery.jeditable plugin.The editing is working fine in grid.when i update the content in grid & click on enter the edit post from my controller cllass is called & returns a string as updated text. i want to show a message somewhere else on my page after the update is done.

[HttpPost]public
string edit(FormCollection collection)
{.....
// show success message on page other then grid column
... return <updated column value>;
}

View 2 Replies

VS 2008 / Confirmation Message Before Deleting In Grid?

Jun 21, 2011

i'm using this code;

Code:

Protected Sub GridView1_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim l As LinkButton = DirectCast(e.Row.FindControl("LinkButton1"), LinkButton)
l.Attributes.Add("onclick", "javascript:return " & "confirm('Are you sure you want to delete this record " & DataBinder.Eval(e.Row.DataItem, "CategoryID") & "')")
End If
End Sub

but i still encounter these errors:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

View 8 Replies

Configuration :: Parser Error Message: Could Not Load Type 'Default'?

May 20, 2010

I have build an web application in Visual studio 2005. Its working fine in the loal. But When I upload the same web application in the remote server, It produces the error,Parser Error Message: Could not load type '_Default'. I have tried the rebuild solution, rebuild website, and rebuild project. But the error remains same.If any one came accross similer error and resolved the issue, Please help me to solve this issue.

View 1 Replies

Security :: Parser Error Message: Default Role Provider Could Not Be Found?

Aug 10, 2010

Can somone help me with this error?

Configuration Error
Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message: Default Role Provider could not be found.Source Error:

[Code]....

Source File: C:inetpubReaganweb.config Line: 43 Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 here is my web.config code for the provider

[Code]....

View 3 Replies

VS 2010 - Show Confirm Message When IMAGEFIELD In Grid Is Clicked

May 21, 2012

Looking to show a confirm message when an IMAGEFIELD in my grid is clicked...something like this:

btn1.Attributes.Add("onclick", "return confirm('Are you sure?')")

View 1 Replies

Content Of The Grid Has Changed In The Meantime And Follow Message In All Browsers(different In Every Browser)?

Aug 7, 2010

in a page that i have datagrid i see that if the content of the grid has changed in the meantime then occurs thwe follow message in all browsers(different in every browser)To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.and then if i click yes resends the last post that was sended

View 32 Replies

Error While Opening A Document In Custom Grid / The Message Received From The Server Could Not Be Parsed

Apr 1, 2010

I have a grid within another grid. In the detail grid I have image button for which I am giving the URL of documents in the source itself. On clicking on Image button, document can be opened for which I am using a Handler. The code for opening the document is written in the handler.This code is as below:

[code]....

The document can be opened when clicked on Image Button. but, the problem is taht after opening the document, I am unable to perform any other action in the grids.... Other actions like...selection in checkboxes(master grid contains few check boxes),other link buttons in detail grid....etc etc...I am getting the following errr:

PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled

This is because after opening any document,for any action again Handler is being called.

View 1 Replies

C# - Having Two Page_Load Without Overriding?

Jul 7, 2010

I have a class named PageBase inheriting from ASP.NET Page. I want to do something in PageBase's Page_Load.All pages in my application have their logic done on their Page_Load. I'm thinking of a way that Page_Load of both of PageBase and other pages run without having to override Page_Load in pages. Is it possbile?

View 1 Replies

How To Use MvcContrib Template Gallery For Mvc

Aug 25, 2010

Has any one ever downloaded and made use of the mvcContrib template gallery for asp.net mvc. I cant find where to download the templates from and there is no documentation for how to use it?

View 1 Replies

Overriding Alternatingrowstyle In Gridview

Feb 1, 2011

I have a GridView which uses the Alternatingrowstyle property, but I also would like to higlight each row when the user Edit the row, but using this code, it only highlights the rows that don't have the Alternatingrowstyle.

protected void gv_RowEditing(object sender, GridViewEditEventArgs e)
{
gv.Rows[e.NewEditIndex].BackColor = System.Drawing.Color.Yellow;
gv.EditIndex = e.NewEditIndex;
if (e.NewEditIndex % 2 == 0)
{
gv.Rows[e.NewEditIndex].BackColor = System.Drawing.Color.Yellow;
}
}

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved