asp.net - RadGrid Error is neither a DataColumn nor a DataRelation for table DefaultView -
i trying set primary key value datakeyname attribute in radgrid giving me cryptic error "cap_id neither datacolumn nor datarelation table defaultview." indeed primary key of table specify in radgrid. how can solve this?
<telerik:radgrid id="radgrid1" runat="server" allowpaging="true" allowsorting="true" cellspacing="0" gridlines="none" datasourceid="sqldatasourcecapabilities" autogeneratecolumns="true" autogeneratedeletecolumn="true" autogenerateeditcolumn="true" onpagesizechanged="radgrid1_pagesizechanged" onitemcommand="processthiscommand"> <clientsettings> <scrolling allowscroll="true" usestaticheaders="true" /> </clientsettings> <mastertableview datakeynames="cap_id" datasourceid="sqldatasourcecapabilities">
you must add primary key field of particular table in select query.
you can hide later using visible @ end of column.
<telerik:gridboundcolumn datafield="subject" visible="false">
Comments
Post a Comment