Quantcast
Channel: Our ComponentOne » All Posts
Viewing all 14170 articles
Browse latest View live

Filterbar focus on startup

$
0
0

Hello all. I have a programming issue with the truedbgrid filterbar. I have a custom search function tacked on to my grid so that I can search for numbers and words. That function is below. When I load my form is set the grid.FilterActive = True. When I start typing I get the following error "Missing operand before 'Like’ operator. The error comes from my custom filter function. The function works perfectly when I click on the filterbar and start typing but not when I set filteractive to true and start typing.

Dim sb As New System.Text.StringBuilder()

		Dim dc As C1.Win.C1TrueDBGrid.C1DataColumn
		For Each dc In _grid.Columns
			If dc.FilterText.Length > 0 Then
				Select Case dc.DataType.Name
					Case "String"
						If sb.Length > 0 Then
							sb.Append(" AND ")
						End If
						sb.Append((dc.DataField + " like " + "’*" + dc.FilterText.ToString + "*’"))

					Case "Int32", "Double", "Single"
						If sb.Length > 0 Then
							sb.Append(" AND ")
						End If
						sb.Append((dc.DataField + " = " + dc.FilterText.ToString))

					Case Else
						'dc.FilterText = ""
						'TODO add other data types
				End Select
			End If
		Next dc
		' filter the data
		Me.DT.DefaultView.RowFilter = sb.ToString

Reply To: Filterbar focus on startup

$
0
0

Oh, the error comes because "dc.DataField" is blank. How do I make it not blank?

Reply To: C1Scheduler as a background task

$
0
0

Hi Irina,
This is all starting to get where I need it to be but I have a question. In my service I have code simmilar to the following, this loops through the Appointment collection looking for any reminders that will fire in the next 60 seconds, if it finds any it will use information stored in the appointment to start another process on my server that will run the defined task. Once the task process is started I want to dismiss the reminder so that it doesnt get started again. The only problem I see with this is that the Dismiss appears to remove the reminder object so that I then cant get access to the NextReminderDate property, this is not a problem for single appointments but for recurring appointments I’m worried that the next occurrence wont get picked up. Is this correct behaviour, does C1Schedule only remind on the first appointment of a recurring appointment or does the reminder object come back at a later stage after some refresh operation?

 For Each app As C1.C1Schedule.Appointment In dbt.sched.Appointments
                                If Not IsNothing(app.Reminder) Then
                                    Debug.WriteLine(app.Body & " – current time=" & Now.ToString("yyyy-MM-dd HH:mm:ss") & _
                                                    "- task starttime =" & app.Start.ToString("yyyy-MM-dd HH:mm:ss") & _
                                                    " – Next reminder time=" & app.Reminder.NextReminderDate.ToString("yyyy-MM-dd HH:mm:ss"))
                                    If DateDiff(DateInterval.Second, Now, app.Reminder.NextReminderDate) < 60 Then
                                        ' within 60 seconds so start the task
                                        If dbt.sched.isScheduling Then
                                            Debug.WriteLine("Task started")   '<— start task here
                                            app.Reminder.Dismiss()  
                                            dbt.sched.UpdateDatabase()
                                        End If
                                    Else
                                        Debug.WriteLine("Task skipped")
                                    End If
                                End If
                            Next

Schedules less that one day

$
0
0

I can’t see if it’s possible to schedule an appointment for less than one day, say something like every 6 hours for instance. It’s not a big deal if it isn’t possible, I can get my users to create multiple daily schedules, one at 00:00:00, one at 06:00:00, one at 12:00:00 and one at 18:00:00. but if C1Schedule could do this for me it would be brilliant. Any suggestions.

Adrian.

Reply To: How to set FontStyle.Strikeout in C1FlexGrid for WPF

Filtering and refactoring!

$
0
0

Hi,

Recently I started using C1DataGrid and I find difficult to filter data using refactoring.

DataGrid is bind to a custom ObservableCollection, where DataObject is the basic type in our application, and every other type inherits from it.

The collection of DataObjects can have different types of data, that means that every row can have different type of data.

When I try to filter data I get error message like this:

"Instance property 'Roughness’ is not defined for type 'DataObject’"

So this means that Filtering is not using reflection as Roughness is defined for type that inherits from DataObject.

I played around and created custom method to create custom filtering and I nearly managed that. However because I am overriding the Create and Cancel methods of IDataGridFilter, the filter control is not closing after I press Filter button and do the filtering.

I had a close look on the documentation as well and I think the BuildFilterPredicates() method in the FilterHelperClass should do the refactoring.

My question is: Am I doing something wrong here or you haven’t implemented this feature and how to sort this out?

Reply To: C1TreeView Issue

error converting docx to html5

$
0
0

Hi,

