11 Answers, 1 is accepted
0
Accepted
Hello Jeongmin,
Thank you for contacting us.
You can show a custom popup by creating your own GridBrowseEditor. Then you can customize the behavior when the button is in the editor is clicked. A sample implementation of the editor looks like this:
And the usage:
You can do whatever suits your needs best in the InitializeDialog and OnBrowseButtonClick methods.
Hope this helps, if you have any other questions or comments, please let me know.
Regards,
George
Telerik
Thank you for contacting us.
You can show a custom popup by creating your own GridBrowseEditor. Then you can customize the behavior when the button is in the editor is clicked. A sample implementation of the editor looks like this:
public
class
MyBrowseEditor : GridBrowseEditor
{
protected
override
RadElement CreateEditorElement()
{
return
new
MyRadBrowseEditorElement();
}
}
public
class
MyRadBrowseEditorElement : GridBrowseEditorElement
{
protected
override
void
InitializeDialog()
{
return
;
//base.InitializeDialog();
}
protected
override
void
OnBrowseButtonClick(EventArgs e)
{
return
;
//base.OnBrowseButtonClick(e);
}
}
And the usage:
void
grid_EditorRequired(
object
sender, EditorRequiredEventArgs e)
{
bool
isGridBrowseEditor = e.EditorType ==
typeof
(GridBrowseEditor);
if
(isGridBrowseEditor)
{
e.EditorType =
typeof
(MyBrowseEditor);
e.Editor =
new
MyBrowseEditor();
}
}
You can do whatever suits your needs best in the InitializeDialog and OnBrowseButtonClick methods.
Hope this helps, if you have any other questions or comments, please let me know.
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Mahsan
Top achievements
Rank 1
answered on 29 Dec 2013, 07:16 AM
Hello George
I had the same question like Jeongmin and your reply was work for me too, but I have 3 "GridViewBrowseColumn" in my grid that for 2 of them I want
to pop upa custom windows(which 2 custom windows are different) and for the third one I dont want to make any changes .please help me to make a
custom GridViewBrowseColumn .In addition I have a lot of grid like this in different forms which GridViewBrowseColumns need to pop up different forms
thank you
I had the same question like Jeongmin and your reply was work for me too, but I have 3 "GridViewBrowseColumn" in my grid that for 2 of them I want
to pop upa custom windows(which 2 custom windows are different) and for the third one I dont want to make any changes .please help me to make a
custom GridViewBrowseColumn .In addition I have a lot of grid like this in different forms which GridViewBrowseColumns need to pop up different forms
thank you
0
Hello Mahsan,
Thank you for contacting Telerik Support.
It is necessary to determine which custom pop up should be displayed according to the current GridViewBrowseColumn. Here is a sample code snippet, demonstrating how to show three different pop ups, depending on the currently editing cell's column:
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for contacting Telerik Support.
It is necessary to determine which custom pop up should be displayed according to the current GridViewBrowseColumn. Here is a sample code snippet, demonstrating how to show three different pop ups, depending on the currently editing cell's column:
public
Form1()
{
InitializeComponent();
GridViewBrowseColumn column1 =
new
GridViewBrowseColumn(
"First Browse Column"
);
this
.radGridView1.Columns.Add(column1);
GridViewBrowseColumn column2 =
new
GridViewBrowseColumn(
"Second Browse Column"
);
this
.radGridView1.Columns.Add(column2);
GridViewBrowseColumn column3 =
new
GridViewBrowseColumn(
"Third Browse Column"
);
this
.radGridView1.Columns.Add(column3);
this
.radGridView1.EditorRequired += radGridView1_EditorRequired;
}
private
void
radGridView1_EditorRequired(
object
sender, EditorRequiredEventArgs e)
{
GridViewEditManager editManager = sender
as
GridViewEditManager;
bool
isGridBrowseEditor = e.EditorType ==
typeof
(GridBrowseEditor);
if
(isGridBrowseEditor)
{
e.Editor =
new
MyBrowseEditor(editManager.GridViewElement.CurrentColumn.Name);
}
}
public
class
MyBrowseEditor : GridBrowseEditor
{
private
string
editorColumnName;
public
MyBrowseEditor(
string
columnName) :
base
()
{
this
.editorColumnName = columnName;
}
protected
override
RadElement CreateEditorElement()
{
return
new
MyRadBrowseEditorElement(editorColumnName);
}
}
public
class
MyRadBrowseEditorElement : GridBrowseEditorElement
{
private
string
editorElementColumnName;
public
MyRadBrowseEditorElement(
string
editorColumnName) :
base
()
{
this
.editorElementColumnName = editorColumnName;
}
protected
override
void
OnBrowseButtonClick(EventArgs e)
{
//base.OnBrowseButtonClick(e);
if
(editorElementColumnName ==
"First Browse Column"
)
{
new
FirstForm().Show();
}
else
if
(editorElementColumnName ==
"Second Browse Column"
)
{
new
SecondForm().Show();
}
else
{
new
ThirdForm().Show();
}
}
}
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Mahsan
Top achievements
Rank 1
answered on 07 Jan 2014, 08:53 AM
Hello Desislava Thank you for the reply, I do it and It works.but know I have another question, I have a grid in which has a column for part code, the user must be able to select partcode so I decided to use GridViewMultiComboBoxColumn the MultiComboBox show 4 column,PartId,PartCode,PartName,UnitName and Descr (Part Id Is Invisible),by default user can filter the MultiComboBox by PartCode ,but the user needed to be able to filter it by PartName or UnitName or Descr ,so by using EditorControl_CustomFiltering () and
getting the CurrenColumn of the RadMultiColumnComboBoxElement I set the filter maually ,so when the user click on each column of the MultiComboBox he can change the filter.
This solution works for me but I want to have stronger and more flexible filtering for GridViewMultiComboBoxColumn as the result of this I
want to use GridViewBrowseColumn and open a Searchform OnBrowseButtonClick() which in Searchform is a grid and the grid shows parts information (PartId,PartCode,PartName,UnitName and Descr (Part Id Is Invisible)) so in this form user can make complex and nested filtering and at last select a partcode
but I dont know how return the information of selected partcode to the main form and I want to bound the GridViewBrowseColumn
with part
.please help me to solve this problem.
Best Regard,
Mahsan
getting the CurrenColumn of the RadMultiColumnComboBoxElement I set the filter maually ,so when the user click on each column of the MultiComboBox he can change the filter.
This solution works for me but I want to have stronger and more flexible filtering for GridViewMultiComboBoxColumn as the result of this I
want to use GridViewBrowseColumn and open a Searchform OnBrowseButtonClick() which in Searchform is a grid and the grid shows parts information (PartId,PartCode,PartName,UnitName and Descr (Part Id Is Invisible)) so in this form user can make complex and nested filtering and at last select a partcode
but I dont know how return the information of selected partcode to the main form and I want to bound the GridViewBrowseColumn
with part
.please help me to solve this problem.
Best Regard,
Mahsan
0
Hello Mahsan,
Thank you for writing back.
Currently you can filter in RadMultiColumnComboBox only by setting the AutoFilter property. You can find more information in the "Multicolumncombox filtering in gridview" forum thread how to implement filtering in GridViewMultiComboBoxColumn. We have already a Feature Request, logged in our Public Issue Tracking System - PITS about this topic. You can track its progress, subscribe for status changes and add your vote/comment to it on the referred link.
As to the question about how to get the filtered data collection and to pass it as parameter to the search form, you may have a look at our Rows vs ChildRows help article, which may guide you to achieve the desired behavior.
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
Thank you for writing back.
Currently you can filter in RadMultiColumnComboBox only by setting the AutoFilter property. You can find more information in the "Multicolumncombox filtering in gridview" forum thread how to implement filtering in GridViewMultiComboBoxColumn. We have already a Feature Request, logged in our Public Issue Tracking System - PITS about this topic. You can track its progress, subscribe for status changes and add your vote/comment to it on the referred link.
As to the question about how to get the filtered data collection and to pass it as parameter to the search form, you may have a look at our Rows vs ChildRows help article, which may guide you to achieve the desired behavior.
Please do not hesitate to contact us if you have any additional questions.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
reyhane
Top achievements
Rank 1
answered on 16 Dec 2019, 05:50 AM
Hello
What is GridBrowseEditorElement namespace?
0
Hello, Reyhane,
Since R2 2018 GridBrowseEditor uses RadBrowseEditorElement because the GridBrowseEditorElement was obsolete since Q1 2016. Feel free to use the RadBrowseEditorElement instead.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Since R2 2018 GridBrowseEditor uses RadBrowseEditorElement because the GridBrowseEditorElement was obsolete since Q1 2016. Feel free to use the RadBrowseEditorElement instead.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
reyhane
Top achievements
Rank 1
answered on 16 Dec 2019, 07:32 AM
Thank for your answer
How to access to my radgridview?
protected
override
void
OnBrowseButtonClick(EventArgs e)
{
if
(editorElementColumnName ==
"GetDate"
)
{
GetValueFrm getValue =
new
GetValueFrm(Onvan, 3,
false
);
getValue.ShowDialog();
int
currentcol = radGridView1.CurrentColumn.Index;
int
currentrow = radGridView1.CurrentRow.Index;
if
(!GetValueFrm.Cancel)
{
radGridView1.CurrentRow.Cells[
"GetDate"
].Value = getValue.SearchValue;
radGridView1.CurrentRow = radGridView1.Rows[currentrow];
radGridView1.CurrentColumn = radGridView1.Columns[currentcol + 1];
radGridView1.CurrentCell.IsSelected =
true
;
}
}
}
0
reyhane
Top achievements
Rank 1
answered on 16 Dec 2019, 09:08 AM
I found this question's answer :)
0
Hello, Reyhane,
I am glad that you have found a solution for your case. However, I would like to share that the easiest way to access the RadGridView control in the OnBrowseButtonClick method of your custom RadBrowseEditorElement is by accessing the Parent which is actually the GridBrowseCellElement which GridControl property refers to the RadGridView itself:
Should you have further questions please let me know.
I am glad that you have found a solution for your case. However, I would like to share that the easiest way to access the RadGridView control in the OnBrowseButtonClick method of your custom RadBrowseEditorElement is by accessing the Parent which is actually the GridBrowseCellElement which GridControl property refers to the RadGridView itself:
GridBrowseCellElement cell= this.Parent as GridBrowseCellElement;
RadGridView grid= cell.GridControl;
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
reyhane
Top achievements
Rank 1
answered on 17 Dec 2019, 05:19 AM
very good! Thank you