how to add ---select---- in the combobox
-
I have a table , table name is table1 it has following fields. Column1 , column2 , column3 , column4 Now I write the following query
Dim query = from p in baseclass.gettable(of table1) _
Select p.column1 , p.column2Now this query is the anonymous type. Now I want to insert one more row at position 1 at runtime.
That’s row’s display string is “----select----”
And it’s value member is “-1”How should i add this row in Query variable? I want to check if there is not record , then I gives nothing, In case of nothing , how should I add the record.
-
I have a table , table name is table1 it has following fields. Column1 , column2 , column3 , column4 Now I write the following query
Dim query = from p in baseclass.gettable(of table1) _
Select p.column1 , p.column2Now this query is the anonymous type. Now I want to insert one more row at position 1 at runtime.
That’s row’s display string is “----select----”
And it’s value member is “-1”How should i add this row in Query variable? I want to check if there is not record , then I gives nothing, In case of nothing , how should I add the record.
You can use the Concat method to concatenate lists together. So, if you wanted to insert a "--select--" string at position 1 in a list of strings, you could do it like this:
string[] valueToInsert = { "--select--"; };
string[] otherValues = { "foo", "bar", "baz", "bat" };var result = valueToInsert.Concat(otherValues);
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Upon this disciple I'll build my new religion? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango