Welcome Guest Search | Active Topics | Sign In | Register

Evaluating Grid & MaskedEditColumn Options
Frank de Groot - Schouten
Posted: Tuesday, October 20, 2009 6:49:02 AM
Rank: Newbie
Groups: Member

Joined: 10/19/2009
Posts: 2
I'm currently evaluating the Grid control for a customer and encountered some issues:

1 When databinding a grid to an entity set (not using EntityDataSource) I get a NotSupportedException originating from System.Entity.Data. LINQ to SQL does appear to work. Any experience with this?

2 Can I use a MaskedEditColumn (in a Grid) with just a license for the Grid or do I need a license for the MaskedEdit control as well?

3 In my test sample the MaskedEditColumn is frequently unresponsive. The only remedy is clearing the field with the Delete key and then type a new value. Here's some data that might be useful, if you need more to reproduce let me know:
<eo:MaskedEditColumn DataField="Fee" HeaderText="Fee">
<MaskedEdit>
<eo:MaskedEditSegment SegmentType="Number" Decimals="2" IsRequired="true" />
</MaskedEdit>

Thanks in advance for any useful info.
</eo:MaskedEditColumn>
Using Windows 7 with IE8 with/without compatibility view and Visual Studio 2008 SP1.
eo_support
Posted: Tuesday, October 20, 2009 11:33:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Thanks for posting in the forum. As to your questions:

1. The Grid does not take Linq data types natively because the DLL is built against .NET 2.0, not .NET 3.5. However it is very easy to load a .NET 2.0 DataTable object from a .NET 3.5 Linq query. The basic idea is you can get a DbCommand from your Linq query, you can then run that DbCommand to fill a DataTable the "traditional way". Once you have the DataTable, you can bind the DataTable object to the Grid. The code will be something like this:

Code: C#
//Load a DataTable from Linq query
DataTable table = new DataTable();

//'q' is the Linq query, 'dc' is your DataContext object
DbCommand cmd = dc.GetCommand(q);
using (DbConnection conn = cmd.Connection)
{
    conn.Open();
    using (DbDataReader reader = cmd.ExecuteReader())
    {
        table.Load(reader);
    }
}

//Bind the DataTable to the Grid
Grid1.DataSource = table;
Grid1.DataBind();


2. No. The Grid license does not cover MaskedEdit control. So if you want to use them both, you will need a suite license (or you can purchase two separate licenses for Grid and MaskedEdit, but the cost is the same as suite license);

3. MaskedEdit does not automatically overwrite existing contents. So if the mask has a length of 5 and you have already typed 5 digits, it won't take any more digits. If you need to correct any digits, you can either use del to delete everything, or use backspace to delete the last digits. Please let us know if this is consistent with what you see;

Please feel free to let us know if you have any more questions.

Thanks!
Frank de Groot - Schouten
Posted: Tuesday, October 20, 2009 2:10:32 PM
Rank: Newbie
Groups: Member

Joined: 10/19/2009
Posts: 2
Thanks for the quick reply!

About the problem with the MaskedEditColumn: it's not a max length issue. Also it's not consistent, in a single run editing the control's content sometimes works and sometimes not. I couldn't find a pattern or triggering factor. Could this be a IE8 issue?

Also I noticed that text gets wrapped and the top few pixels are visible at the bottom of a cell. It doesn't bother me but I could post a screen print if you like.

Anyway, let me know if you need more information.
eo_support
Posted: Tuesday, October 20, 2009 2:20:46 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Thank you very much for the additional information on the MaskedEditColumn issue. We are not aware of any problem particular with IE 8. We will look into it and see if we can reproduce the problem. In the mean time, if you figured out a way to consistently reproduce it, please let us know.

As to the text wrapping issue, I am not sure if you were referring to something to the MaskedEditColumn or regular StaticColumn. For StaticColumn it is normal. Because the Grid does not automatically expand a row, when the text wraps into multiple lines, the additional lines are clipped off. You can either adjust the grid's ItemHeight so that any additional lines are completely out of the view; or modify Grid -> Item Style Sets -> _Default -> CellStyle to include "white-space:nowrap;" so that the text does not wrap at all.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.