Datagrid binding

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi all,

I'm using the CompactFramework and I like to format some datagrid cell (the
DataGrid has a Datatable as datasource).
Someone told me to use the Binding class and its events Format and Parse.

Ok, but I have no idea about how to link a datatable cell with the Binding
class.

I.E.: I have this code:

Dim d As New DataTable

d.Columns.Add("num", GetType(Int32))

d.Rows.Add(New Object() {1})

d.Rows.Add(New Object() {3})

DataGrid1.DataSource = d



And I want the "num" column to be formatted as "000".

Any tips?



Thanks
 
Hi Zanna,

I was fixed on that Format and Parse in your question and did give an answer
your a direct answer on that where you could find that.

Reading now your problem your last message and your first over, I think that
the datagridcolumnstyle fits better for your problem.

Keep in mind that the datagrid uses binding, but that by using the
datasource.

http://msdn.microsoft.com/library/d...windowsformsdatagridcolumnstyleclasstopic.asp

Format
http://msdn.microsoft.com/library/d...tingwindowsformsdatagridvisualbasicprimer.asp

I also have a lot of other links so when that does not fit, take a look
there.
Complete very nice control
<http://dotnet.leadit.be/extendeddatagrid>

Faqs
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp

http://www.microsoft.com/belux/nl/msdn/community/columns/jtielens/datagrid.mspx

http://msdn.microsoft.com/library/d...ry/en-us/dnwinforms/html/wnf_CustDataGrid.asp

http://msdn.microsoft.com/library/d...ormsdatagridtextboxcolumnclassformattopic.asp


I hope this helps better?

Cor
 
I was fixed on that Format and Parse in your question and did give an
answer
on that direct question where you could find that.
 
I was fixed on that Format and Parse in your question and did give an answer
your a direct answer on that where you could find that.

I hope this helps better?

Well... I got a little problem :PPP

I'm developping with the compact framework, so many of these features aren't
implemented :(

I wonder if there is a solution for CF...

I thank you anyway, some links are interesting.
 
Back
Top