Dec 21, 2015, 6:58 AM
Using the response from DirectMethod in Renderer function
Hi! Help me, please!
I have the DirectMethod. This method return the full username in string format
P.S. Excuse me for my bad english...
I have the DirectMethod. This method return the full username in string format
[DirectMethod]
public string GetFullDeclarantInfo(string user) // user = "D0\IVANOV_AA"
{
string trimDomain = @"D0\";
SearchResult info = ADHelper.GetUserInfoByLogin(user.Trim(trimDomain.ToCharArray()));
DirectoryEntry result = info.GetDirectoryEntry();
return result.Properties["description"].Value as string; // "Ivanov Anton Antonovich"
}
I have GridPanel with Column for full usernames. I call Renderer function "declarantRenderer" for setting those usernames in each cell<ext:Column runat="server"
DataIndex="DECLARANT_NAME"
Text="ЗаÑвитель"
Flex="1">
<Filter>
<ext:StringFilter />
</Filter>
<Renderer Fn="declarantRenderer"/>
</ext:Column>
And it is my Renderer functionvar declarantRenderer = function (value) {
parent.App.direct.GetFullDeclarantInfo(value, {
success: function (result) {
return result;
}
});
return result;
};
What wrong? Why I am getting empty cells? Help me, please..P.S. Excuse me for my bad english...