Ultra web Grid columns in Infragistics and user controls - user-controls

My user control(.Net) uses a ultrawebgrid and I want to pass the value of one of the column to another column in the same grid ..can any one suggest me the best way to pass the values

Expose those columns as public properties of the user control (GET/SET). This way you will be able to operate them outside of the control itself.

Related

Sharepoint Drop-Down Column with Multiple Select Choices

One of my columns contain 200 countries. End user should be able to select multiple items from the list.
Sharepoint multiple choice column only allows for one of three choices:
Drop-Down Menu
Radio Buttons
Checkboxes (allow multiple selections)
I'd like to be able to combine the features of Drop-down menu and checkbox.
Is this possible and is there a workaround in Sharepoint designer?
Not looking to do this in InfoPath forms.
Thanks!
You need to put your 200 Countries values into a Custom List, then use a Lookup column rather than a Choice column.  With the Lookup column, you can allow multi-selects.
If you can change your field type to another then use type "Lookup column with multiple values". It has good UI experience. But you must create additional list with your 200 countries.
If you want to use only choice type field then I think no, you must add custom control on form.
May be like this:
1. Add script on form.
2. Script will render some jquery autocomplete control (https://jqueryui.com/autocomplete/#combobox) or select2 control (https://select2.org/dropdown or https://select2.org/selections) on form load. If no third party controls exists that applied to you then create own control with necessary features. Populate it from out-of-box field options.
3. Hide out-of-box field.
4. Add onChange or onPreSave handlers that copy values from your custom control to out-of-box field.
When form saved it save out-of-box field value to list item.

How to specify the width of site column in a list?

I have developed a list in SharePoint. While entering new item in it, like name, if I keep on typing it gets spread over a line making the width of cloumn spread over page. I want to limit the width of site column so as the column's value spreads over multiple lines instead of spreading over one. How can I do this setting?
This is not a setting you can configure in SharePoint. You will need to write some custom code using css and possibly javascript that will set the width of the column. You can make a change like this in SharePoint Designer.
You must use min-width (CSS) in your block.
You have to create custom XSLT for this. There you have loop all the column and need to specify the overflow:auto, hidden,.. CSS property. So it automatically get effect based on your internal name of the field.
So whereever you have the field it automatically get affected. If it for one single view you can use JavaScript to achieve this but this is not right way to do.
The data you are entering can be displayed in many ways. Today in a table format, tomorrow in a dropdown etc. You should distinguish between:
limiting the amount of data that can be entered in a site column (can be done in SharePoint alone, when you design your list)
limiting the wrapping of the words in a table cell today or trimming the values in a dropdown tomorrow (can be done using HTML/CSS "nowrap" if you display the list values in a browser app, or differently if you show the values in a WinForms app)

Linearlayout like a "ListView" containing objects in android?

I am making a list using LinearLayout and would like to add several "person"-objects to my "list"
I need to be able to click on an object in this list an pull out the person object or at least the personId to be able to find the specific person in my database.
How do I go about doing this?
I have tried using a TextView but it is too simple to contain all of the desired values.
I have also tried using a ListView but I have several LinearLayout next to each other. The ListView scroll individually and therefore I can't use them
Here is an image:
As you can see I am trying to make a grid of sorts each column is a linearview and at the moment so are each row.
I realize there is a grid but I need to be able to fit objects in where I want them and I am too inexperienced to write my own adapter for the gridview
You can achieve this using a ListView with a custom ArrayAdapter.
Check out this example.
Instead of the Weather class, use your own Person object and make the necessary modifications.
Edit:
After reading your edit, I can see that you have some kind of Grid. So my best guess would be to use a GridView with a custom adapter.
Since you are getting your data from a database, you might as well use a custom CursorAdapter.
But I still haven't figured out what you're trying to do.
It seems that you want all the cells to be visible. That would only mean you have a small/finite amount of cells, and in that case a GridView wouldn't be any better than a for loop that adds views to a layout.

Specifying which column a button will be placed in

I am using TableLayout, and when I am placing a button, I want to specify which column the button should be placed in. For example, column 4. The dirty way to go around this is to place 3 empty views before I place the button.
But, is there a better way? I was told to use android:layout_column="4" in the code, but it made the application crash.
The solution that I found is by using the view its basically an empty view that just takes up space in the view its placed in. Alternatively a can be used, will be able to do what I wanted to do before BUT unfortunately the columns and rows aren't distributed evenly or automatically which is a drawback.

DrawItem in listbox (VC++)

When we will use DrawItem for a listbox?
Normally, if the listbox is ownerdraw, we will use DrawItem. What are the other senarios we use drawitem?
To elaborate on Rashmi Pandit; A ListBox with override DrawItem can also be used to 'visualize' objects. In a project I'm working on, a ListBox is used to display rows from a database. Each row / item is visualized using formatted Strings, Icons etc.
Overriding DrawItem (and MeasureItem!) is ideal for this purpose. Of course, the internal structure has to be tweaked a bit (the standard Items property cannot be used for objects), but it is certainly worthwhile.
Message WM_DRAWITEM is sent only to owner-drawn List boxes.
You can use DrawItem when you want to override the default implementation and custom the way a listbox is drawn. For e.g. in the list there might be some item which should is the default item and you would want it to be highlighted so that the user knows it is the default item.
Here's an eg for a combo in C#: Higlighting a particular item in a combo box

Resources