I looked at your example online and I guess IG couldn't get it to work either because the code behind is commented out:
http://ko.infragistics.com/products/aspnet/sample/data-grid/sorting-with-unbound-column
I'm using Ultimate 12.2.20122.2054.
Please advise.
Thank you,
Mike
Hello Mike,
I have attached the sample that demonstrates sorting webdatagrid unbound column. Please note that I have removed ig_res and app_data folder that contains northwind access database due to size restriction. You need these inorder to run the sample successfully.
Please let me know if you have any further questions regarding this matter.
Hi, Prabha. Thanks for the response.
That's nice in theory, but it doesn't work. I already have that code in place.
Here's the thing: I have 2 WDG's on the page. The second grid's datasource depends on a datakey in the first WDG. I am unable to bind the second WDG's datasource in the page's "Load" event because access the first WDG's datakey is not available in the "Load" event. So I'm binding the second WDG's datasource in it's "ColumnSorted" event, because in that event I do have access to the first WDG's datakey.
I was able to get the datakeyfields value using the following code in the page load event . Were you trying the same thing?
this.WebDataGrid1.DataKeyFields.ToString();
Prabha,
I don't need the names of the key fields, I need the value of them for the currently selected row.
You can get the value of the datakeyfields of the currently selected row like below in the server side rowselection changed event.
e.CurrentSelectedRows[0].Items.FindItemByKey("id").Text.ToString();
If you are trying to accomplish something different than this, please let me know the details briefly I will be gald to help you.
Hi, Prabha.
I wanted to get the values at page load time, not on RowSelectionChanged, so there is no eventargs ("e").
As a reminder, I have two WebDataGrids. The second grid's contents relies on the first grid's currently selected row.
No problem, I changed up my app and am doing more work in RowSelectionChanged than I wanted, but it works. It's just a little slower.
I'll close this out.
P.S. I am going to start another thread about not being able to filter a column whose data type is "Double".