Click here to Skip to main content
15,914,386 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalmoving a Form With No Border Pin
Orlando_Herrera12-Dec-07 8:01
Orlando_Herrera12-Dec-07 8:01 
GeneralRe: moving a Form With No Border Pin
Christian Graus12-Dec-07 8:56
protectorChristian Graus12-Dec-07 8:56 
GeneralRe: moving a Form With No Border Pin
Kristian Sixhøj12-Dec-07 9:05
Kristian Sixhøj12-Dec-07 9:05 
GeneralRe: moving a Form With No Border Pin
The ANZAC12-Dec-07 10:25
The ANZAC12-Dec-07 10:25 
GeneralProgrammatically add dropdowns to gridview Pin
Coleenh12-Dec-07 6:02
Coleenh12-Dec-07 6:02 
GeneralRe: Programmatically add dropdowns to gridview Pin
Michael Sync12-Dec-07 21:12
Michael Sync12-Dec-07 21:12 
GeneralRe: Programmatically add dropdowns to gridview Pin
Coleenh13-Dec-07 6:12
Coleenh13-Dec-07 6:12 
GeneralRe: Programmatically add dropdowns to gridview Pin
Michael Sync13-Dec-07 16:09
Michael Sync13-Dec-07 16:09 
Adding the template column to Gridview is tricky. I will show you three ways to achieve your goal. but None of those ways is perfect. Each way has each own pros and cons.

1. Adding HTML dropdown to Template column

For example :

TemplateField tf = new TemplateField ();        <br />
        TemplateBuilder dBdr = new TemplateBuilder ();<br />
        dBdr.AppendLiteralString ("<select name="\"ctl00$DefaultContent$GridView1$ctl09$DropDownList1\"" id="\"ctl00_DefaultContent_GridView1_ctl09_DropDownList1\"">");<br />
        dBdr.AppendLiteralString ("</select>");<br />
        tf.ItemTemplate = dBdr; <br />
        <br />
        GridView1.Columns.Add (tf);


2. Loading the custom control

This way is what I found in other site. I haven't tried yet. You can place all controls that you want to show in User control. Load this custom control and set it to ItemTemplate.

For example ~
<br />
TemplateField tf = new TemplateField ();  <br />
tf.ItemTemplate = LoadControl("mycontrols.ascx"); <br />
 GridView1.Columns.Add (tf);


3. Creating your own template column

Example : http://msdn2.microsoft.com/en-us/library/aa289501(VS.71).aspx[^]
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)


GeneralRe: Programmatically add dropdowns to gridview Pin
Coleenh14-Dec-07 7:00
Coleenh14-Dec-07 7:00 
GeneralDtection of OS Pin
billythekidney12-Dec-07 4:05
billythekidney12-Dec-07 4:05 
GeneralRe: Dtection of OS Pin
Luc Pattyn12-Dec-07 5:34
sitebuilderLuc Pattyn12-Dec-07 5:34 
GeneralMySql database does not store "\" (backward slash) when query using vb.net Pin
Rupesh Kumar Swami12-Dec-07 2:28
Rupesh Kumar Swami12-Dec-07 2:28 
GeneralRe: MySql database does not store "\" (backward slash) when query using vb.net Pin
Dave Kreskowiak12-Dec-07 3:29
mveDave Kreskowiak12-Dec-07 3:29 
GeneralSelect 'AsplData','Select * from Customer order by customer','C:\test.xls' Pin
Atheeque12-Dec-07 2:16
Atheeque12-Dec-07 2:16 
GeneralRe: Select 'AsplData','Select * from Customer order by customer','C:\test.xls' Pin
Dave Kreskowiak12-Dec-07 3:24
mveDave Kreskowiak12-Dec-07 3:24 
GeneralMoving from VB6 to VB what Pin
johnsevennl12-Dec-07 0:53
johnsevennl12-Dec-07 0:53 
GeneralRe: Moving from VB6 to VB what Pin
Dave Kreskowiak12-Dec-07 3:22
mveDave Kreskowiak12-Dec-07 3:22 
GeneralRe: Moving from VB6 to VB what Pin
johnsevennl12-Dec-07 11:36
johnsevennl12-Dec-07 11:36 
GeneralRe: Moving from VB6 to VB what Pin
darkelv12-Dec-07 16:44
darkelv12-Dec-07 16:44 
General[Message Deleted] Pin
Deepthy.P.M11-Dec-07 23:07
Deepthy.P.M11-Dec-07 23:07 
GeneralRe: i want to create a chat window in VB.net. Pin
Christian Graus11-Dec-07 23:14
protectorChristian Graus11-Dec-07 23:14 
Generalnewbies and chat apps Pin
The ANZAC11-Dec-07 23:46
The ANZAC11-Dec-07 23:46 
General[Message Deleted] Pin
Deepthy.P.M11-Dec-07 22:52
Deepthy.P.M11-Dec-07 22:52 
GeneralRe: is it possible to send a template in windows application to web application Pin
Christian Graus11-Dec-07 23:12
protectorChristian Graus11-Dec-07 23:12 
QuestionHow do I store bits? Pin
Big Ralph11-Dec-07 20:33
Big Ralph11-Dec-07 20:33 

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.