Hi
Thanks for your words .
Actually my problem for accessing the datakey field is solved . I went through the verious post of this forum and in one place I found a sample given by you on how to work with RowCreated()event of the gridview control .
I have two things to ask you :-
1.) I am using web services to retrive data from database and then I am binding it to grid . Now asp.net ajax by default uses json format for data exchange . Will json fail in serializing and deserializing the data if I try to record which is of type uniqueidentifier .
2.) I am following the samples given in the codeplex site for understanding how ajaxdatacontrols work . Examples given for gridview control which include pagination has a peice of code something like this :-
if ((list.Count == 0) || (total == 0))
{
return null;
}
PagedResult<Employee> result = new PagedResult<Employee>();
result.Rows = list;
result.Total = total;
return
result;
where list contains the record returned from database . Now if there is no record the returned value is null . So when I tried to bind it to the gridview control in my aspx page ie
pager.set_recordCount(result.Total);
gridView.set_dataSource(result.Rows);
gridView.dataBind();
I was getting error saying Total is either undefined or null .
what i did was as a fix rather than returning null i simply returned result object inside if block .
I dont know whether I have overlooked something but I will appreciate if you can let me know what was the main reason behind returning null and also if in some case we have to return null how it will be handled in aspx page while databinding .