Grid position is not proper after reload the data. Winforms radgridview we are using.
Grid is having huge data with headers and child grids (Nested grid).
The issue is related to grid position after data save.
User will expand the grid including header ,child and do some edits and save the records.
After save the grid position we are trying to set from code. As a part of the save function grid data will be reloaded and then we are expanding the headers and child grid same as how the user kept.
Below two properties are not consistent before save and after data reload.
rdGrid.VerticalScroll.Maximum
rdGrid.VerticalScroll.Minimum
Other than setting these properties how we can set the grid position. Thanks in Advance
int position = vScroll.Maximum ;
bool isMaxValue = position == vScroll.Maximum - vScroll.LargeChange + 1;
if (isMaxValue)
{
position = vScroll.Maximum - vScroll.LargeChange + 1;
}
rdGrid.TableElement.VScrollBar.Value = position;
Hi guys,
So I was following this telerik video on the 3 types of filtering (basic, excel-like, custom) : https://www.telerik.com/videos/winforms/filtering-and-expressions-in-radgridview-for-winforms
I tried to apply the custom filtering using a textbox just like the video on my project, but I keep getting an error. It's suppose to search all the rows and match what's in the textbox. It'll run, but as soon as I try typing into the textbox, I get an error. What am I doing incorrectly?
I've attached some pics of it and the code as well. Thank you!
Here is my code:
private void ProductionInstructionPrintPage_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'dbMTISysDataSet.VW_ProdPrintPage' table. You can move, or remove it, as needed.
this.vW_ProdPrintPageTableAdapter.Fill(this.dbMTISysDataSet.VW_ProdPrintPage);
this.WindowState = FormWindowState.Maximized;
radGridView1.EnableFiltering = true;
radGridView1.EnableCustomFiltering = true;
}
private void radTextBox1_TextChanged(object sender, EventArgs e)
{
radGridView1.MasterTemplate.Refresh();
}
private void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
{
// if the custom filter is empty, reset this row to its default state
if (string.IsNullOrEmpty(radTextBox1.Text))
{
e.Visible = true;
//reset each cell in this row
for (int i=0; i<radGridView1.ColumnCount; i++)
{
e.Row.Cells[i].Style.Reset();
e.Row.InvalidateRow();
}
return;
}
//if the custom filter is set, locate the cells in this row that match it and colorize them
e.Visible = false;
for (int i = 0; i<radGridView1.ColumnCount; i++)
{
string text = e.Row.Cells[i].Value.ToString();
//locate and colorize matching cells
if (text.IndexOf(radTextBox1.Text, StringComparison.InvariantCultureIgnoreCase) >= 0)
{
e.Row.Cells[i].Style.CustomizeFill = true;
e.Row.Cells[i].Style.DrawFill = true;
e.Row.Cells[i].Style.BackColor = Color.PowderBlue;
e.Visible = true;
}
else
{
e.Row.Cells[i].Style.Reset();
e.Row.InvalidateRow();
}
}
}
I would like my users to red mark images before sending to us.What I am looking for is where I would have buttons above the image for:
Draw Line
Draw Circle
Draw Rectangle
Draw w/Pen
And each would be preset to width of 2, color red. I do not want to use your Draw Dialogs at all.
I would also want to have Undo/Redo available without using your tool palette.
Save I can handle already since you have the SameImageAs method.
How can I do this please?
Hello Telerik Community , I just moved from devexpress to telerik and I can say it's really amazing for winforms.
I have some questions about licensing to make sure I don't get in trouble for copyright laws.
I'm developing an open-source app which is a 3D modeler and I used Telerik Rad Controls for Winform Trial to build GUI.
So here's the first question , Is it OK if I publish my app source in git-hub when it's using telerik trial version?
And second question , Can I share trial assemblies downloaded from official telerik website ?
In this case users and developers who use my app get nag screen and they need to buy full version of telerik right ?!
So it's OK to do that ?
Regards,
Mike Cell
I wish to programmatically select the "Basic" Colors Tab when the colorbox is opened, without hidding the other tabs
Thanks in advance
Hi,
Is it possible to add a series of check boxes to each header? I would like them to appear directly underneath the date.
Thanks
I have a gridview with a checkbox column. When the checkbox is checked, I would like to immediately perform some validation and cancel the check if the validation fails. I would like this to happen immediately and not when the user leaves the cell.
I have set the editmode of the column to onvaluechange and now the CellValueChanged event fires as soon as the checkbox is checked. I can perform validation there and show a messagebox immediately if the validation fails. However if I uncheck the textbox from the CellValueChanged event, it doesn't take affect until the user leaves the cell.
I've tried using the CellValidation event but it doesn't fire until the user leaves the cell.
How can I uncheck the checkbox and have it take effect immediately, without the user having the leave the cell?
I have a RadGridView using the VisualStudio2012Light theme which is exactly the style I want - I don't want anything to change when it comes to that at all, not the headers, summary rows, add new row, etc.
I have some columns with WrapText enabled so they will stretch and auto size their parent rows where needed if AutoSizeRows is enabled.
Now the problem comes in when AutoSizeRows is enabled. All non-data rows resize as well, breaking whatever heights were set as part of the theme. For maintainability I don't want to have to add explicit overrides/adjustments for heights in case the theme changes at a later stage. I am very happy with the theme and only want the rows to stretch in size and to never shrink below what the theme dictates.
I'm using 2016 Q1 and am battling to find the correct event and property combinations to only allow my data rows to resize - I figured that preventing autosizing of non-data rows is probably the cleanest fix for now I don't know if there is any request perhaps to prevent AutoSizeRows from shrinking already themed heights?
I've tried using the CreateRow event but can't figure out how to change enable/disable from there. The GridViewCreateRowEventArgs object has a RowElement property which hasn't been instantiated yet since the row doesn't exist. Must I instantiate that myself to set AutoSize to false? How would I create a default RowElement without changing anything else but that? If I can't use e.RowElement, how do I use e.RowInfo to set AutoSize to false?
I've tried using the RowFormatting event but to no avail.
Any assistance on this would be greatly appreciated.