Hi
My problem GridView CommandButton feature is working but filter click buttons to disappear
Thx.
private void gvw_AcilanDersler_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement.ColumnInfo is GridViewCommandColumn)
{
if (e.CellElement.RowInfo.Cells["AcilanDersNotDurumKod"].Value != null)
{
RadButtonElement button = (RadButtonElement)e.CellElement.Children[0];
string title = e.CellElement.RowInfo.Cells["AcilanDersNotDurumKod"].Value.ToString();
if (title == "SON")
{
button.Enabled = true;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisineIzinVer;
}
else if (title == "IZI")
{
button.Enabled = true;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisiIzniniGeriAl;
}
else
{
button.Visibility = ElementVisibility.Hidden;
}
}
}
}
My problem GridView CommandButton feature is working but filter click buttons to disappear
Thx.
private void gvw_AcilanDersler_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement.ColumnInfo is GridViewCommandColumn)
{
if (e.CellElement.RowInfo.Cells["AcilanDersNotDurumKod"].Value != null)
{
RadButtonElement button = (RadButtonElement)e.CellElement.Children[0];
string title = e.CellElement.RowInfo.Cells["AcilanDersNotDurumKod"].Value.ToString();
if (title == "SON")
{
button.Enabled = true;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisineIzinVer;
}
else if (title == "IZI")
{
button.Enabled = true;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisiIzniniGeriAl;
}
else
{
button.Visibility = ElementVisibility.Hidden;
}
}
}
}
6 Answers, 1 is accepted
0
Hello Ali,
Can you please provide a little more information on what is precisely the issue you experience?
I am looking forward to your reply.
Regards,
Stefan
Telerik
Can you please provide a little more information on what is precisely the issue you experience?
I am looking forward to your reply.
Regards,
Stefan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Ali
Top achievements
Rank 1
answered on 22 Dec 2014, 07:08 AM
show GridView button in text form by cells in the colon or command button , but I hide the column disappears when I press the buttons to filter .
0
Accepted
Hello Ali,
I am having difficulties understanding what is your question. Would it be possible capture a video of the undesired behavior. You can use Jing for the purpose. Some images/sketches of the desided UI might also help.
I am looking forward to your reply.
Regards,
Stefan
Telerik
I am having difficulties understanding what is your question. Would it be possible capture a video of the undesired behavior. You can use Jing for the purpose. Some images/sketches of the desided UI might also help.
I am looking forward to your reply.
Regards,
Stefan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
0
Hi Ali,
If I understand correctly, after filtering your buttons are disappearing. If so, this is most likely caused by the CellFormatting event handler you have, where you need to reset the property settings you introduce. Something like:
More information and examples are available here: Formatting Cells | UI for WinForms Documentation.
I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
Regards,
Stefan
Telerik
If I understand correctly, after filtering your buttons are disappearing. If so, this is most likely caused by the CellFormatting event handler you have, where you need to reset the property settings you introduce. Something like:
private
void
gvw_AcilanDersler_CellFormatting(
object
sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
if
(e.CellElement.ColumnInfo
is
GridViewCommandColumn)
{
RadButtonElement button = (RadButtonElement)e.CellElement.Children[0];
if
(e.CellElement.RowInfo.Cells[
"AcilanDersNotDurumKod"
].Value !=
null
)
{
string
title = e.CellElement.RowInfo.Cells[
"AcilanDersNotDurumKod"
].Value.ToString();
if
(title ==
"SON"
)
{
button.Visibility = ElementVisibility.Visible;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisineIzinVer;
}
else
if
(title ==
"IZI"
)
{
button.Visibility = ElementVisibility.Visible;
((GridCommandCellElement)e.CellElement).CommandButton.Text = Strings.NotGirisiIzniniGeriAl;
}
else
{
button.Visibility = ElementVisibility.Hidden;
}
}
else
{
button.ResetValue(RadElement.VisibilityProperty, ValueResetFlags.Local);
}
}
}
More information and examples are available here: Formatting Cells | UI for WinForms Documentation.
I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
Regards,
Stefan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Ali
Top achievements
Rank 1
answered on 24 Dec 2014, 02:21 PM
Thank you so problem solved