Button in a column - Creates a null reference exception in prerender

1 reply. Last post: April 9, 2012 12:06 AM by Hans Kristian
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
berk kurtMember

I have a button in a webgrid as a column and its code like below:

<ISWebGrid:WebGridColumn runat="server" Bound="False" ButtonAutoPostback="true" 
 Width="40px" EditType="NoEdit" ButtonText="qweqwe" DataMember="Id" DefaultValue="0"
 ButtonImage="/Style/Images/tick.png"  ColumnType="ButtonImage" NewRowEditType="NoEdit" 
 ButtonPostbackMode="OnTheFly" Name="Id"></ISWebGrid:WebGridColumn>

 As you can see, I've tried all I can think of but none of them helped me.

Problem is, when I create a new item in the grid; the item is created successfully but after the creation; a pop-up screen appears and says a null reference exception is occured in the data binding to the webgrid.


When I remove the column, everything is ok.

And when I don't remove the column, eventhough it says a null ref exception is occured; after a refreshing the screen; I can see the item is created successfully and including the newly created item, every item is bind into the webgrid.


I would love if anybody could diect me into the right direction.

Thanks.


Info: The binding and the creation is by default and no override is included and linqdatasource is used for the data and given as a DataSourceId="dsSomething" in ascx page.

All times are GMT -5. The time now is 11:49 PM.
Previous Next