Click here to Skip to main content
15,918,267 members
Home / Discussions / C#
   

C#

 
QuestionData from form in DLL Pin
edepede10-Nov-07 8:53
edepede10-Nov-07 8:53 
AnswerRe: Data from form in DLL Pin
Colin Angus Mackay10-Nov-07 10:42
Colin Angus Mackay10-Nov-07 10:42 
GeneralRe: Data from form in DLL Pin
edepede10-Nov-07 11:24
edepede10-Nov-07 11:24 
GeneralRe: Data from form in DLL Pin
Colin Angus Mackay10-Nov-07 11:30
Colin Angus Mackay10-Nov-07 11:30 
QuestionHiding columns in a datagrid Pin
steve_rm10-Nov-07 7:35
steve_rm10-Nov-07 7:35 
AnswerRe: Hiding columns in a datagrid Pin
Adeel Chaudhry11-Nov-07 18:25
Adeel Chaudhry11-Nov-07 18:25 
AnswerRe: Hiding columns in a datagrid Pin
Adeel Chaudhry11-Nov-07 18:26
Adeel Chaudhry11-Nov-07 18:26 
QuestionRe: Hiding columns in a datagrid [modified] Pin
steve_rm12-Nov-07 3:23
steve_rm12-Nov-07 3:23 
Hello,

This is using the Compact Frame 2.0

I have found some code that seems to work. However, the idea of the grid is for the user to keep adding new products to the datagrid. Even though the columns that are needed are added ok. When the user attempts to add a second row there is an error. ""Value does not fall within the expected range". This happens each time, after the first one has been successfully added. 2nd one onwards.

I thought it might be the tblStyle object, but as I am creating a new one each time, I am surprised to get this error.

Many thanks,

Steve

DataGridTableStyle tblStyle = new DataGridTableStyle();<br />
                tblStyle.MappingName = "OrderDetail";<br />
<br />
                DataGridTextBoxColumn column = new DataGridTextBoxColumn();<br />
                column.MappingName = "Beverage";<br />
                column.HeaderText = "Beverage";<br />
                tblStyle.GridColumnStyles.Add(column);<br />
<br />
                column = new DataGridTextBoxColumn();<br />
                column.MappingName = "BeverageQty";<br />
                column.HeaderText = "Quantity";<br />
                tblStyle.GridColumnStyles.Add(column);<br />
<br />
                grdBeverages.TableStyles.Add(tblStyle); //Error - "Value does not fall within the expected range"<br />
                grdBeverages.DataSource = DS.OrderDetail.DefaultView; 


Many thanks if you have any ideas about this,

Steve


-- modified at 9:31 Monday 12th November, 2007
QuestionDeleting a file from windows service in c# Pin
poqeqw10-Nov-07 4:33
poqeqw10-Nov-07 4:33 
AnswerRe: Deleting a file from windows service in c# Pin
Paul Conrad10-Nov-07 4:35
professionalPaul Conrad10-Nov-07 4:35 
AnswerRe: Deleting a file from windows service in c# Pin
Rajasekharan Vengalil10-Nov-07 6:20
Rajasekharan Vengalil10-Nov-07 6:20 
Questiondatatable sort Pin
Thaer Hamael10-Nov-07 3:05
Thaer Hamael10-Nov-07 3:05 
AnswerRe: datatable sort Pin
pmarfleet10-Nov-07 4:00
pmarfleet10-Nov-07 4:00 
AnswerRe: datatable sort Pin
Guffa10-Nov-07 4:03
Guffa10-Nov-07 4:03 
QuestionStoring references in a List [modified] Pin
rcollina10-Nov-07 2:12
rcollina10-Nov-07 2:12 
AnswerRe: Storing references in a List Pin
Colin Angus Mackay10-Nov-07 3:57
Colin Angus Mackay10-Nov-07 3:57 
GeneralRe: Storing references in a List Pin
rcollina10-Nov-07 4:34
rcollina10-Nov-07 4:34 
AnswerRe: DataSouce,DisplayMember &amp; ValueMember properties of ComboBox Pin
pmarfleet10-Nov-07 2:11
pmarfleet10-Nov-07 2:11 
QuestionA Question - File Monitoring Pin
gunner_uk200010-Nov-07 0:57
gunner_uk200010-Nov-07 0:57 
AnswerRe: A Question - File Monitoring Pin
Colin Angus Mackay10-Nov-07 1:07
Colin Angus Mackay10-Nov-07 1:07 
QuestionPROBLEM IN SAVING Pin
Sunil Wise10-Nov-07 0:34
professionalSunil Wise10-Nov-07 0:34 
AnswerRe: PROBLEM IN SAVING Pin
Colin Angus Mackay10-Nov-07 0:49
Colin Angus Mackay10-Nov-07 0:49 
GeneralRe: PROBLEM IN SAVING Pin
Sunil Wise10-Nov-07 1:11
professionalSunil Wise10-Nov-07 1:11 
GeneralRe: PROBLEM IN SAVING Pin
Colin Angus Mackay10-Nov-07 1:20
Colin Angus Mackay10-Nov-07 1:20 
GeneralRe: PROBLEM IN SAVING Pin
Paul Conrad10-Nov-07 3:17
professionalPaul Conrad10-Nov-07 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.