wanted to check out the html5 features and tried to convert word 2013 files of one project into html5:
one very simple file converted fine, but for the main big file the conversion ended with errors.
Where am I supposed to go from there ? Is there some way to troubleshoot this or smth. …
some log maybe ?
(when I point to the file in the "Convert documents to html5″dialog I see "Object reference not set to an instance of an object")

Regards,
Petr.


Reply To: PDF417

$
0
0

hi there, quick searching on Google brings me here.and Im currently working on PDF417 barcode generating.I came across PDF barcode generating guide(http://www.rasteredge.com/how-to/csharp-imaging/barcode-generating-pdf417/)while searching on web as well as the counterpart you guys mentioned above. well ,What confused me is how can i know which is best working for me.Im using ASP.NET. Any suggestion will be highly appreciated.

Reply To: FlexGrid is extremely slow

$
0
0

Hi

Changing to a fixed pixel size help a little bit on the performance, but it is still way to slow.
(it takes 30 seconds to 1 minute to load +/- 50 records (10 columns)

In fact in a production environment this is useless.
I’m still using the standard LS grid for production.

I’m wondering why after 3 a 4 months C1 doesn’t have a proper solution.
Hoping infragistics will release a better similar component.

Reply To: Filtering and refactoring!

$
0
0

Hello Vlado,

If I assume correctly, your original filtering problem is similar to what has been discussed in the given forum link.

http://our.componentone.com/groups/topic/problem-with-datagridfilterrow-do-not-filter/

In case that is the scenario, you can verify the original filtering using the latest build for WPF.
Latest build is available for download from the given link.

http://prerelease.componentone.com/hotfixes/wpf/C1WPFBasicLibrary.4_4.0.20132.333.zip

If that does not solve your issue, then I will need some more assistance. It will be quite helpful if you can send me a small sample showing the complete implementation and I will try to provide a solution accordingly.

Regards,
Deepankar

Reply To: Issue with Flowdirection of HTMLHost control

$
0
0

This is what I see on clicking the 'R to L’ button (tested on IE 9).
Isn’t this behaviour correct?

Thanks

Reply To: Format of datetime column

$
0
0

Hello Jorge,

Thanks for the sample as it helped me in understanding the issue. The format does not apply on the concatenated column because after concatenation, it loses its datatype as DateTime. Therefore, for C1Flexgrid, this column is of string datatype and hence, it is unable to apply the specified datetime format.

Regarding the first issue i.e. C1Flexgrid is truncating data in first column, I would like to inform you that this happens because the default format of a DateTime column in C1Flexgrid is 'd’. So, this is the design behaviour but you can change the format as per your requirement.

Hope it clarifies.

Regards
Ashish

Reply To: Width property problems

$
0
0

Hi C1_UpkarS,

So you are using a server ratio. If you run that code on
- machine A (150dpi), you get width=15*106 and when opening the created file on same machine, correct 106 pixels results.
- machine B (120dpi), you get width=12*106 and when opening the created file on machine A (150dpi), you get a width of 67 pixels.
- machine B (120dpi), and you would set width=15*106 (not like your code) and when opening the created file on machine A (150dpi), you get a width of 84 pixel.

Interesting is that machine A is 150dpi according to the function (returning 15), but Windows DPI setting shows 96 pixels per inch in Control Panel. Is that the problem, that the setting is user-dependent somehow and C1Excel uses a different user? Did you try to run this in IIS or did you run it interactively?

Thanks

Resize C1FlexGrid cell to accommodate background image

$
0
0

I was just thinking, would it be possible to assign different background images per cell in C1FlexGrid? And would it also be possible to resize the cells for the image to fit?


Reply To: Format of datetime column

$
0
0

Asnish,

Ok, what’s the format for datetime to make it show the full datetime values ?

for the concat column, how could I force it to recognize as a datetime column to apply a custom format?

Reply To: C1PropertyGrid.ValueChanged not fired on PropertyChanged event

$
0
0

Do you have a simple sample that shows the issues?
I tried creating a sample using your code but I am not able to mimic the scenario. I don’t see a control implementing the ITypeEditorControl interface in the above code. Also the xaml code is somehow stripped.
Sorry for that.

Thanks

ChildControl for ChartExtensions

$
0
0

Hi ,

I trying to create custom extensions for lightswitch in VS2012. I have trying add Child Controls for main control. Please give some examples for add child controls.

Regards,
Muneesh.

How to prevent user move C1DockTabItem

$
0
0

I want to prevent user move C1DockTabItem from C1DockTabControl to other.

I set CanUserReorder to false, but just prevent user reorder TabItem in same DockTabControl.

Reply To: c1DateEdit Enabled issue

$
0
0

Hi richas

Of course, yes sorry, sorted and many thanks for the answer

Kind Regards
Scott

Viewing all 14170 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>