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.
So, there is no way?
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?
Hi Marco,
I am attaching a small sample that replicates your scenario - the textbox value is changed on row selection of the grid. Note that EnableAjax should be set to false in order for the textbox to be updated. Please have a look at the sample and let me know if you have any questions.
in your scenario, you have used infragistics v.13.2, in this PC i have 13.1.
Exhaust v.13.2 and i will try your scenario.
Thank you for now, you're very kind.
However, your code is similar to my.
Now it works!
Thank you Nikolay. When you told me "set EnableDataViewState property to true", i confuse EnableViewState with EnableDataViewState.
EnableViewState was set to true, but EnableDataViewState to false. That was the problem!
Thank you, you were very kind.
I'm glad you managed to resolve your issue.
If you have any other questions or concerns, please don't hesitate to ask.