Click here to Skip to main content
15,917,562 members
Home / Discussions / C#
   

C#

 
GeneralRe: Form control event problems Pin
Nick Parker6-Aug-04 10:27
protectorNick Parker6-Aug-04 10:27 
GeneralRe: Form control event problems Pin
Jefferys6-Aug-04 12:43
Jefferys6-Aug-04 12:43 
QuestionAny way to test code effeciency? Pin
FocusedWolf6-Aug-04 9:54
FocusedWolf6-Aug-04 9:54 
AnswerRe: Any way to test code effeciency? Pin
eggie56-Aug-04 9:58
eggie56-Aug-04 9:58 
AnswerRe: Any way to test code effeciency? Pin
Christoph Ruegg6-Aug-04 13:26
Christoph Ruegg6-Aug-04 13:26 
AnswerRe: Any way to test code effeciency? Pin
leppie6-Aug-04 19:25
leppie6-Aug-04 19:25 
GeneralSetting Colum widths in a datagrid Pin
Peter86753096-Aug-04 9:50
Peter86753096-Aug-04 9:50 
GeneralRe: Setting Colum widths in a datagrid Pin
Looney Tunezez6-Aug-04 10:09
Looney Tunezez6-Aug-04 10:09 
I am assuming that its a winform application:

Peter8675309 wrote:
//get the data
dsResults = SqlHelper.ExecuteDataset(Conn,CommandType.StoredProcedure,"usp_GetSearchResultsSel",new SqlParameter("@Description", txtDescription.Text),new SqlParameter("@SearchParameters", cboSearchParam.SelectedText));

dgResults.TableStyles.Clear();

DataTableStyle tabStyle1=new DataTableStyle();
tabStyle1.MappingName = <mapping name="">

//populate the grid
dgResults.DataSource = dsResults.Tables[0].DefaultView;

dgResults.TableStyles.Add(tabStyle1);

//settings for grid
dgResults.TableStyles[0].GridColumnStyles[0].Width=200;
dgResults.TableStyles[0].GridColumnStyles[1].Width=50;
dgResults.TableStyles[0].GridColumnStyles[2].Width=100;
dgResults.ReadOnly=true;


try this :
//get the data
dsResults = SqlHelper.ExecuteDataset(Conn,CommandType.StoredProcedure,"usp_GetSearchResultsSel",new SqlParameter("@Description", txtDescription.Text),new SqlParameter("@SearchParameters", cboSearchParam.SelectedText));

//populate the grid
dgResults.DataSource = dsResults.Tables[0]; <<-- maybe!!!

//settings for grid
dgResults.TableStyles[0].GridColumnStyles[0].Width=200;
dgResults.TableStyles[0].GridColumnStyles[1].Width=50;
dgResults.TableStyles[0].GridColumnStyles[2].Width=100;
dgResults.ReadOnly=true;



"Creating tomorrow's legacy systems today.....
.... One CRISIS at a time!" -- Unknown


"If you build it....
.....BUGS will come!" -JB


this.Dispose();


"A Bug is a piece of <sup> code </sup> that knows whatz its purpose"



GeneralRe: Setting Colum widths in a datagrid Pin
Peter86753096-Aug-04 10:42
Peter86753096-Aug-04 10:42 
GeneralRe: Setting Colum widths in a datagrid Pin
Looney Tunezez6-Aug-04 11:08
Looney Tunezez6-Aug-04 11:08 
GeneralRe: Setting Colum widths in a datagrid Pin
Peter86753099-Aug-04 4:29
Peter86753099-Aug-04 4:29 
GeneralRe: Setting Colum widths in a datagrid Pin
Looney Tunezez9-Aug-04 6:38
Looney Tunezez9-Aug-04 6:38 
GeneralRe: Setting Colum widths in a datagrid Pin
Anonymous12-Aug-04 1:31
Anonymous12-Aug-04 1:31 
GeneralBizarre remoting problem: a bug in VS2005 Pin
Judah Gabriel Himango6-Aug-04 9:19
sponsorJudah Gabriel Himango6-Aug-04 9:19 
GeneralRe: Bizarre remoting problem: a bug in VS2005 Pin
leppie6-Aug-04 9:32
leppie6-Aug-04 9:32 
GeneralRe: Bizarre remoting problem: a bug in VS2005 Pin
eggie56-Aug-04 9:59
eggie56-Aug-04 9:59 
GeneralHex display in PropertyGrid Pin
Nick Hounsome6-Aug-04 9:06
Nick Hounsome6-Aug-04 9:06 
GeneralGet email list from Exchange/domain Pin
Asad Hussain6-Aug-04 8:22
Asad Hussain6-Aug-04 8:22 
GeneralMulti-threading Pin
Guinness4Strength6-Aug-04 7:55
Guinness4Strength6-Aug-04 7:55 
GeneralChange decimal symbol Pin
Member 11981926-Aug-04 6:55
Member 11981926-Aug-04 6:55 
GeneralRe: Change decimal symbol Pin
Colin Angus Mackay6-Aug-04 7:29
Colin Angus Mackay6-Aug-04 7:29 
GeneralRe: Change decimal symbol Pin
Member 11981926-Aug-04 8:06
Member 11981926-Aug-04 8:06 
GeneralRe: Change decimal symbol Pin
Colin Angus Mackay6-Aug-04 10:48
Colin Angus Mackay6-Aug-04 10:48 
GeneralRe: Change decimal symbol Pin
Member 11981926-Aug-04 12:32
Member 11981926-Aug-04 12:32 
GeneralRe: Change decimal symbol Pin
Dave Kreskowiak6-Aug-04 7:41
mveDave Kreskowiak6-Aug-04 7:41 

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.