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

where are the events?

4 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ralph
Top achievements
Rank 1
Ralph asked on 21 Jul 2010, 10:59 AM
hello

I needed some custom filter controls. So I created my own column-class:
public class GridColBound : GridBoundColumn

and created my own filter-control:
protected override void SetupFilterControls(TableCell cell)
 {
     base.SetupFilterControls(cell);
     cell.Controls.RemoveAt(0);
     Label _lbl = new Label();
     _lbl.ID = "FilterLabel" + this.DataField;
     _lbl.Visible = true;
     _lbl.Text = "Filter";
     _lbl.BackColor = System.Drawing.Color.Green;
     _lbl.ForeColor = System.Drawing.Color.White;
     _lbl.BorderColor = System.Drawing.Color.Black;
     _lbl.BorderStyle = BorderStyle.Solid;
     cell.Controls.AddAt(0, _lbl);
     cell.Controls.RemoveAt(1);
 }
...

Everything worked as expected, but: No more events are thrown. No ItemCommand, no RadToolBar1_ButtonClick.

What can I do?

thanks

Ralph


4 Answers, 1 is accepted

Sort by
0
Ralph
Top achievements
Rank 1
answered on 21 Jul 2010, 12:40 PM
Hello

almost.... i could resolve most issues by generating the grid in page_init and using EnableColumnsViewState = "false"  
But with one important exception: There is no UpdateCommand! I use custom editors with a "Save"-Button:
<asp:Button ID="btnUpdate" Text="Speichern" runat="server" CommandName="Update" Style="margin: 10px;"
        ToolTip="<%$ Resources:AppStrings, ToolTipSpeichern %>">
 </asp:Button>
but if I use my inherited columns and EnableColumnsViewState == "false" there is no UpdateCommand when I click it.

Ralph


0
Tsvetoslav
Telerik team
answered on 26 Jul 2010, 09:06 AM
Hello Ralph,

Could you paste your complete code-behind and aspx? What command are  you throwing and how - the fitlering one? Please, supply more details.

Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ralph
Top achievements
Rank 1
answered on 26 Jul 2010, 11:34 AM
Hello Tsvetoslav

sorry, we have dropped that code, because we decided to implement a custom filter-form. The Filter-bar of the grid is only used for visualization now, which works great.

thanks
Ralph
0
Regeesh Joseph
Top achievements
Rank 1
answered on 07 Aug 2010, 07:35 AM
Hai Raiph,

How you implemented that custom filtering. I want to call the filter command on clicking a button which is not in the grid. Is there any way?
Tags
Grid
Asked by
Ralph
Top achievements
Rank 1
Answers by
Ralph
Top achievements
Rank 1
Tsvetoslav
Telerik team
Regeesh Joseph
Top achievements
Rank 1
Share this question
or