Click here to Skip to main content
11,712,126 members (64,050 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WPF wpftoolkit
Hi All
I have a radGridView - WPF With
<telerik:RadGridView Grid.Row="1" Name="grdUpload" FontWeight="Bold" ShowGroupPanel="False" AutoGenerateColumns="true"
 IsReadOnly="True" ShowInsertRow="False"   ItemsSource="{Binding DtRecord, Mode=TwoWay}" SnapsToDevicePixels="False" CanUserFreezeColumns="False" SelectedItem="{Binding DrSelectedData,Mode= Default}" RowStyleSelector="{StaticResource radRowStyle}" />                 
Code by MVVM desgin patten

Description :
DtRecord is a DataTable in View Model
Private m_DtRecord As DataTable
Public Property DtRecord As DataTable
Get
    Return m_DtRecord
End Get
Set(value As DataTable)
    m_DtRecord = value
    OnPropertyChanged("DtRecord")
End Set
End Property
And I have a method for Search Record in DtRecord

Overloads Sub SearchDataLog()
    'TODO: SearchDataLog
     Dim dtSearch As DataTable = m_staticDataTable.Copy()
    'Add new DataTable
    For Each dr As DataRow In listDataRows
        dtSearch.Rows.Add(dtSearch.NewRow())
        For Each cl As DataColumn In dtSearch.Columns
            Dim clName As String = cl.ColumnName
            dtSearch.Rows(dtSearch.Rows.Count - 1)(clName) = dr(clName)
        Next
    Next
    DtRecord = dtSearch
End Sub
listDataRows is an expected list with collection rows

I Work with Follow
Step 1 : Fill data to Gridview --> Displays All record
Step 2 : I Sorting by a Other column --> Order with column
Step 3 : I Search a record dose not exit --> display no once or more Record
Step 4 : I Search a record is exit --> Exception
--> I have an Exception : Cloumns '[ *** ]' Dose not exit .
*** : Is the Column name I sorted

Note : I'm sure DtRecord result Contains column
Message Error : OnpropertyChanged("DtRecord") Rows on my code File
Posted 12-Apr-12 22:54pm
lean90644

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CHill60 280
1 Sergey Alexandrovich Kryukov 259
2 OriginalGriff 230
3 Andy Lanng 160
4 Richard MacCutchan 130
0 CHill60 280
1 Sergey Alexandrovich Kryukov 125
2 Andy Lanng 120
3 Abhinav S 95
4 Maciej Los 95


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 13 Apr 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100