Hi staff,
i have a big problem. I can't read a cell value.
I use infragistics 13.1, framework 4.0
I have the event: grd1_RowSelectionChanged [grd1: name of ultrawebgrid]
i've tried with this codes:
mytextbox.Text = Me.grd1.Rows(0).Items(0).Value.ToString
mytextbox.Text = me.webdatagrid1.behaviors.selection.selectedrows(0).dataitem("status").tostring
mytextbox.Text = e.CurrentSelectedRows(0).Items(0).Text.ToString
but i have this error: An object reference not set to an instance of an object.
can someone help me?
Thanks.
i bind my grid only once on the page load:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack ThenCall LOAD_GRID()End If
but EnableDataViewState propriety is True.
The grid's propriety are default, except "Columuns" (i don't autogenerate column). Ajax is enabled...
Hi Marco,
Please note that you have to rebind the grid using the DataBind method on each page load or if you are binding only once, set EnableDataViewState property to true.
Let me know if this helps.
Thanks for answering Nikolay, i still have that nullreferenceexception problem.
I'm using WebDataGrid, version 13.1.20131.1012,
thank for now.
Hello Marco,
Thank you for posting in our forum.
Your code seems to be correct. I'm not sure why the exception may be thrown. Just to clarify - are you using WebDataGrid and not UltraWebGrid, is that correct? What is the exact version you are using?
So, there is no way?