Hi,
Am facing a very strange issue, where i am using client side data binding and using a page method to return a business object.
When i use Autogenerate columns, the data is displayed fine. Where in, if i define the columns before hand and set AutoGenerateColumns to false, the data is not displayed.
Please find a screenshot here which I have taken when the autogeneratecolumn was set to true with three predefined columns.
Here is the aspx code:
Please let me know how to fix this, I am new to using client side databinding ...
Edited: I was using telerik v:527 trial and then tried with 2009.1.617.35, but same issue.
Regards,
Dheeraj Juneja
Am facing a very strange issue, where i am using client side data binding and using a page method to return a business object.
When i use Autogenerate columns, the data is displayed fine. Where in, if i define the columns before hand and set AutoGenerateColumns to false, the data is not displayed.
Please find a screenshot here which I have taken when the autogeneratecolumn was set to true with three predefined columns.
Here is the aspx code:
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head runat="server"> |
<title>Untitled Page</title> |
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript" language="javascript"> |
function pageLoad() { |
PageMethods.GetList(0, 5, updateGrid); |
} |
function updateGrid(result) { |
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView(); |
tableView.set_dataSource(result); |
tableView.dataBind(); |
} |
</script> |
</telerik:RadCodeBlock> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"> |
</telerik:RadScriptManager> |
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="True" |
GridLines="None"> |
<MasterTableView PageSize="5"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridBoundColumn DataField="ProjectName" HeaderText="Project Name" UniqueName="column"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ProjectID" HeaderText="Project ID" UniqueName="column1"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ClientID" HeaderText="Client" UniqueName="column2"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |
</div> |
</form> |
</body> |
</html> |
Please let me know how to fix this, I am new to using client side databinding ...
Edited: I was using telerik v:527 trial and then tried with 2009.1.617.35, but same issue.
Regards,
Dheeraj Juneja