Hi,
I am new to this forum, Please tell the solution to this issue?
I am using Ultrawebgrid , directly it have one datasource value. Can i change the datasource at runtime, ?
1. Ultrawebgrid have a lot of controls, i want get the value of the particular row..?For Example : one column have webnumeric control , i want to
get the value of the particular row value...
Each column have EditcontrolId, how can i assign the value to the controls?
With Regards,
Raji
1. Can i change the datasource at runtime, ?
Yes, you can, But you have to take care of column names that are already assigned. (or) You can change the grid layout dynamically based on requirements.
2. i want get the value of the particular row..?
row.Cells.FromKey(ColumnName).Text
row.Cells.FromKey(ColumnName).Value
3. Each column have EditcontrolId, how can i assign the value to the controls?
You assign the value to columns using following syntax. Editor controls also renders the same data.
ColumnName.BaseColumnName = "DataSourceColumnName";
In case If you are doing any kind of customization you can handle row initializa event.
Hope this will help you.
Thanks,
Kedar.
Thanks for your quick respone,
If i assign the value to the cell, after postback the data is not shown in that cell.
structure is, col1,col2,result [this is the ultrawebgrid column]
col1*col2 = result.
10 10 100
when i click the button the calculation will updated in the cell,after clicking some event [postback]. values not shown in the cell
pl tell me how to solve this issue?
I've never seen "grid.DisplayLayout.Rows". I use "grid.Rows".
Thank u for your quick response,
If i use grid.row, after refresh the page the value is not shown in the grid.
how to solve this issue
with regards,
raji
I'm not sure, but my understanding is that by default, a grid re-databinds itself each time it posts back. If you have unbound, calculated fields, you may need to recalculate them every time you postback.
I have a checkbox column in UltraWebGrid. I want assign string value for one of the cell of that column. e.g. N/A.
How can I do that? Is it possible?
Please Help....
Thanks
AFAIK, you can't do that with a checkbox column, but you could implement a templated column with a label and a checkbox, and then show one and hide the other as applicable (in your InitializeRow event, I think).