Telerik Forums
UI for Silverlight Forum
13 answers
227 views
We wrote a custom format columns dialog that allows users to add/hide columns.

This code functioned prior to our upgrade to the latest release.  Was it a new issue introduced?

using (this.RadGridView.DeferRefresh())  Getting an error with latest release of controls:
            {
            this.RadGridView.SortDescriptors.Clear();
            this.RadGridView.SortDescriptors.Add(new SortDescriptor()
                                                     {
                                                         Member = Common.sort.PropertyName,
                                                         SortDirection = Common.sort.Direction
                                                     });
  
            foreach (var column in this.RadGridView.Columns)
            {
                if (column.Header.ToString() != string.Empty && column.Header.ToString() != CommonStringLibrary.HeaderName)
                    column.IsVisible = false;
            }
  
            int index = 1;
            foreach (var item in this.Visibles)
            {
                var temp = item; // work around closure issue.
                var column = this.RadGridView.Columns.FirstOrDefault<GridViewColumn>(c => c.UniqueName == temp.Id);
                if (column == null)
                    throw new ArgumentException(string.Format("Unable to find a column with UniqueName {0}.",
                                                              temp.Id));
  
                column.DisplayIndex = index++;  <---- Error is here.
                column.IsVisible = true;
  
  
            }
        }
Stefan
Telerik team
 answered on 25 Jul 2018
1 answer
40 views

Dear Team, My scenario is: There are two table one is product master where product_code and product_description and productlinking master where product_code and linking_code fields available. Now, I want to select product code in RadGridComboBoxColumn (it will be loaded from productmaster table) and another RadGridComboBoxColumn will load their linking code from productlinking table. 

I am trying this but when product code changed all column value of linking code loaded with current product code values.

Product Code     Linking Code

Product A           Link 1

Product B           Link 2

Product C           Link 1

but I changed the product A to C then all linking code showing blank and then showing only Link 1 for all Product A, B & C.

 

Pravin
Top achievements
Rank 2
 answered on 23 Jul 2018
16 answers
625 views

Sir,
        I am using silverlight 2010 telerik RadGridView. I am customizing grid view and put two simple buttons for Edit and Delete for opening  separate Forms for editing and deleting.

Kindly you can tell me how to mark row as selected when I am clicking on buttons unfortunately when I am clicking on button the raw was not marks as selected.

 

 

Piotr
Top achievements
Rank 1
 answered on 13 Jul 2018
7 answers
1.0K+ views
Hi,

In Q1 version, for filtering the grid on text (search as you type) - I was following the FilterDescription derived class with overridden method bool SatisfiesFilter(object dataItem); It uses the UniqueName on columns as property for search. This version was apprently using the getting the property information emitted through reflection on these dynamic types. It was working just fine. But in Q2 version, FilterDescription has become obsolete. I used the latest code provided in Telerik example using FieldDescriptor. The method CreateFilterExpression(ParameterExpression parameterExpression) throws argument exception (Invalid property or field) on the same set of data loaded on the grid.
Am I supposed to not use CreateFilterExpression method and provide my own implementation, or is there something I am not doing right?

Thanks in advance,
Jitin
Vladimir Stoyanov
Telerik team
 answered on 28 Jun 2018
24 answers
414 views
Hi Support,

In my grid view I am displaying a large strings in one column, SO when user tries to filter it,Filter Drop down almost covering the whole grid width, SO i just want to fix filter drop down width, with a horizontal scroll bar. I tried the below code, but it actually fixing width of column header .
And another important thing is that i want do it in loading time only.

foreach (GridViewHeaderCell hc in gvData.ChildrenOfType<GridViewHeaderCell>())
           {
               if (hc.Column.UniqueName == "ATU")
               {
                   var fdd = hc.ChildrenOfType<FilteringDropDown>()[0];
                   //.
                   MessageBox.Show(fdd.ActualWidth.ToString());
                   fdd.Width = 15;
               }
 
           }
Thanks...
Martin Ivanov
Telerik team
 answered on 21 Jun 2018
5 answers
316 views
I there any way we can automatically adjust the column width when the user double clicks on the splitter in column. Currently the user has to select the splitter and drag in order to size it.
Stefan
Telerik team
 answered on 12 Jun 2018
11 answers
160 views
Hi,

How can I enable the end user to be able to resize row heights?

Thanks,
Geoff.
Vladimir Stoyanov
Telerik team
 answered on 30 May 2018
10 answers
306 views
Everything just aligns to the left.

                    <telerik:GridViewDataColumn  Header="Date" DataMemberBinding="{Binding EntDate, Converter={StaticResource NQtoDateTime}}" DataFormatString="{}{0:d}" TextAlignment="Right">

I saw someone had a similar problem, and closed their IDE and it worked.  I'm using XP.  HeaderTextAlignment, or TextAlignment doesn't work on all of my girds now.  I know they used to work. I'm using internal builds .801 and .815 and .823 didn't work.  Maybe there's something I'm missing?

Stefan
Telerik team
 answered on 18 May 2018
16 answers
1.0K+ views
I have a RadGridView bound to a table that has numeric values in a string column.  When I sort, it sorts alphabetic rather than numeric.  For example, say the values are 

"1000"

 

 

, "1001", "1002", "159", "17", "13"

it will sort in this order:

1000

1001

1002

13

159

17


I tried doing a custom sort, but I am stuck on how to convert the column to int on the fly.  Any help is appreciated.

Thanks,
Vladimir Stoyanov
Telerik team
 answered on 10 May 2018
2 answers
147 views

Hi Team,

I'm using telerik grid in one of my windows form. First column is a GridViewCheckBoxColumn and it has checkbox in the header column as well and user can check/uncheck every row manually either by clicking on the checkbox or anywhere on the row(I've written code on the CellClick event to check/uncheck the checkbox). The header checkbox behaves fine if I check/uncheck the row's checkbox but if I click on row it won't check/uncheck the header checkbox. Below is the code written in Cellclick event of the grid:

private void dgvManageBill_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    if (e.RowIndex >= 0 && dgvManageBill.CurrentRow != null)
    {
        if (e.Column.Name != "columnSelectAll")
        {
            dgvManageBill.CurrentRow.Cells["columnSelectAll"].Value = !Convert.ToBoolean(dgvManageBill.CurrentRow.Cells["columnSelectAll"].Value);
        }
    }
}

 

I thought of accessing the row's checkbox object and then setting its checked state instead of setting the cell value but I'm unable to find the checkbox in the cell. Is there any other way to achieve above requirement? I've been stuck on this quite a long now, will really appreciate some help!

Thanks

Amit

 

 

 

Amit
Top achievements
Rank 1
 answered on 10 May 2018
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?