We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

mulitcolumn combox column existence detection

Thread ID:

Created:

Updated:

Platform:

Replies:

77001 Oct 6,2008 09:51 AM Oct 16,2008 05:01 AM Windows Forms 3
loading
Tags: GridControl
David Cui
Asked On October 6, 2008 09:51 AM

for a multicolumn combox, i tried to use the following to test wheather the column named "ActiveStatus" existing or not withion PrepareView event handler,

--> mccb.Model.NameToColIndex("ActiveStatus");

somehow, it give me uncatchable exception error "Invalid Range 'activestatus'" if the datasource (say, datatable) really doesn't have such column. I am expecting just returning me -1, isntead of always get exception at least.

how can i detect the column's existing in the combox? and what do i need to do ? or is there a better way to test if the column exists ?

david


Jisha Joy [Syncfusion]
Replied On October 7, 2008 08:25 AM

Hi david,


Could you please let me know which Syncfusion control you are referring?

If you are referring gridListControl, The method this.gridListControl1.Grid.Model.NameToColIndex will return -1, if the specified column name id not existing. Please refer the sample to illustrates this:

http://www.syncfusion.com/support/user/uploads/GListControlEvent_a8efb08d.zip

Regards,
Jisha





David Cui
Replied On October 7, 2008 09:53 AM


I mean Multi-Column Combox control.
Even for the example you gave me, i saw a lot of exceptions happen (see below). I am asking Is there any efficient Name2Index to check column's exisitence? otherwise, it is every expensive by your underlying check exception. thx.

catched at Syncfusion.Windows.Forms.Grid.GridRangeInfo.Parse(String parseText) in :line 0
System.FormatException: Invalid Range: DD
at Syncfusion.Windows.Forms.Grid.GridRangeInfo.ParsePart(String parseText)
at Syncfusion.Windows.Forms.Grid.GridRangeInfo.Parse(String parseText)
System.FormatException: Invalid Range: DD
at Syncfusion.Windows.Forms.Grid.GridRangeInfo.Parse(String parseText)
at Syncfusion.Windows.Forms.Grid.GridModel.NameToColIndex(String name)
catched at Syncfusion.Windows.Forms.Grid.GridModel.NameToColIndex(String name) in :line 0
-1



>Hi david,


Could you please let me know which Syncfusion control you are referring?

If you are referring gridListControl, The method this.gridListControl1.Grid.Model.NameToColIndex will return -1, if the specified column name id not existing. Please refer the sample to illustrates this:

http://www.syncfusion.com/support/user/uploads/GListControlEvent_a8efb08d.zip

Regards,
Jisha







Jisha Joy [Syncfusion]
Replied On October 16, 2008 05:01 AM

Hi David,


Sorry for the delay in getting back to this issue.

I was able to see the issue. We suspect this issue to be a defect. Please create a Direct trac incident to follow up mentioning the forum title as subject.

Regards,
Jisha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;