Hi Avi,
We are unable to reproduce the problem at our end with the provided information. We have also prepared a sample in the VB that can be downloaded from the following location.
We could also see Columns Syntax is incorrect in your code snippets. Please define the column name in the “Field“ property of Grid Columns.
Refer to the following code example.
Dim gridbuilder = Html.EJ().Grid(Of Object)("SampleGrid")
gridbuilder.Datasource(DirectCast(ViewBag.datasource, IEnumerable(Of [Object])))
gridbuilder.AllowPaging() 'Paging Enabled
. ..
. ..
gridbuilder.Columns(
Sub(col)
col.Field("OrderID").HeaderText("Order ID").Add()
col.Field("EmployeeID").HeaderText("Employee ID").Add()
col.Field("CustomerID").HeaderText("Customer ID").Add()
.. .
. .
End Sub)
gridbuilder.Render() |
Please share the following information along with the information request in our previous update to analyze the issue and provide you solution as early as possible.
1) Complete Stacktrace of the exception
2) Code example of the entire Grid and Code behind
3) You have quoted that you are looping through the data for assigning the DataSource to the Grid. For exporting, how the dataSource has been assigned to the Export public method.
Regards,
Seeni Sakthi Kumar S.