In Radzen Studio, it was simple to invoke a method to call a table in a database, then you could apply a filter to it.
I am currently trying to learn how to accomplish the same tasks from Radzen Studio in Radzen Blazor Studio.
Here is an example. I have extended the AspNetUsers table to include a column called AccountID which is an integer
I have a table called Stores that has the AccountID, StoreID and StoreName
I have a dropdown that lists the StoreNames and I want to only show Stores associated with a specific account.
This was easily accomplished in Radzen Studio, and I can see where it is called in Radzen Blazor Studio, but not sure how to change it. I believe it is the args.Filter portion of the above line. I know I need to use LoadData, but not sure where I can find documentation to help me with this.
I know you guys don't want to spend a ton of time teaching a person new to RBS how to do these simple tasks, so I just was hoping someone could point me to where I can read some documentation and apply it.
OData is used only in WebAssembly in both Radzen IDE and Radzen Blazor Studio. If you plan to copy code from Radzen IDE to RBS make sure the application types are same.
Ok, so I have switched to Blazor Server application. The filter operation is still not working for this case. I am trying to filter the values available in a drop down.
In Radzen Studio I have assigned each user an account number (this value is stored in AspNetUser table)
I have a table that has a list of stores assigned to each account number.
When the user logs in, he is presented a list of stores in the main layout that are filtered by the account number from AspNetUsers
I accomplished this by assigning the account number in the AspNetUser table to a global variable and then used that global variable to filter the Stores table for display in the dropdown. I then store the store number in a second global variable which is then used to filter all the other data in the application by account and store number.
Following is the generated filter from Radzen Studio that does not work in RBS. Also with this, your support for Global Variables is either different in RBS or not supported...not sure on that...but can you tell me how this query differs?
I'm stumped....All I am trying to do at this point is assign a column value in AspNetUsers to a parameter so that I can filter a dropdown in my main layout.
I can manually set the filter, but If I try to set my variable (accountID) to Security.User.AccountID (I extended AspNetUsers to include AccountID.
RBS lets me assign Security.User.AccountID to a RadzenNumeric but it when I try to assign it to predefined variable, it won't pass the value.
I can replace accountID in the Filter with any number and it filters fine, but I can't get the value of Security.User.AccountID into a usable parameter...
How do I access and assign a value from Security.User?
That's fine...I just simplified the filter while I was testing. What I am trying to do is get a value from Security.User and assign it to a paramater.
In Radzen Studio I can assign a variable with a value like this
protected long accountID = 0;
then with that initialized, I can assign Security.User.AccountID to it, like this
accountID=Security.User.AccountID;
then the filter can use that accountID to filter by, this allows me to have a dropdown of stores that are assigned to that account number. The following line works fine in Radzen Studio
Yes, it stays at the original value of 0 and does not pick up the correct value from AccountId in the AspNetUser table. Interestingly...if I put a Radzen Numeric box on the Layout next to the drop box and assign Security.User.AccountID it registers the value properly. It just won't work in the accountID paramenter...so RBS sees the AccountID correctly from AspNetUsers, I just can't assign it to anything...
Can you create a test application, extend the AspNetUsers to include a column called AccountID (long) and the try to assign Security.User.AccountID to a variable and see if it works for you?
Can you clarify how exactly you extended AspNetUsers with this additional property and where the property value is populated. Your code that is assigning the from the property to variable is correct however most probably the property value itself is not.
Still unclear where the value of this field is populated. I’m not sure also what is the issue you are reporting. Please debug carefully your application.