This is a migrated thread and some comments may be shown as answers.

[Solved] Please Help me to set footer property setting and getting the set property to a button delegation method , which is not possible my this approach.

1 Answer 232 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
FIJO
Top achievements
Rank 1
FIJO asked on 23 Nov 2010, 05:30 PM


HI RAD Guys,
Thank for showing property settings .But my Client requirement is I have grid like this as I shown in  figure
“MyGridFooter1.JPG”. 

There might be frequent requirement of adding user to this grid so as of now we are adding the user in First row of the rad grid using normal red grid ADDITEM Method. But I cannot use this  that’s why I asked how can I set and get the values from footer  so that user need not scroll up and down to add new user instead he can add at footer. Like I tried in “MyGridFooter1.JPG”.  I thought a save button delegation will help me to send the already set values in footer to save button delegation. But I have briefly explained current behavior down.

Behavior Of property setting   (this  steps are same for text box and drop down so when you reply if there is any change I need to do for combo box please tell me)

Step 1:-

When you type your user name as a desired form and in  text lost  focus  it will call the property settings and set the value as you can see in the figure  “MyGridFooter2.JPG”.  Here Duplicate variable set the value I typed in Grid footer. Good (:-:),

Step 2:-

Please have look at “MyGridFooter3.JPG”,   “MyGridFooter4.JPG”,MyGridFooter5.JPG” 

Step 3:-

When I press save button you will see the public property Duplicate is null. Please have look at

“MyGridFooter6.JPG”

Step 4:-

Please have look at  these pictures also “Grid footer RAD PART.JPG “,”MyGridFooterRadPArt.JPG”

Q1)“Will  you please  tell me What I should do to get in save delegate click?”

 

Here is view model properties

#region Properties

 

        #region  Enabling Properties Setting And OnPropertyEvent Firing

        /// <summary>

        ///

        /// </summary>

        /// <param name="PassedPageObject"></param>

        /// <param name="ValueToset"></param>

        /// <param name="IsOnpropertyChangeName"></param>

        private void PropertySetting(Object PassedPageObject, object ValueToset, string IsOnpropertyChangeName)

        {

            SetValue(PassedPageObject, ValueToset, IsOnpropertyChangeName);

            OnPropertyChanged(IsOnpropertyChangeName);

 

        }

        #endregion  Enabling Properties Setting And OoPropertyEvent Firing

 

        #region Properties Variables

 

        #region Binding The Grid With UserList

        private IList<Authentication> usersListItems { get; set; }

        public IList<Authentication> UsersListItems

        {

            get

            {

                return usersListItems;

            }

            set

            {

                if (value != this.usersListItems)

                {

                    this.usersListItems = value;

                    this.OnPropertyChanged("UsersListItems");

                }

            }

        }

        #endregion Binding The Grid With UserList

 

        #region User Role list population For Coluimn Binding

        private IList<UserRole> projectUsersRoleListItems { get; set; }

        public IList<UserRole> ProjectUsersRoleListItems

        {

            get

            {

                return projectUsersRoleListItems;

            }

            set

            {

                if (value != this.projectUsersRoleListItems)

                {

                    this.projectUsersRoleListItems = value;

                    this.OnPropertyChanged("ProjectUsersRoleListItems");

                }

            }

        }

        #endregion User Role list population For Coluimn Binding

 

        #region User Role list population For Footer Binding

        private ObservableCollection<string> myUserRoles;

        public ObservableCollection<string> MyUserRoles

        {

            get

            {

                if (this.myUserRoles == null)

                {

                    this.myUserRoles = new ObservableCollection<string>() { "User", "Admin", "Super User", "Support" };

                }

 

                return this.myUserRoles;

            }

            set

            {

 

                myUserRoles = value;

            }

               

        }

        private string  currentUserRoleNameFotter { get; set; }

        public string CurrentFotterUserRoleName

        {

            get

            {

                return currentUserRoleNameFotter;

            }

            set

            {

                if (value != this.currentUserRoleNameFotter)

                {

                    this.currentUserRoleNameFotter = value;

                }

            }

        }

        #endregion  User Role list population For Footer Binding

 

        #region Footer TeammembernNameSettings

        private string userName = "FirstName.LastName";

        public string UserName

        {

            get

            {

                return userName;

            }

            set

            {

                if (value != this.userName)

                {

                    Duplicate = value;

                }

            }

        }

        #endregion Footer TeammembernNameSettings

 

        #region property to set Single Selection in grid

        //property to set Single Selection in grid

        public Authentication SelectedItem

        {

            get

            {

                return _selectedItem;

            }

            set

            {

                _selectedItem = value;

                this.OnPropertyChanged("SelectedItem");

            }

        }

        #endregion property to set Single Selection in grid

 

        #region property to set Multiple Selection in grid

        //property to set Multiple Selection in grid

        ObservableCollection<Authentication> _selectedItems;

        public ObservableCollection<Authentication> SelectedItems

        {

            get

            {

                if (_selectedItems == null)

                {

                    _selectedItems = new ObservableCollection<Authentication>();

                }

                return _selectedItems;

            }

        }

        #region Binding:-AddResourceClick ClicK

        public void BtnAddResourceClick(object obj)

        {

            string CurrentUserRoleName = Duplicate;

           

        }

        #endregion Binding:-AddResourceClick ClicK

        #endregion property to set Multiple Selection in grid

 

        public ObservableCollection<Authentication> ApplicationLevelUserList { get; set; }

        public ObservableCollection<Authentication> _editedAuthenticationList { get; set; }

        public ObservableCollection<Authentication> _NewEditedAuthenticationList { get; set; }

        public string Duplicate { get; set; }

        public Project NewCreateAndSelectedProject { get; set; }

        public static string ControlId { get; set; }

        public ObservableCollection<Project> ProjectListItems { get; set; }

        public string TeamMemeberName { get; set; }

        private Authentication _selectedItem { get; set; }

        public string CurrentUserRoleName { get; set; }

        public DelegateCommand<object> AddResourceClick { get; set; }

        //public bool UserName { get; set; }

        public int RowCount { get; set; }

        #endregion Properties Variables

     

 

        #endregion Properties

 

 

With Advance Thanks for solving this

Fijo Francis T

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 25 Nov 2010, 08:15 AM
Hello FIJO,

Why don't you try to set the ShowInsertRow property of the grid and add items through its functionality ? Once you click on that specific row, a new empty row will be displayed at the top of the grid. I believe this will be far more clean way for inserting new items.
 
Kind regards,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
FIJO
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or