We are able to reproduce the problem at our end after binding empty dataSource to the Grid. The Grid will define the column type based on the value present in the first record of the data bound to the Grid. We have already discussed about this problem and its solution in the following KB.
Refer to the following code example and define the column type if the dataSource bound to the Grid is empty.
<ej:Grid ID="FlatGrid" runat="server" AllowScrolling="true" AllowFiltering="true" AllowSorting="true" AllowTextWrap="true">
<ej:Column Field="OrderID" Type="number" HeaderText="Order ID" TextAlign="Right" Width="90" />
<ej:Column Field="CustomerID" Type="string" HeaderText="Customer ID" Width="150" />
<ej:Column Field="EmployeeID" Type="number" HeaderText="Employee ID" TextAlign="Right" Width="100" />
. . . . . .
protected void Page_Load(object sender, EventArgs e)
We have prepared a sample that can be downloaded from the following location.
If you are still facing any problem, please share the following information to replicate the issue.
1) You have mentioned the columns were dynamically. Can you please explain scenario and code for dynamic render of Columns?
2) Code example of Grid and customized scripts
3) If possible, modify the attached sample and replicate the issue.
Seeni Sakthi Kumar S.