12 Answers, 1 is accepted
Please try the following code snippet.Create the checkboxList in ItemCreated and bind its value in ItemDataBound event
parameter name: value.
its strange because i click on edit then appears the checkboxlist then i select the options , hit save, then edit again , select hit save and then error
i have added to your code the
// txt.Visible = false;on
then on itemcreated this:
CheckBoxList chkl = (CheckBoxList)data1.FindControl("CBLRole");
int p = 0;
for (p = 0; p <= chkl.Items.Count - 1; p++)
if ((chkl.Items[p].Selected) && (Roles.IsUserInRole(chkl.Items[p].Value))) // verifica se o user está nessa role , se nao tiver adiciona a role ao user
when i add a new role to the user if i try to edit user again i get that error, by the way is possible to show this error in a window popup wich catch or something , now i see because i'm on debug
checks.SelectedValue = DataBinder.Eval(item.DataItem, "RoleName").ToString();
I was not able to replicate the issue,the above code works fine at my end.
checks.SelectedValue = DataBinder.Eval(item.DataItem, "RoleName").ToString();maybe we have to add on RadGrid1_ItemCreated
also can be on this line
dr["Rolename"] = String.Join(", ", Roles.GetRolesForUser(mu.UserName));wich makes the role with ", "on grid view mode and when wents on edit mode it wont find a role wit the ", "
Based on your description it is hard to determine the cause of the problem. I have observed the exception on the video but it is not in English and I could not understand it. In such cases we recommend assembling a sample project showing the unwanted behavior so we could debug it and advice you with the best possible solution. You could upload the project on a public sharing service and provide us a URL.
Additionally, you could disable the ajax by setting the EnableAjax property to false to RadAjaxManager and RadAjaxPanel controls in order to observe where exactly the server exception is thrown. Note that if the problem is in the line where you use the DataBinder you could try casting the item.DataItem value to its actual type which could be checked while debugging and access the RoleName from it.
Parameter name: value
and its because is passing "" in text property but i cant understand why is passing empty.
what you mean where should i put the try?
maybe this line is not Reading well from datasource.
the problema is when we provide a sample i need a database with login that i dot have a test database, i could provide team viewer access
Your issue is not common and without providing a sample project we could not further investigate the problem and find the cause of the problem. Note that you could remove your database logic and replace it with a dummy DataTable object. Additionally, you could go through the steps for simplifying a project described in the article below to help you throught the process:
As described in the previous post we could not further investigate the issue without a sample runnable project showing the unwanted behavior. Additionally, only customers with DevCraft Ultimate license have a Remote Web Assistance provides as a service as shown in the link below.