Skip to content

Replies

0
Cuong Tran
Cuong Tran answered on Mar 15, 2016 6:49 PM

thank you very much for your helper

here is my code from your sample code

$(function () {
$("#grid").igGrid({
columns: [
{ headerText: "ID", key: "ProductID", dataType: "number", width:"50px" },
{ headerText: "Product Name", key: "Name", dataType: "string", width:"200px", hidden: false },
{ headerText: "Make Flag", key: "MakeFlag", dataType: "bool", width:"80px" },
{ headerText: "Sell Start Date", key: "SellStartDate", dataType: "date", width:"350px" },
{ headerText: "Price", key: "ListPrice", dataType: "number", width:"100px" },
],
autoGenerateColumns: false,
autofitLastColumn : true,
autoCommit:true,
dataSource: adventureWorks ,
width: "1000px",
height: "600px",
primaryKey: "ProductID",
features: [
{
name: "Updating",
editRowEnding: function(evt, ui){
$.ajax({
url: "http://www.igniteui.com/data-files/adventureworks.min.js",
}).done(function(data) {
ui.values["Name"] = "NEW VALUE";
});
}
}]
});
});

the cell was not changed after the ajax request was completed

if i used the setcellvalue method then it works ok. but when i hide that column. it threw error "The specified record or property was not found. Verify the criteria for your search and adjust them if necessary."

can you give me some solution to resolve this problem?

thanks you very much!

0
Cuong Tran
Cuong Tran answered on Mar 15, 2016 8:05 AM

hello

because i have an ajax function within the event. so after the ajax function completed. i set value for coulmn. it throws that error

0
Cuong Tran
Cuong Tran answered on Apr 23, 2015 8:21 AM

thanks you very much. it is very helpful

0
Cuong Tran
Cuong Tran answered on Nov 27, 2014 3:40 PM

i use 14.1 version

thanks for help,

i use Unbound column and .formula function, it done!!

thanks you so much!!

0
Cuong Tran
Cuong Tran answered on Nov 20, 2014 3:35 AM

thanks for helps,

if i use 'FormatterFunction', how can i get other column of gridview??

because it recieve 1 parameter

0
Cuong Tran
Cuong Tran answered on Nov 19, 2014 2:43 AM

please!

it not working

my code:

<div>
<h4>Pending Buy Transactions</h4>
@(Html.Infragistics() _
.Grid(Of TPG.WebPortfolio.Models.sp_webGetPortfolioOpens_Results)() _
.ID(“grdPortfolioOpen” + item.oPortfolio.ctintCustomerSetupID.ToString()) _
.Width(“100%”) _
.AutoGenerateColumns(False) _
.AutoGenerateLayouts(False) _
.RenderCheckboxes(True) _
.Columns(Sub(column)
column.For(Function(x) x.TransNo).Width(80).HeaderText(“Transaction ID”)
column.For(Function(x) x.CusipID).HeaderText(“CUSIP”).Template(“<a href=’#’ onclick=’openCusipDetail(“”${CusipID}””, 0, “”${PortfolioID}””)’>${CusipID}</a>”).Width(70)
column.For(Function(x) x.BuyAmount).HeaderText(“Original Face”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.BuyPrice).HeaderText(“Price”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.SettlementDate).HeaderText(“Settlement”).DataType(“date”).Format(“MM/dd/yyyy”)
column.For(Function(x) x.TradeDate).HeaderText(“Trade Date”).DataType(“date”).Format(“MM/dd/yyyy”)
column.For(Function(x) x.fsstrDescription).HeaderText(“FAS 115”)
column.For(Function(x) x.amstrDescription).HeaderText(“Accounting Method”)
column.For(Function(x) x.ParValue).HeaderText(“Par Value”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.Principal).HeaderText(“Principal”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.Interest).HeaderText(“Interest”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.NetCostsOrProceeds).HeaderText(“Net Costs Or Proceeds”).DataType(“number”).Format(“#,##0.00”)
column.For(Function(x) x.CreatedUser).HeaderText(“Created By”)
column.For(Function(x) x.CreatedDate).HeaderText(“Date Created”).DataType(“date”).Format(“MM/dd/yyyy”)
column.For(Function(x) x.Actions).HeaderText(“Actions”).width(100).Formatter(“CheckPermission”)
column.For(Function(x) x.PortfolioID).hidden(True)
End Sub) _
.Features(Sub(features)
features.Paging().PageSize(10)
End Sub) _
.DataSource(item.oPortfolioOpen) _
.DataBind() _
.Render()
)
<script type=”text/javascript”>
$(function () {
var strName = “#grdPortfolioOpen” + @item.oPortfolio.ctintCustomerSetupID.ToString();
$(document).delegate(strName, ‘@(“iggrid” & Infragistics.Web.Mvc.GridClientEvents.HeaderCellRendered.ToLower())’, function (evt, ui) {
$(ui.th).css(“text-align”, “center”);
$(ui.th).css(“text-decoration”, “underline”);
});
$(document).delegate(strName, ‘@(“iggrid” & Infragistics.Web.Mvc.GridClientEvents.DataRendered.ToLower())’, function (evt, ui) {
ui.owner.element.find(“tr td:nth-child(1)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(2)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(3)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(4)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(5)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(6)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(7)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(8)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(9)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(10)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(11)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(12)”).css(“text-align”, “right”);
ui.owner.element.find(“tr td:nth-child(13)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(14)”).css(“text-align”, “left”);
ui.owner.element.find(“tr td:nth-child(15)”).css(“text-align”, “center”);

ui.owner.element.find(“tr td:nth-child(2)”).css(“text-decoration”, “underline”);
ui.owner.element.find(“tr td:nth-child(15)”).css(“text-decoration”, “underline”);
});
});

function CheckAction(value, row){
return row[“CusipID”];
}

</script>
</div>

my error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: ‘Formatter’ is not a member of ‘Infragistics.Web.Mvc.GridColumnWrapper(Of TPG.WebPortfolio.Models.sp_webGetPortfolioOpens_Results)’.

Source Error:

Line 244: column.For(Function(x) x.CreatedUser).HeaderText("Created By")
Line 245: column.For(Function(x) x.CreatedDate).HeaderText("Date Created").DataType("date").Format("MM/dd/yyyy")
Line 246: column.For(Function(x) x.Actions).HeaderText("Actions").width(100).Formatter("CheckPermission")
Line 247: column.For(Function(x) x.PortfolioID).hidden(True)
Line 248: End Sub) _

 

my data worked fine, but the grid is not working

0
Cuong Tran
Cuong Tran answered on Nov 18, 2014 7:59 PM

can you help me!!

i want to call function from column of gridview to handle process value of column, i am used to FormatterFunction but it can be only 1 paremater, i want to get other column of gridview

my code:

column.For(Function(x) x.Actions).HeaderText("Actions").width(100).Formula("CheckAction")

function CheckAction(data,grid){
                        return data["CusipID"];
                    }

it not work